Bug 59854 - glibc incompatibility between V6.x and V7.x
Summary: glibc incompatibility between V6.x and V7.x
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 7.3
Hardware: alpha Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-02-13 21:54 UTC by kenneth block
Modified: 2016-11-24 14:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-13 21:54:55 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description kenneth block 2002-02-13 21:54:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; compaq)

Description of problem:
When I create a shared library on a V6.x system and then link against it on a 
V7.x system, I get the following warning:

warning:type and size of dynamic symbol `__gmon_start__' are 
not defined

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. On a Redhat 6.2 system, I create a library:

cxal.zko.dec.com> g++ -shared -o libfoo.so foo.cxx

2. On a Red Hat 7.2 system, I create my program:

cxalrh72> g++ -o tt m.cxx -L. -lfoo
/usr/bin/ld: warning: type and size of dynamic symbol `__gmon_start__' are not d
cxalrh72> setenv LD_LIBRARY_PATH .
cxalrh72> ./tt
foo constructed

As an alternative, I can just link with "ld" and the message goes away, but of 
course none of my constructors are envoked:

1. Create library on V6.2 using ld:

cxal.zko.dec.com> g++ -c foo.cxx
cxal.zko.dec.com> ld -shared -o libfoo.so foo.o

2. Link on V7.2 system:

cxalrh72> g++ -o tt m.cxx -L. -lfoo
cxalrh72> ./tt

Here is the source used in the example:

cxal.zko.dec.com> cat foo.cxx
#include <stdio.h>

class foo {
  foo() { printf("foo constructed\n"); }

foo x;

cxal.zko.dec.com> cat m.cxx
void main()


Additional info:

This looks similar to:


My guess is that in this case, X was being built on the old system and/or with 
an old glibc or gcc.

Comment 1 Jakub Jelinek 2002-02-14 10:39:42 UTC
The warning message just comes from RHL 6.2 not setting .type/.size on
glibc is compatible, but C++ is not binary compatible between 6.2 and 7.x,
so you really cannot do this and expect things to work.
There is compat-egcs-c++ if you need to link against 6.x C++ libraries.

Note You need to log in before you can comment on or make changes to this bug.