Deal with missing *.la files on CRUX
Posted: 2021-12-24 Filed under: system | Tags: CRUX, la, prt-cache, prt-get Leave a commentMany programs started removing *.la
files in the recent years. I will not discuss about them, but from what I have understood it is an obsolete system. This leads to problems, when a program would no longer build since it expects to find *.la
files that are no longer there.
For example, after a recent CRUX update, freetype
no longer ships its freetype.la
. Unfortunately, revdep
cannot identify which ports need to be rebuilt. The issue was discussed on #crux and I found the solution here.
That’s a wonderful script that will search for and recompile everything that is still looking for a missing *.la
file. I modified it a bit like this, so it accepts variable from input:
#!/bin/bash rebuild-lib() { prt-cache update -fr -if -im -is \ `for f in $(grep -lr "$*" /usr/lib/ 2> /dev/null | sed 's|.*/||'); \ do prt-get fsearch $f | grep '^Found in' | sed -e 's|.*/||' -e 's|:$||'; \ done | sort -u | xargs prt-cache isinst | grep -e 'is installed' | awk '{ print $2 }'`; } rebuild-lib "${1}"
So, for example to rebuild ports that miss freetype.la
I did:
prt-get cache
laRebuild.sh freetype.la
Great!