Libtool archives

From Mandriva Community Wiki

Jump to: navigation, search
Libtool archives (*.la)

Contents


[edit] When are *.la needed

[edit] libltdl

libltdl is a wrapper around dlopen and allows to dynamically load shared libraries. This is mostly used for plugins.

More investigation is needed

[edit] static build

When you use a *.a file, you need the corresponding *.la to know the dependency of the library (since *.a do not bundle this information).

[edit] shared build

libtool uses *.la to know the dependencies. But libtool works correctly without *.la files. Worse, default libtool causes overlinking when it uses *.la. That's why many linux distributions get rid of *.la files unless strictly needed (for "libltdl" or "static build")

nb: *.la do not handle things like -I/usr/include/gtk-2.0, contrary to *.pc files

[edit] How to package *.la

.la should be in libxxx-static-devel, unless needed through dlopen in which case they should go to libxxx directly (nb: it raises issues with conflicts with other libxxx with different major). There's no reason afaik to have *.la in libxxx-devel.

Migrating warning from existing 2008.1 policy: if *.la are moved (to -static-devel), it may hide the libtool bug and will pop from time to time when -static-devel are installed.

Personal tools