Thank you Sven for quick response >> As you can see your program is linked against the NTPL version of glibc >> on System A (running glibc 2.3) ... LinuxThreads support was dropped in >> 2.4 AFAIK. Obviously the version compiled on System B is linked against >> version 2.5 of glibc. Correct both have different thread versions >>You could check the outputs of your two glibc version to check for >>differences ... (Just run them), the output should somewhat look like this: yaa , correct but is there any compile option in gcc that can ignore glibc versions or ABI changes ?? Is there any problem in "linux-gate.so.1" ?? thank you dinesh Sven Eschenberg wrote: > > Hi there, > > As you can see your program is linked against the NTPL version of glibc > on System A (running glibc 2.3) ... LinuxThreads support was dropped in > 2.4 AFAIK. Obviously the version compiled on System B is linked against > version 2.5 of glibc. > > I can only assume that with some sort of ABI change for NPTL along with > the newer binutils something in the resulting executeable changed in a > way, that System A cannot properly link dynamically against the old NTPL > interface. > > You could check the outputs of your two glibc version to check for > differences ... (Just run them), the output should somewhat look like > this: > > GNU C Library stable release version 2.6.1, by Roland McGrath et al. > Copyright (C) 2007 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A > PARTICULAR PURPOSE. > Compiled by GNU CC version 4.1.2 (Gentoo 4.1.2). > Compiled on a Linux >>2.6.16.16<< system on 2007-12-08. > Available extensions: > C stubs add-on version 2.1.2 > crypt add-on version 2.1 by Michael Glad and others > Gentoo patchset 1.1 > GNU Libidn by Simon Josefsson > Native POSIX Threads Library by Ulrich Drepper et al > Support for some architectures added on, not maintained in glibc > core. > BIND-8.2.3-T5B > For bug reporting instructions, please see: > <http://www.gnu.org/software/libc/bugs.html>. > > You could aswell inspect the two executeables (with objdump etc.) to see > if there is a major difference in the sections or something ... and > since you program is so short you could check the asm output before > final linking for differences. > > But I guess you might have to ask the glibc folks for the internals and > an exact answer. > > Regards > > -Sven > > cdinesh schrieb: >> Properly >> Strike >> Protest >> >> Hi >> >> I have two Linux systems have different gcc version >> system A -> gcc (3.4.4) >> system B -> gcc (4.1.2) >> >> >> I would like to build test program that can be run on both systems >> --------------------------- >> #include <stdio.h> >> main(){ >> printf("hello world \n"); >> } >> --------------------------- >> gcc test.c -o test >> >> ldd on system A >> linux-gate.so.1 => (0x00d42000) >> libc.so.6 => /lib/tls/libc.so.6 (0x00b0c000) >> /lib/ld-linux.so.2 (0x00af2000) >> >> ldd on system B >> linux-gate.so.1 => (0x00814000) >> libc.so.6 => /lib/libc.so.6 (0x0054a000) >> /lib/ld-linux.so.2 (0x0052d000) >> >> Test case 1 >> Build test.c on system A and run on both systems A and B. >> on sytem A ok >> on system B ok. >> >> Test case 2 >> Build test.c on system B and run on both systems A and B. >> on system B ok >> on system A error >> error log >> # ./test >> Floating point exception >> >> # ldd >> /usr/bin/ldd: line 124: 3911 Floating pointexception >> LD_TRACE_LOADED_OBJECTS=1 LD_WARN= >> LD_BIND_NOW= LD_LIBRARY_VERSION >> =$verify_out LD_VERBOSE= "$@" >> >> for other information >> >> System A >> kernel 2.6.12 >> gliibc version 2.3.6 >> binutils 2.15.92.0.2 >> selinux disable >> >> System B >> kernel 2.6.18 >> gliibc version 2.5 >> binutils 2.17.50.0.6 >> selinux disable >> >> >> I have a feeling the problem is in the libraries. Please give any advice >> ? >> >> Thank you >> >> > > > -- View this message in context: http://www.nabble.com/gcc--compatibility-tp17396275p17397451.html Sent from the gcc - Help mailing list archive at Nabble.com.