From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17652 invoked by alias); 22 May 2008 03:54:10 -0000 Received: (qmail 17644 invoked by uid 22791); 22 May 2008 03:54:09 -0000 X-Spam-Check-By: sourceware.org Received: from hera.rbi.informatik.uni-frankfurt.de (HELO hera.rbi.informatik.uni-frankfurt.de) (141.2.1.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 May 2008 03:53:42 +0000 Received: from [141.2.119.180] (fahrenheit.ghl40.whgl.uni-frankfurt.de [141.2.119.180]) by hera.rbi.informatik.uni-frankfurt.de (8.13.8/8.13.8) with ESMTP id m4M3rctR023756; Thu, 22 May 2008 05:53:38 +0200 Message-ID: <4834EE51.1020808@cs.uni-frankfurt.de> Date: Thu, 22 May 2008 05:09:00 -0000 From: Sven Eschenberg User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: cdinesh CC: gcc-help@gcc.gnu.org Subject: Re: gcc compatibility References: <17396275.post@talk.nabble.com> In-Reply-To: <17396275.post@talk.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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/msg00221.txt.bz2 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: . 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 > 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 > >