Re: texi2any C code still built even though XS modules were disabled

[email protected]
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
On Sat, Jan 17, 2026 at 06:42:53PM +0000, Gavin Smith wrote:
> On Sat, Jan 17, 2026 at 07:23:12PM +0100, [email protected] wrote:
> > On Sat, Jan 17, 2026 at 11:47:37AM +0000, Gavin Smith wrote:
> > > If I run "./configure PERL_EXT_CC=failcc", this completes successfully
> > > and disables XS modules:
> > > 
> > > But then "make check" fails badly.
> > > 
> > > $ perl -w t/02coverage.t
> > > ok 1
> > > perl: symbol lookup error: t//../../C/.libs/libtexinfoxs.so.1: undefined symbol: newSVpv_utf8
> > > 
> > > According to the output of "TEXINFO_XS=debug perl -w t/02coverage.t", a large
> > > amount of C libraries and XS overrides are loaded anyway.
> > 
> > I just commited changes to avoid loading XS overrides when XS modules
> > are disabled at configure time.  I believe that the issue you reported
> > was there for a long time, maybe even since the first MiscXS modules.
> > It never showed in practice because the situation do not often arises,
> > and maybe we just did make clean when it happened, and because before
> > some point, with the C codes in libraries, the modules could be loaded
> > and used even if XS modules were disabled, and it would not have been
> > noticed unless one had TEXINFO_XS=debug set.
> 
> I thought it was disabled in Texinfo::XSLoader.  texi2any.pl sets
> $Texinfo::XSLoader::disable_XS if XS modules are disabled.  However,
> the tests under tta/perl/t don't use texi2any.pl.

See this commit:
https://cgit.git.savannah.gnu.org/cgit/texinfo.git/commit/?id=19cf2ac6fa4fb238257cc52a5df93f36ec4937c8

I added enable_xs to ModulePath.pm.in, a BEGIN block in test_utils.pl
and modified the existing texi2any.pl BEGIN block to set disable_XS too.

Now I realize that the tests in tta/perl/t/z_misc/*.t are not covered.
For some reason it did not show up in my test, I'll double check.

-- 
Pat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.