Warning: .la files considered harmful

Auke Kok sofar at foo-projects.org
Tue Aug 24 02:46:30 CEST 2010


On 08/23/10 16:22, Zbigniew Luszpinski wrote:
>> 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
> install.
>
> This change is too big and not well tested to be commited to moonbase.

really, no, this chance is tiny, well tested and fix all the common 
issues lunar users are having




More information about the Lunar mailing list