From owner-freebsd-current Thu Sep 3 15:02:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA01311 for freebsd-current-outgoing; Thu, 3 Sep 1998 15:02:25 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from shire.domestic.de (kuebart.stuttgart.netsurf.de [194.233.216.182]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA01302 for ; Thu, 3 Sep 1998 15:02:22 -0700 (PDT) (envelope-from joki@kuebart.stuttgart.netsurf.de) Received: from yacht.domestic.de (yacht.domestic.de [192.168.1.4]) by shire.domestic.de (8.8.8/8.8.7) with ESMTP id AAA21498; Fri, 4 Sep 1998 00:00:23 +0200 (CEST) (envelope-from joki@shire.domestic.de) From: Joachim Kuebart Received: (from joki@localhost) by yacht.domestic.de (8.9.1/8.8.7) id AAA08050; Fri, 4 Sep 1998 00:03:49 +0200 (CEST) (envelope-from joki@shire.domestic.de) Message-Id: <199809032203.AAA08050@yacht.domestic.de> Subject: Re: ldd won't find a lib a second time In-Reply-To: from Doug Rabson at "Sep 3, 98 09:36:15 pm" To: dfr@nlsystems.com (Doug Rabson) Date: Fri, 4 Sep 1998 00:03:49 +0200 (CEST) Cc: joki@kuebart.stuttgart.netsurf.de, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug Rabson wrote: > On Thu, 3 Sep 1998, Joachim Kuebart wrote: > > > Hi, > > > > I'm seeing this: > > > > $ ldd conftest > > conftest: > > libkdecore.so.1.0 => /usr/local/lib/libkdecore.so.1.0 (0x28053000) > > libqt.so => /usr/X11R6/lib/libqt.so (0x280ae000) > > libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x281f2000) > > libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x281fc000) > > libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x2828f000) > > libm.so.2 => /usr/lib/libm.so.2 (0x282c6000) > > libc.so.3 => /usr/lib/libc.so.3 (0x282e0000) > > libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x2828f000) > > libm.so.2 => /usr/lib/libm.so.2 (0x282c6000) > > libX11.so.6 => not found (0x0) > > libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x281fc000) > > > > How can it happen that ldd doesn't find libX11.so.6 in all cases? > > What tools can I use to see a more specific error message? > > What is happening here is that each shared library has a private -rpath > setting. If a library has dependancies, it uses its own -rpath to search > for the dependant library. This means that when you link the shared lib > (libqt?) you must provide the correct -rpath. Congratulations. It was libqt's search path. I only know how this stuff works for an hour now, but I learned it thoroughly the hard way :-) The trouble is many ports are not yet ELF prepared in regard to their rpath. I sent a few patches to -ports (qt, kdelibs) and I have a few more locally. > Life might be easier if rtld searched using the main program's rpath if > the search with the shared lib's rpath failed. That would be wrong. The compiled-in search path is supposed to allow vendors to supply their versions of libraries. It's certainly not a good thing to ignore these 'hints'. cu Jo --------------------------------------------------------------------- FreeBSD: The Power to Serve Joachim Kuebart Tel: +49 711 653706 Oh god, god... My tongue is asleep and Germany my teeth itch. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message