Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 1998 21:36:15 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de>
Cc:        current@FreeBSD.ORG
Subject:   Re: ldd won't find a lib a second time
Message-ID:  <Pine.BSF.4.01.9809032133330.360-100000@herring.nlsystems.com>
In-Reply-To: <199809031847.UAA09019@yacht.domestic.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Life might be easier if rtld searched using the main program's rpath if
the search with the shared lib's rpath failed.

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 951 1891
					Fax:   +44 181 381 1039


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?Pine.BSF.4.01.9809032133330.360-100000>