bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: texinfo-6.8.90 pretest


From: Gavin Smith
Subject: Re: texinfo-6.8.90 pretest
Date: Sat, 22 Oct 2022 11:54:47 +0100

On Sat, Oct 22, 2022 at 11:57:36AM +0300, Eli Zaretskii wrote:
> I tried to build this with mingw.org's MinGW on native MS-Windows; the
> build failed.  Details below.
> 
> First, I had warnings like this one:
> 
>      libtool: compile:  d:/usr/bin/gcc.exe -DHAVE_CONFIG_H -I. -I. 
> -I./gnulib/lib -I./gnulib/lib -DDATADIR=\"d:/usr/share\" -s -O2 -DWIN32 
> -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT 
> -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields 
> -s -O2 -DVERSION=\"0\" -DXS_VERSION=\"0\" -ID:/usr/Perl/lib/CORE -MT 
> XSParagraph.lo -MD -MP -MF .deps/XSParagraph.Tpo -c XSParagraph.c  
> -DDLL_EXPORT -DPIC -o .libs/XSParagraph.o
>      In file included from XSParagraph.xs:8:
>      D:/usr/Perl/lib/CORE/XSUB.h:506: warning: "putenv" redefined
>        506 | #    define putenv  PerlEnv_putenv
>          |
>      In file included from D:/usr/Perl/lib/CORE/perl.h:766,
>                     from XSParagraph.xs:7:
>      ./gnulib/lib/stdlib.h:1374: note: this is the location of the previous 
> definition
>       1374 | #   define putenv _putenv
>          |
>      In file included from XSParagraph.xs:8:
>      D:/usr/Perl/lib/CORE/XSUB.h:524: warning: "fdopen" redefined
>        524 | #    define fdopen  PerlSIO_fdopen
>          |
>      In file included from D:/usr/Perl/lib/CORE/win32.h:160,
>                     from D:/usr/Perl/lib/CORE/win32thread.h:4,
>                     from D:/usr/Perl/lib/CORE/perl.h:2690,
>                     from XSParagraph.xs:7:
>      ./gnulib/lib/stdio.h:820: note: this is the location of the previous 
> definition
>        820 | #    define fdopen _fdopen
>          |
>      In file included from XSParagraph.xs:8:
>      D:/usr/Perl/lib/CORE/XSUB.h:552: warning: "mktemp" redefined
>        552 | #    define mktemp  PerlLIO_mktemp
>          |
>      In file included from D:/usr/Perl/lib/CORE/perl.h:766,
>                     from XSParagraph.xs:7:
>      ./gnulib/lib/stdlib.h:1241: note: this is the location of the previous 
> definition
>       1241 | #   define mktemp _mktemp
>          |
>      In file included from XSParagraph.xs:8:
>      D:/usr/Perl/lib/CORE/XSUB.h:565: warning: "free" redefined
>        565 | #    define free  PerlMem_free
>          |
>      In file included from D:/usr/Perl/lib/CORE/perl.h:766,
>                     from XSParagraph.xs:7:
>      ./gnulib/lib/stdlib.h:737: note: this is the location of the previous 
> definition
> 
>        737 | #   define free rpl_free
>          |
> 
> I don't understand why this happens now whereas it didn't happen in
> Texinfo-6.8; both XSParagraph.xs and Gnulib's stdlib.h seem to be
> identical in both versions of Texinfo.  I fixed this temporarily by
> adding the following in XSParagraph.c (the actual change should
> probably be in XSParagraph.xs instead):

Note that stdlib.h is a generated file, from stdlib.in.h.  I can't
tell why there is a difference from Texinfo 6.8.  Some possibilities
are differences in configure script decisions and changes in gnulib
modules.  I know one change was that wcwidth was added as a gnulib
module for the XS code but it's hard to know if that was responsible.

There have been similar warnings before:

https://lists.gnu.org/archive/html/bug-texinfo/2016-02/msg00036.html
https://lists.gnu.org/archive/html/bug-texinfo/2016-08/msg00021.html

Note especially the warnings about realloc:

>     In file included from XSParagraph.xs:8:0:
>     D:/usr/Perl/lib/CORE/XSUB.h:564:0: warning: "realloc" redefined [enabled 
>by default]
>      #    define realloc  PerlMem_realloc
>      ^
>     In file included from D:/usr/Perl/lib/CORE/perl.h:766:0,
>                      from XSParagraph.xs:7:
>     ./lib/stdlib.h:1060:0: note: this is the location of the previous 
>definition
>      #   define realloc rpl_realloc
>      ^

which seems to be exactly the same issue.

At the time the gnulib developers agreed to make a change to stop
the warning:

https://lists.gnu.org/archive/html/bug-texinfo/2016-08/msg00023.html

It would take investigating each of the redefined functions, and whether
they need to be redefined by the Gnulib modules in use, to have similar
fixes this time.  Or the simpler fix is to #undef them all, as you did.

I believe it is the Perl versions we should be using, not the Gnulib
versions, in the case of any conflict.  We don't appear to use any of
the redefined functions in xspara.c or api.c (putenv, fdopen, mktemp),
apart from 'free'.  However, warnings about redefinitions like these
do cause worry.

I feel use of Gnulib should be kept to a minimum for the XS modules,
although it's hard to know without trying removing modules what is
causing e.g. putenv to be redefined.

> The next problem is in api.c: several functions were missing the dTHX
> thingy.  Here's the patch:

Thanks, applied.


> And now for the final blow: while building texinfo.info, I get this
> error message:
> 
>      Can't locate I18N/Langinfo.pm in @INC (you may need to install the 
> I18N::Langinfo module) (@INC contains: d:/usr/Perl/site/lib d:/usr/Perl/lib 
> .) at ../tp/texi2any line 29.
>      BEGIN failed--compilation aborted at ../tp/texi2any line 29.
>      Makefile:1547: recipe for target `texinfo.info' failed
>      make[3]: *** [texinfo.info] Error 2

I'm optimistic that this can be fixed - we can check for the module
when texi2any is run and make accommodations if it can't be loaded.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]