From owner-freebsd-hackers Fri Feb 8 9:48:38 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from scaup.prod.itd.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by hub.freebsd.org (Postfix) with ESMTP id B406F37B41A; Fri, 8 Feb 2002 09:48:31 -0800 (PST) Received: from pool0031.cvx22-bradley.dialup.earthlink.net ([209.179.198.31] helo=mindspring.com) by scaup.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16ZF8L-0001lw-00; Fri, 08 Feb 2002 09:48:27 -0800 Message-ID: <3C640DDE.78417F5C@mindspring.com> Date: Fri, 08 Feb 2002 09:41:50 -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: Ruslan Ermilov Cc: Maxim Sobolev , 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> <3C63A62D.3E4A4FC4@mindspring.com> <3C63AD02.79BA5AF5@FreeBSD.org> <20020208164132.D78163@sunbay.com> <3C63E5D1.1E423698@FreeBSD.org> <20020208172237.G78163@sunbay.com> 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 Ruslan Ermilov wrote: > Sorry, but I don't get it. I can't reproduce it other than specifying > -lc explicitly. For example, -lssh now depends on -lcrypto and -lz, in > that order. Attempting to link a program with -lc_r -lssh gives, in > that order: > > libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28065000) > libssh.so.2 => /usr/lib/libssh.so.2 (0x28083000) > libc.so.5 => /usr/lib/libc.so.5 (0x280b2000) > libcrypto.so.2 => /usr/lib/libcrypto.so.2 (0x28168000) > libz.so.2 => /usr/lib/libz.so.2 (0x28223000) > > The primary dependecies come first, then secondaries. I can only > imagine the situation where libc.so comes before libc_r.so if some > library has a (bogus) explicit dependency on libc.so. Yes, this is exactly the case: the shared library is linked against libc.so. THis is actually legal, and, in some cases, desirable. In the "Evolution" case, though, it's bogus. > How does ldd(1) output in question looks like, the full version? Heh. Same question I asked, with ldd information for the .so's, too. 8-). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message