Re: libtool bites us again (aka Libtool's Revenge, part II)
On Mon, Dec 13, 1999 at 01:21:50PM +1100, Mikolaj J. Habryn wrote:
> Last time I raised this point, Ben Collins suggested that this would
> only arise for package-specific modules, however I don't believe that
> we can assume that safely. I can easily envisage wanting to
> dynamically load librep on demand - it's a scripting interface, after
a) dynamic loading does not depend on the .la file even when using libltdl
b) libperl is also a scripting interface, and it is loaded by linking at
compile time, not dynamic loading at runtime. However if dynamic loading
was wanted, the .la serves at the programs linking time so it already
knows about what was in there when it goes to load the using libltdl.
To expand further for those that don't know about this mechanism:
When creating a dynamically loadable module using libtool, or even a
shared library, a .la file is created. In it contains some useful info
about the library like soname, version, and other libraries that it
Now there is nothing in this file that is not already in the library or
module (the soname is internal, and the dependencies are also linked
already). The only exception being the complete library version, which is
only used when linking.
At runtime, when the library is loaded by a program that is linked to it,
the .la file is not used _at all_.
When compiling you can benfit (but not require) the .la when compiling a
_libtool_ enabled program (not all programs).
Now on to libltdl. When a program uses libltdl to load dynamic modules and
shared libraries, it is not limited to ones created with libtool. Eg. it
can load libc.so.6 if it wants. What the .la does is _allow_ libltdl to
know a little about the module, like what it is linked to. This helps on
broken and poorly designed OS's that don't allow certain features that
make dynamic loading easy. This does _not_ include ELF/glibc based systems
(such as the ones that Debian supports). This is support for old
So the bottom line is, we don't really need .la files, we don't really
benefit from them. However since they are installed by libtool we should
allow them, but _only_ where it does the most good and doesn't cause more
problems than it solves, which is in the -dev package.
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` email@example.com - firstname.lastname@example.org - email@example.com '