Re: trouble with finding libraries linked against dlopened object on some platforms

Patrice Dumas <[email protected]> Mon, 22 Sep 2025 00:51:01 +0200
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
Hello,

Thanks for your pointers.

On Wed, Sep 10, 2025 at 05:45:34PM +0300, Ileana Dumitrescu wrote:
> here are my thoughts:
> - OpenBSD likely needs to utilize the commands [1] that you found. Here
> is a test case in libtool that utilizes it [2], which was developed for
> testing local programs and libraries.
> 
> [1]
> https://www.gnu.org/software/libtool/manual/libtool.html#Invoking-libtool
> [2]
> https://cgit.git.savannah.gnu.org/cgit/libtool.git/tree/tests/bug_71489.at

The test case is indeed useful for understanding how to use the option.
It is not clear from the documentation, nor from the example, however,
whether --reorder-cache can be called as a non-root user, whether it is
system-wide or not, whether it lasts or not, and if it is useful for
installation.

I have read the ldconfig OpenBSD man page from there:
 http://man.openbsd.org/ldconfig.8

There is no information whether it should be run as root or not.
According to my test on OpenBSD 7.7 it should (and it makes more sense
to me).

I am curious to understand why the test does not fail, in that case, as
in general the test should not be run as root?

From the man page, the change is system-wide, and should last at least
until the next reboot, but will not last more if the /var/run directory
is not saved between reboots.

It seems to me that some of this information should be in the libtool
documentation, namely I think that:
* it should be said that there is a need to have root/enough privileges
* it seems to me that it is not really fit for having the libraries
  found after installing as in some cases (if the /var/run directory
  is not saved), the change is temporary.
* it should be said that the change is system-wide, and to cleanup the
  directories should be removed and the command rerun (without
  argument?)

If this is agreed, I could propose some changes to the documentation.

-- 
Pat