On Mon, Nov 10, 2025 at 07:26:05PM +0000, Gavin Smith wrote: > As far as I can tell, the issues with libtool/SWIG are not fixed on OpenBSD > and Cygwin. > > I saw there was some discussion on the libtool mailing list (between yourself > and Ileana Dumitrescu, the libtool maintainer) but no resolution of the issue.
Indeed. I have read more of the libtool documentation, and dlpreopen seemed to be a possible way to preload the needed libraries using a generic system, that could work for SWIG, and also potentially replace the use loading code in Texinfo/XSLoader.pm. However, I could not get dlpreopen to work on my debian platform for quite a simple case corresponding to our use case. > So on OpenBSD and Cygwin, the checks for SWIG in Texinfo's configure script, > which use the AX_PKG_SWIG macro in tta/m4/ax_pkg_swig.m4, will succeed, but > Texinfo's code using SWIG will not actually work, leading to build failures > like those experienced by Bruno. > > Unless we can add tests for the specific problems encountered by the SWIG > code on these platforms, We do have a test-case in gnu-texinfo/ci-scratch/test-libraries-dir evolved from your test case. It could be integrated similarly with tta/perl/CheckXS. This is not very satisfactory, but it should work. > we should disable SWIG by default in the Texinfo > build; otherwise, users will not be able to build Texinfo without specifying > the --without-swig flag. Disabling SWIG by default is another option, but, to me, the SWIG interface is an interesting feature, and therefore a bit of a pity to have it off in the default case on all the platforms. It seems to me that the best would be to understand how dlpreopen should be used to be able to test if it solves the issue (it may not), especially if there is a libtool bug somewhere that needs to be fixed. But this can only happen with help from libtool developpers. Otherwise, I do not have a well defined preference over the two other options. -- Pat
