Subject: libtool fails to run ldconfig correctly on GNU/Linux

From: Reuben Thomas <[email-masked]>
Date: Thu, 8 May 2025 16:51:50 +0100

I'm following up on
https://lists.gnu.org/archive/html/libtool/2014-05/msg00024.html

I just ran into the same problem: a user reported they had to run
`ldconfig` manually after running `[sudo] make install` on one of my
projects (Free Recode, formerly GNU Recode). I was surprised, as I thought
the autotools ran ldconfig automatically. They do! But on GNU/Linux systems
they run `ldconfig -n`, which does not update the cache, as it implies the
-N option. This means that libraries are not found after installation.

I checked git, and this usage goes back to the initial commit. I wonder
whether something changed since then. Mostly obviously, the -n flag causes
ldconfig to process only the directories specified on the command line,
which I guess is desirable. I can't see a way to update the cache while
retaining this behaviour of -n, but maybe that doesn't make sense?

Anyway, it seems that either we should simply remove the -n flag from the
ldconfig invocation (as on BSD), or document that users will most likely
need to run ldconfig themselves after installation (which seems a shame).

-- 
https://rrt.sc3d.org