Bug 59854 - glibc incompatibility between V6.x and V7.x
Summary: glibc incompatibility between V6.x and V7.x
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 7.3
Hardware: alpha Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
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:
Environment:
Last Closed: 2002-02-13 21:54:55 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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:
Always

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
efined
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 {
public:
  foo() { printf("foo constructed\n"); }
};

foo x;

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

2.
3.
	

Additional info:

This looks similar to:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=19680


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
__gmon_start__.
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.