Primarily, that lafilefixer breaks the MD5/SHA sums of the various .la files, so when somebody removes that package later, or upgrades to a package with a differently named .la file, it leaves behind this .la cruft.2
The effect of this, is that subsequent builds can die in mysterious ways trying to find stuff, as stupid code tries to use the old and outdated .la files.
The solution is reasonably simple, all you need is a little help from a few good Unix commands.
You'll need 2 basic packages installed:
- GNU findutils "xargs" and "find", provided in sys-apps/findutils. You should already have these, because they are after all part of the "system" set.
- Gentoo's Portage-Utils' "qfile", provided in app-portage/portage-utils.
Firstly, we generate a list of all the .la files.
kent@ember$ find -O3 /usr/lib64 -type f -name "*.la"
We then pipe this list null-delimited to xargs ( for safety ) and ask "qfile" to tell us if they are orphans.
kent@ember$ find -O3 ./ -type f -name "*.la" -print0 | xargs -0 qfile -o
We can then review this list, make a few "ahh!, so that explains that problem" statements, and then proceed to remove the listed files using our mechanism of choice. xargs + rm is good enough for me.
kent@ember$ find -O3 ./ -type f -name "*.la" -print0 | xargs -0 qfile -o | xargs rm
And as if by magic, things that no longer wanted to compile resume compiling!.
For me, this cleaned up most of the residual problems I had after the whole libpng12 debacle.
Important: You should read the man pages for
findto make sure you're not just cargoculting bad code. i.e: that -O3 thing can be dangerous.
1: ( dev-util/lafilefixer )
2: Perhaps portage has a workaround for this, but I'm using Paludis, so don't know, sorry. Complaints to: /dev/null.