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:
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
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.
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 ?
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 ?
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).
Ok, but can you point me to documentation for using the compat libs. Thanks.
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/
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.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