From owner-freebsd-current Thu Sep 3 13:37:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA15567 for freebsd-current-outgoing; Thu, 3 Sep 1998 13:37:10 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA15560 for ; Thu, 3 Sep 1998 13:37:07 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.9.1/8.8.5) with SMTP id VAA09550; Thu, 3 Sep 1998 21:36:15 +0100 (BST) Date: Thu, 3 Sep 1998 21:36:15 +0100 (BST) From: Doug Rabson To: Joachim Kuebart cc: current@FreeBSD.ORG Subject: Re: ldd won't find a lib a second time In-Reply-To: <199809031847.UAA09019@yacht.domestic.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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