Re: Identifying broken applications following careless use of make -DBATCH_DELETE_OLD_FILES delete-old-libs

From: Jens Schweikhardt <schweikh_at_schweikhardt.net>
Date: Mon, 14 Dec 2020 14:15:05 +0100 (CET)
Alexander,

it would seem that

find /usr/local/*bin* /usr/local/lib* -type f \
| xargs ldd -f '%p|%A\n' 2>/dev/null \
| grep '^not found' | cut -d '|' -f2 \
| xargs pkg which -q | sort -u

is prone to false positives, since ldd is sensitive to LD_LIBRARY_PATH, viz.:

$ find /usr/local/*bin* /usr/local/lib* -type f \
| xargs ldd -f '%p|%A\n' 2>/dev/null \
| grep '^not found' | cut -d '|' -f2 \
| xargs pkg which -q | sort -u
firefox-84.0_2,2

$ export LD_LIBRARY_PATH=/usr/local/lib/firefox
$ find /usr/local/*bin* /usr/local/lib* -type f \
| xargs ldd -f '%p|%A\n' 2>/dev/null \
| grep '^not found' | cut -d '|' -f2 \
| xargs pkg which -q | sort -u
$

So make sure you look into what exact library is missing and if
it's actually somewhere "non-standard",
that directory should be in LD_LIBRARY_PATH.

Jens
Received on Mon Dec 14 2020 - 12:15:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC