On 22/09/2025 01:51, Patrice Dumas wrote:
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.

This is an edge case for building and testing shared libraries locally
without installing on OpenBSD. The documentation does state that
--reorder-cache should be used before and after testing changes, but it
does not go into the details of what that means users need to do. I do
not think specifying whether root is required is necessary to add to the
libtool documentation, since libtool already uses ldconfig when
executing finish commands on several systems. However, I am happy to
review documentation update patches and apply them if it will help user
understanding.

--
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354

Attachment: OpenPGP_0x6570EA01146F7354.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to