unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Bill Gribble <grib@linuxdevel.com>
Cc: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>, guile-user@gnu.org
Subject: Re: dynamic-link and LD_LIBRARY_PATH
Date: 02 Apr 2002 07:57:19 -0600	[thread overview]
Message-ID: <1008620452.16758.13.camel@flophouse> (raw)
In-Reply-To: <1008617386.16363.1.camel@alienway>

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


  parent reply	other threads:[~2002-04-02 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C1D7000.7070403@digitalgreen.com>
     [not found] ` <200112170953.fBH9rJs23122@pepita.cs.tu-berlin.de>
     [not found]   ` <3C1E1CE0.2060202@digitalgreen.com>
2002-04-02 13:57     ` dynamic-link and LD_LIBRARY_PATH Bill Gribble
     [not found]       ` <1008617386.16363.1.camel@alienway>
2002-04-02 13:57         ` Bill Gribble [this message]
2002-04-10 20:10         ` Rob Browning

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1008620452.16758.13.camel@flophouse \
    --to=grib@linuxdevel.com \
    --cc=guile-user@gnu.org \
    --cc=mgrabmue@cs.tu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).