Bug 59854 - glibc incompatibility between V6.x and V7.x
glibc incompatibility between V6.x and V7.x
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
alpha Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-02-13 16:54 EST by kenneth block
Modified: 2016-11-24 09:48 EST (History)
2 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description kenneth block 2002-02-13 16:54:50 EST
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 05:39:42 EST
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.