Date: Fri, 4 Sep 1998 00:03:49 +0200 (CEST) From: Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de> To: dfr@nlsystems.com (Doug Rabson) Cc: joki@kuebart.stuttgart.netsurf.de, current@FreeBSD.ORG Subject: Re: ldd won't find a lib a second time Message-ID: <199809032203.AAA08050@yacht.domestic.de> In-Reply-To: <Pine.BSF.4.01.9809032133330.360-100000@herring.nlsystems.com> from Doug Rabson at "Sep 3, 98 09:36:15 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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 <http://www.freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809032203.AAA08050>