~alpine/devel

[alpine-devel] removing .la files from packages

Natanael Copa
Details
Message ID
<20110603161559.7418a3ba@ncopa-desktop.nor.wtbts.net>
Sender timestamp
1307110559
DKIM signature
missing
Download raw message
Hi,

I'd like to suggest a new packaging policy to over time remove all
unneeded .la files.

The reason is simple: Avoid overlinking. to be sure that the linking
works on all systems, including old obsolete ones, they force linking
with everything possible.

When we upgraded libpng from 1.4 to 1.5 alot of packages needed a
rebuild. Many of those were linked to libpng without really needing
that and removing the .la files would have solved it.

Many other distros also does that.

But this needs to be done with care or we will break building for each
other. 

Example we have libfoo which is needed by libbar, which is needed by
appbaz.

libfoo will produce a libfoo.la
libbar will produce a libbar.la which will contain a
reference to /usr/lib/libfoo.la
appbaz will parse the libbar.la and find out that it needs to parse
libfoo.la too.

So if we just remove libfoo.la from libfoo-dev package, all apps that
uses libbar.la will break. (That happened with libpng and is why
nenolod reverted my 'remove .la' patch)

So in order to remove the .la files, we might need to rebuild alot, but
doing so will save us for bigger rebuilds in future.

So i suggest that we start removing the .la files from top and work
down to the bottom (start with appbaz, then libbar and finally libfoo)

If you hit an error due to missing .la files I suggest that you do the
following:

abuild installdeps
grep 'missin.la' /usr/lib/*.la | cut -d: -f1 | xargs apk info --who-owns

and remove the .la files from those and bump pkgrel.

Note that some applications do need the .la file for their plugins.

Thoughts?

Should we have abuild to just remove libtool files and have an option
for keeping them? (i think arch linux does so). I kinda prefer to have
it visible what is going on than having some obscoure automagic.

Some info about libtool and overlinking:
http://wiki.mandriva.com/en/Libtool_archives
http://wiki.mandriva.com/en/Overlinking
http://blog.flameeyes.eu/2008/04/14/what-about-those-la-files

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---