Bug 258021 - compat-gcc-32 dependency on GLIBC_2.3.4
compat-gcc-32 dependency on GLIBC_2.3.4
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: compat-gcc-32 (Show other bugs)
4.5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-27 16:42 EDT by Sev Binello
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-28 12:44:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
simple C++ program that demonstrated g++32 dependency on GLIBC_2.3.4 (1.95 KB, text/plain)
2007-08-27 17:07 EDT, Sev Binello
no flags Details

  None (edit)
Description Sev Binello 2007-08-27 16:42:47 EDT
Description of problem:

When using gcc32 on WS4 to build executables that we need to run on WS3 and WS4
a dependency on GLIBC_2.3.4 is incurred, thus we cannot run the executable on
WS3 machines. We have found that the dependency only occurs if we make a call
to "regexec".


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

gcc32 (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-47.3)

How reproducible:
Always

Steps to Reproduce:
1.Build something that calls regexec on WS4 using gcc32 
2. Run it on WS3 machine
3. 
  
Actual results:
Get error that it cant find GLIBC_2.3.4

Expected results:
Should not build against GLIBC_2.3.4

Additional info:
Comment 1 Sev Binello 2007-08-27 17:07:58 EDT
Created attachment 174401 [details]
simple C++ program that demonstrated g++32 dependency on GLIBC_2.3.4

This is a simple C++ program that demonstrated g++32 dependency on GLIBC_2.3.4.

If you comment out the line with regexec then the dependency is eliminated
Comment 2 Jakub Jelinek 2007-08-28 12:44:26 EDT
If you are not linking against compat-glibc, you have to expect that.
So say on i386 that means compiling with
g++32 -I /usr/lib/i386-redhat-linux3E/include \
  -B /usr/lib/i386-redhat-linux3E/lib/
after making sure you have compat-glibc and compat-glibc-headers installed
if you want to run it on RHEL3.
Comment 3 Sev Binello 2007-08-28 13:01:48 EDT
Thank you, I will try that.
Is this process 
(i.e creating binaries on newer versions of RHat OS for older versions of OS)
documented anywhere, so I wont have to stumble around so much ?
Comment 4 Sev Binello 2007-08-28 13:16:36 EDT
Ok tried it.
Worked fine when using g++32 (with or without -I /usr/... and -B /usr/...) 
Are the -I and -B actually needed ?

Had problem when using gcc32 
See Below...

  gcc32 regexec2.cxx -I /usr/lib/i386-redhat-linux3E/include -B   
/usr/lib/i386-redhat-linux3E/lib/

/tmp/cc07FBBf.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status


Any idea why everything else worked ok before until we ran into the regexec call ?
Comment 5 Jakub Jelinek 2007-08-28 13:20:19 EDT
You shouldn't use gcc (resp. gcc32) to link C++ stuff, g++ (resp. g++32) takes
care of linking in libstdc++ and passing other needed options (in this case
-shared-libgcc is what matters).
Comment 6 Sev Binello 2007-08-28 15:05:26 EDT
Ok, but can you point me to documentation for using the compat libs.
Thanks.
Comment 7 Jakub Jelinek 2007-08-28 15:17:52 EDT
LC_ALL=C rpm -qpi compat-glibc-2.3.2-95.30.i386.rpm
Name        : compat-glibc                 Relocations: (not relocatable)
Version     : 2.3.2                             Vendor: Red Hat, Inc.
Release     : 95.30                         Build Date: Tue Nov 16 13:11:37 2004
Install Date: (not installed)               Build Host: porky.build.redhat.com
Group       : Development/Libraries         Source RPM:
compat-glibc-2.3.2-95.30.src.rpm
Size        : 3569066                          License: LGPL
Signature   : DSA/SHA1, Wed Jan  5 17:05:00 2005, Key ID 219180cddb42a60e
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : Compatibility C library
Description :
This package contains stub shared libraries and static libraries
from Red Hat Enterprise Linux 3.
To compile and link against these compatibility libraries, use
gcc32 -I /usr/lib/i386-redhat-linux3E/include \
      -B /usr/lib/i386-redhat-linux3E/lib/
Comment 8 Sev Binello 2007-09-06 16:50:49 EDT
Sorry, but this regexec keeps coming back to haunt us.
I have setup the compat libs and switches so as to produce
a WS3 compatible binary from WS4 machine as you outlined above

But now I cant link the WS3 copatatible binary on the WS4 machine
because  libXm.so has a dependency on 2.3.4
  /usr/X11R6/lib/libXm.so: undefined reference to `regexec@GLIBC_2.3.4

And who knows what other libs will also have this problem.
Can you tell us what  approach we should take here?

And, WHAT IS SO SPECIAL ABOUT REGEXEC ANYHOW ???

Thanks 

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