automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking dlopenable modules together


From: Bob Friesenhahn
Subject: Re: linking dlopenable modules together
Date: Thu, 19 Feb 2004 16:34:13 -0600 (CST)

This is due to a big problem that has not been solved yet.  In some
cases libtool needs to re-link the libraries at installation time.
That means that any libraries a library depends on must already be
installed.  If a build system installs several libraries, then these
libraries must be installed in the correct order or else problems will
result.

The only work-around is to carefully re-order the Makefiles and
library build order so that the libraries happen to be installed in
the correct order.

As long as the LIBADDs are correct, Automake *does* have all the
information that it needs in order to do the job (if it evaluates all
Makefile.am's as a whole), but for a recursive build, each Makefile
does not have all the information it needs.  That means that either
the 'automake' tool must somehow re-order the library install order if
it can, or warn the developer that there is a problem.  Currently it
does nothing at all.

For a non-recursive build, there is no reason why Automake can't
accomplish the library install ordering on its own if all library
dependencies are properly specified (it already does a great job of
ordering the library build).

Bob

On Thu, 19 Feb 2004, Dale E Martin wrote:

> I've got an automake/libtool build system.  I'm building two modules,
> Foo.la and Bar.la.  I need to be able to dlopen them both in separate
> systems.  Foo.la has a dependency on Bar.la, and I'd like to link them
> together so I do:
> Foo_la_LIBADD = $(top_builddir)/Bar.la
>
> This appears to work OK when I do a "make", but when I do a "make install"
> I get:
> /usr/bin/ld: cannot find -lBar
> collect2: ld returned 1 exit status
> libtool: install: error: relink `Foo.la' with the above command before 
> installing it
>
> Any ideas?  I suppose I could make a convenience library that they both
> depend on, is this the only way?
>
> Thanks,
>       Dale
> --
> Dale E. Martin, Clifton Labs, Inc.
> Senior Computer Engineer
> address@hidden
> http://www.cliftonlabs.com
> pgp key available
>
>

======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]