On Wed, Nov 20, 2024 at 07:10:08PM +0000, Gavin Smith wrote: > On Wed, Nov 20, 2024 at 06:57:11PM +0000, Gavin Smith wrote: > > I don't know, would it be possible to load libtexinfo and libtexinfoxs > > directly with Texinfo::XSLoader before loading any other modules? > > Then these libraries are in the "address space" of the perl process and > > shouldn't need to be loaded again. I am going to try to do this as it > > seems like it could be an easy fix. > > This does indeed seem like a possibility. When I patch Texinfo/XSLoader.pm > to add the lines: > > BEGIN { > if (1) { > > DynaLoader::dl_load_file("/home/gavin/texinfo-7.1.91/build/tp/Texinfo/XS/.libs/libtexinfo.so.0.0"); > > DynaLoader::dl_load_file("/home/gavin/texinfo-7.1.91/build/tp/Texinfo/XS/.libs/libtexinfoxs.so.0.0"); > } > } > > the XS modules all load fine.
Further to this, we'd previously discussed the danger of the wrong libtexinfo library being loaded if a "libtexinfo" library was installed elsewhere (see below). In my report, I had LD_LIBRARY_PATH set which was causing the issue, but in any case, locating and loading "libtexinfo.so" in texi2any directly would eliminate any risk of either not finding the file, or finding the wrong file. From: Gavin Smith Subject: Re: Code from installed libtexinfo.so.0 run for non-installed texi2any Date: Mon, 6 Nov 2023 18:15:18 +0000 > But is looking under /usr/local/lib > first - not good really, as if the user installs some other libtexinfoxs.so > library in /usr/local/lib, completely the wrong library might be loaded. (https://lists.gnu.org/archive/html/bug-texinfo/2023-11/msg00045.html) Follow-up in https://lists.gnu.org/archive/html/bug-texinfo/2024-02/msg00052.html