From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27831 invoked by alias); 22 May 2008 05:09:08 -0000 Received: (qmail 27820 invoked by uid 22791); 22 May 2008 05:09:07 -0000 X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 May 2008 05:08:37 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Jz32Y-0000S8-To for gcc-help@gcc.gnu.org; Wed, 21 May 2008 22:08:34 -0700 Message-ID: <17397451.post@talk.nabble.com> Date: Thu, 22 May 2008 07:18:00 -0000 From: cdinesh To: gcc-help@gcc.gnu.org Subject: Re: gcc compatibility In-Reply-To: <4834EE51.1020808@cs.uni-frankfurt.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: dinesh.chuhan@gmail.com References: <17396275.post@talk.nabble.com> <4834EE51.1020808@cs.uni-frankfurt.de> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-05/txt/msg00222.txt.bz2 Thank you Sven for quick response =20=20 >> As you can see your program is linked against the NTPL version of glibc= =20 >> on System A (running glibc 2.3) ... LinuxThreads support was dropped in= =20 >> 2.4 AFAIK. Obviously the version compiled on System B is linked against= =20 >> version 2.5 of glibc. Correct both have different thread versions >>You could check the outputs of your two glibc version to check for=20 >>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=20 dinesh =20 Sven Eschenberg wrote: >=20 > Hi there, >=20 > As you can see your program is linked against the NTPL version of glibc=20 > on System A (running glibc 2.3) ... LinuxThreads support was dropped in=20 > 2.4 AFAIK. Obviously the version compiled on System B is linked against=20 > version 2.5 of glibc. >=20 > I can only assume that with some sort of ABI change for NPTL along with=20 > the newer binutils something in the resulting executeable changed in a=20 > way, that System A cannot properly link dynamically against the old NTPL= =20 > interface. >=20 > You could check the outputs of your two glibc version to check for=20 > differences ... (Just run them), the output should somewhat look like > this: >=20 > 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= =20 > core. > BIND-8.2.3-T5B > For bug reporting instructions, please see: > . >=20 > You could aswell inspect the two executeables (with objdump etc.) to see= =20 > if there is a major difference in the sections or something ... and=20 > since you program is so short you could check the asm output before=20 > final linking for differences. >=20 > But I guess you might have to ask the glibc folks for the internals and=20 > an exact answer. >=20 > Regards >=20 > -Sven >=20 > cdinesh schrieb: >> Properly >> Strike >> Protest >> >> Hi=20 >> >> I have two Linux systems have different gcc version=20 >> 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=20 >> --------------------------- >> #include >> main(){ >> printf("hello world \n"); >> } >> --------------------------- >> gcc test.c -o test >> >> ldd on system A=20 >> linux-gate.so.1 =3D> (0x00d42000) >> libc.so.6 =3D> /lib/tls/libc.so.6 (0x00b0c000) >> /lib/ld-linux.so.2 (0x00af2000) >> >> ldd on system B=20 >> linux-gate.so.1 =3D> (0x00814000) >> libc.so.6 =3D> /lib/libc.so.6 (0x0054a000) >> /lib/ld-linux.so.2 (0x0052d000) >> >> Test case 1=20 >> Build test.c on system A and run on both systems A and B.=20 >> =EF=83=A0 on sytem A ok >> =EF=83=A0 on system B ok. >> >> Test case 2=20 >> Build test.c on system B and run on both systems A and B.=20 >> =EF=83=A0 on system B ok >> =EF=83=A0 on system A error >> error log=20 >> # ./test >> Floating point exception >> >> # ldd=20 >> /usr/bin/ldd: line 124: 3911 Floating pointexception >> LD_TRACE_LOADED_OBJECTS=3D1 LD_WARN=3D=20 >> LD_BIND_NOW=3D LD_LIBRARY_VERSION >> =3D$verify_out LD_VERBOSE=3D "$@" >>=20=20 >> for other information=20 >> >> System A=20 >> kernel 2.6.12 >> gliibc version 2.3.6 >> binutils 2.15.92.0.2 >> selinux disable >> >> System B=20 >> 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=20 >> >>=20=20=20 >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/gcc--compatibility-tp17= 396275p17397451.html Sent from the gcc - Help mailing list archive at Nabble.com.