From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bill Gribble Newsgroups: gmane.lisp.guile.user Subject: Re: dynamic-link and LD_LIBRARY_PATH Date: 02 Apr 2002 07:57:19 -0600 Sender: guile-user-admin@gnu.org Message-ID: <1008620452.16758.13.camel@flophouse> References: <3C1D7000.7070403@digitalgreen.com> <200112170953.fBH9rJs23122@pepita.cs.tu-berlin.de> <3C1E1CE0.2060202@digitalgreen.com> <1008608907.17101.11.camel@flophouse> <1008617386.16363.1.camel@alienway> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1017760994 23950 127.0.0.1 (2 Apr 2002 15:23:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 2 Apr 2002 15:23:14 +0000 (UTC) Cc: Martin Grabmueller , guile-user@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16sQ7t-0006EB-00 for ; Tue, 02 Apr 2002 17:23:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16sPIZ-0003aY-00; Tue, 02 Apr 2002 09:30:11 -0500 Original-Received: from grib.customer.jump.net ([216.30.103.2] helo=firewall.linuxdevelopersgroup.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16sOmq-0000tm-00 for ; Tue, 02 Apr 2002 08:57:24 -0500 Original-Received: from flophouse.internal.billgribble.com (unknown [192.168.0.66]) by firewall.linuxdevelopersgroup.com (Postfix) with ESMTP id 6ADEC101A; Tue, 2 Apr 2002 07:57:19 -0600 (CST) Original-Received: from localhost.localdomain (localhost [127.0.0.1]) by flophouse.internal.billgribble.com (Postfix) with ESMTP id 495278A213; Tue, 2 Apr 2002 07:57:19 -0600 (CST) Original-To: "Anthony W. Juckel" In-Reply-To: <1008617386.16363.1.camel@alienway> X-Mailer: Evolution/1.0 (Preview Release) X-Mailer: Ximian Evolution 1.0.3 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:106 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:106 On Mon, 2001-12-17 at 13:29, Anthony W. Juckel wrote: > > If you open the .la file instead of the .so, or better yet don't specify > > any extension at all, you'll have a better chance of getting the libs > > you need loaded automatically. Assuming that the person who built the > > library actually linked it against everything it needs. > > > > b.g. > > So, the remaining questions is, how to get around this. After doing an > nm on the requisite shared library, I'm definitely seeing many undefined > procedures, so how do I figure out which libraries are needed? Is there > any reason to not link a shared library against all of its required > libraries? Sometimes two shared libraries can have circular dependencies. This is not an ideal situation, and you want to break such cycles where you can, but you may not be able to. In many such cases, it can be difficult to get the linker to do what you want, and it may be easier just to leave the dependencies unexpressed. If there aren't any circular dependencies, I see no reason why a library shouldn't have all of its dependencies expressed in the .la file. Most people seem not to think this is important, unfortunately. In gnucash, we recommend that the 'make check' suite for shared libraries include the trivial check for dependency completeness, which is to compile the program int main(int argc, char ** argv} { return 0; } but to add 'my_new_library.la' to the link line. There are several ways to find out about library dependencies, depending on where you got the lib from. These days many package authors provide a foo-config type script which you can ask for the link-time dependencies. That may or may not be useful to you in an automatic dependency finder, but at worst you can pick through the output by hand and figure out what other libraries you need to dlopen before your target library. Good luck, b.g. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user