On Sat, Aug 30, 2025 at 08:59:04PM +0200, Patrice Dumas wrote:
> On Sat, Aug 30, 2025 at 08:19:03PM +0300, Eli Zaretskii wrote:
> > > It reproduces Gavin findings on OpenBSD. To reproduce the failure of
> > > cygwin (and mingw on cygwin) I added a variant where the second library
> > > is in a different directory than the dlopened library, which is more
> > > like the actual situation of Texinfo. This is consistent with what Eli
> > > explained on how libraries are found in windows.
> >
> > Can you modify the tests to use the absolute file name of the dynamic
> > libraries? Then I believe there should be no problems for dlopen to
> > find the libraries.
>
> I modified Gavin code to try both the absolute and the relative path for
> the dlopened library. But the problem is not for the dlopened library,
> the problem is with the second library, which the dlopened library is
> linked to.
I used the absolute file name because of the following in "man dlopen" on
OpenBSD:
The path parameter can be specified as either an absolute pathname to a
shared library or just the name of the shared library itself. When an
absolute pathname is specified, only the path provided will be searched
for the shared library. When just a shared library is specified, the
same paths will be searched that are used for "intrinsic" shared library
searches.