Warning: .la files considered harmful

Zbigniew Luszpinski zbiggy at o2.pl
Tue Aug 24 01:22:25 CEST 2010

> Everyone,
> for a long time now lunar has silently allowed applications to install
> .la files in /usr/lib etc. This is pretty bad, as these files are
> re-generated using old information and can get outdated.

With every new compilation *.la files are also installed. So they should 
point to current version.

*.la files because of crazy design are pure evil and should be removed 
sooner than later but before removing them all we should rewrite all 
modules which depends on static libs to not use *.la files.
This default addition to LDFLAGS should decrease the need of modification:
-Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/usr/lib -L/lib -L/usr/lib

Of course Makefiles still needs to be rewritten to stop using *.la files 
to stop breaking. If module uses dependency which has *.pc file this 
should not be needed.

> This results
> in random libtool compile errors such as this:
> libtool: link: cannot find the library `/usr/lib/libpixman-1.la' or
> unhandled argument `/usr/lib/libpixman-1.la'
> make[2]: *** [clip-test] Error 1
> make[2]: Leaving directory `/usr/src/pixman-0.18.4/test'
> In order to fix this issue, please do the following:
> 1) update moonbase and re-lin libtool
>    # lin moonbase
>    # lin -c libtool
> this will get a new lunar plugin on your system that stops new libtool
> .la files from getting installed on your system
> 2) remove the current libtool .la files:
>    # rm /usr/lib/*.la /lib/*.la

> this should fix any compilation issue you might have if .la files are
> the cause as a result of step #2, lunar fix may attempt to recompile a 
lot of packages.

If you have done these steps try to lin pixman vlc libxcb poppler
I have no luck with this procedure. Will see after lunar fix and new iso 

This change is too big and not well tested to be commited to moonbase.

have a nice day,
Zbigniew Luszpinski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4595 bytes
Desc: not available
URL: <http://foo-projects.org/pipermail/lunar/attachments/20100824/1216a93f/attachment.bin>

More information about the Lunar mailing list