[blfs-dev] Removing .la files

Bruce Dubbs bruce.dubbs at gmail.com
Wed Dec 6 22:02:20 PST 2017


I've been looking at removing .la (libtool archive) files from LFS/BLFS. 
There are a lot of them, but there are also a lot of variances among distros.

LFS/BLFS  1653
Fedora26     8
Devuan     107
Mint       311
Ubuntu     230
Slackware 1676
SuSE       133
Arch         0
Debian     232

Of course there are a lot of variables in the above.  Most of the distros 
are the default install and do not have packages like xyz-devel installed.

The problem for BLFS is that many packages today are moving away from 
autotools to meson/ninja or cmake/make.  We recently updated glib and that 
now uses meson and does not create any .la files.  The problem is that a 
lot of other .la files say to look for files like libgobject-2.0.la from 
glib and if that is missing, the package build fails.

We can (and have) written scripts to fix the problem, but that just works 
around it issue and does not fix it.

What would be ideal would be to just remove all the .la files (and fix at 
least one .pc file (serf) that references two .la files).  An example of 
the change is to update /usr/lib/libaprutil-1.la to -laprutil-1.

These .la files are generally only used at build time and are unneeded for 
that purpose on linux.  However, from what I can tell, there are 
occasional uses of .la files at run time.  The problem is that I cannot 
reliably determine which .la files are needed for that.

Does anyone here have any insight about how to determine what .la files 
NOT to remove?

   -- Bruce


More information about the blfs-dev mailing list