Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 2020 14:15:05 +0100 (CET)
From:      Jens Schweikhardt <schweikh@schweikhardt.net>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        Graham Perrin <grahamperrin@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: Identifying broken applications following careless use of make -DBATCH_DELETE_OLD_FILES delete-old-libs
Message-ID:  <2059585148.3686937.1607951705519.JavaMail.zimbra@schweikhardt.net>
In-Reply-To: <20201214093838.Horde.7MCNPdaO93VFac3VZjMk0BW@webmail.leidinger.net>
References:  <20201214093838.Horde.7MCNPdaO93VFac3VZjMk0BW@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2059585148.3686937.1607951705519.JavaMail.zimbra>