From owner-freebsd-hackers Fri Feb 8 2:23:28 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id 1EFD637B422; Fri, 8 Feb 2002 02:23:25 -0800 (PST) Received: from pool0031.cvx22-bradley.dialup.earthlink.net ([209.179.198.31] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16Z8Bb-0001wd-00; Fri, 08 Feb 2002 02:23:22 -0800 Message-ID: <3C63A62D.3E4A4FC4@mindspring.com> Date: Fri, 08 Feb 2002 02:19:25 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Maxim Sobolev Cc: Jason Evans , jdp@FreeBSD.org, deischen@FreeBSD.org, jasone@FreeBSD.org, hackers@FreeBSD.org, jlemon@FreeBSD.org Subject: Re: Linking libc before libc_r into application causes weird problems References: <1013147180.73417.2.camel@notebook> <20020207234233.D23162@canonware.com> <3C639A8C.6D100326@FreeBSD.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Maxim Sobolev wrote: > That would be nice, but we have a real problem at hand. As I said, I > think that ld(1) should be smart enough to reorder libc/libc_r so that > libc_r is always linked before libc. This is clearly not the case > right now. Unfortunately there is no easy way to reproduce this, but > if you have some spare CPU cycles try to remore explicit -pthread from > ports/mail/evolution/Makefile, build the port on -current and do `ldd > /usr/X11R6/bin/evolution'. You will see that libc.so.X precedes > libc_r.so.X, even though -lc wasn't supplied to a linker, while -lc_r > was. You aren't including the linker lines for the libraries specified before the -lc_r (which may themselves be linked against libc.so instead of libc_r.so, which is wrong), and you aren't including the final link line. See the recent patch to ldd to make it work against .so libraries (unfortunately, it's only in -current, not yet in -stable). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message