Deal with missing *.la files on CRUX

Many 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 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:

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 I did:

prt-get cache


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s