> From: Gavin Smith <gavinsmith0...@gmail.com>
> Date: Sun, 10 Nov 2024 19:21:57 +0000
> Cc: platform-test...@gnu.org
> 
> A pretest distribution for the next Texinfo release (7.2) has been
> uploaded to
> 
> https://alpha.gnu.org/gnu/texinfo/texinfo-7.1.91.tar.xz

I tried to build this with mingw.org's MinGW, and encountered quite a
few problems:

1. Warning during compilation of TestXS by configure script:

     libtool: compile:  d:/usr/bin/gcc.exe -DHAVE_CONFIG_H -I. -I. 
-DDATADIR=\"d:/usr/share\" -DSYSCONFDIR=\"d:/usr/etc\" -DVERSION=\"7.1.91\" 
-DXS_VERSION=\"7.1.91\" -ID:/usr/Perl/lib/CORE -Id:/usr/include -s -O2 -DWIN32 
-DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT 
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s 
-O2 -MT TestXS_la-TestXS.lo -MD -MP -MF .deps/TestXS_la-TestXS.Tpo -c TestXS.c  
-DDLL_EXPORT -DPIC -o .libs/TestXS_la-TestXS.o
     In file included from D:/usr/Perl/lib/CORE/win32thread.h:4,
                      from D:/usr/Perl/lib/CORE/perl.h:2690,
                      from TestXS.xs:5:
     D:/usr/Perl/lib/CORE/win32.h:273:1: warning: useless type name in empty 
declaration

       273 | typedef long  uid_t;
           | ^~~~~~~
     D:/usr/Perl/lib/CORE/win32.h:274:1: warning: useless type name in empty 
declaration

       274 | typedef long  gid_t;
           | ^~~~~~~

   This is because tp/Texinfo/XS/config.h does:

     #define uid_t int
     #define gid_t int

   and D:/usr/Perl/lib/CORE/win32.h does:

     #ifdef __MINGW32__         /* Minimal Gnu-Win32 */

     typedef long               uid_t;
     typedef long               gid_t;

   So basically what tp/Texinfo/XS/config.h does is unnecessary and
   triggers a useless warning.

   As an attempt to fix: replace #define with typedef's, in
   XS/config.h, exactly as Perl does:

     typedef long uid_t;
     typedef long gid_t;
   

2. Compilation error:

     libtool: compile:  d:/usr/bin/gcc.exe -DHAVE_CONFIG_H -I. -I../.. 
-DDEFAULT_TEXT_DOMAIN=\"texinfo_tp-gnulib\" -Id:/usr/include -Wno-cast-qual 
-Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef 
-Wno-unused-function -Wno-unused-parameter -Wno-float-conversion 
-Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits 
-Wno-unused-const-variable -Wno-unsuffixed-float-constants -MT 
libgnu_la-getgroups.lo -MD -MP -MF .deps/libgnu_la-getgroups.Tpo -c getgroups.c 
 -DDLL_EXPORT -DPIC -o .libs/libgnu_la-getgroups.o
     getgroups.c:33:1: error: conflicting types for 'getgroups'
        33 | getgroups (_GL_UNUSED int n, _GL_UNUSED GETGROUPS_T *groups)
           | ^~~~~~~~~
     In file included from getgroups.c:22:
     ./unistd.h:1831:1: note: previous declaration of 'getgroups' was here
      1831 | _GL_FUNCDECL_SYS (getgroups, int,
           | ^~~~~~~~~~~~~~~~

   Solution: define GETGROUPS_T in XS/config.h as 'long', to be
   consistent with gid_t:

     #define GETGROUPS_T long

3. Function redefinition warnings compiling MiscXS.  Here's one example:

     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:497: warning: "mkdir" redefined
       497 | #    define mkdir  PerlDir_mkdir
           |
     In file included from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/sys/stat.h:1230: note: this is the location of the previous 
definition

      1230 | #   define mkdir rpl_mkdir
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:498: warning: "chdir" redefined
       498 | #    define chdir  PerlDir_chdir
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:890: note: this is the location of the previous 
definition
       890 | #   define chdir _chdir
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:499: warning: "rmdir" redefined
       499 | #    define rmdir  PerlDir_rmdir
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:2638: note: this is the location of the previous 
definition
      2638 | #   define rmdir _rmdir
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:539: warning: "access" redefined
       539 | #    define access  PerlLIO_access
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:825: note: this is the location of the previous 
definition
       825 | #   define access rpl_access
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:540: warning: "chmod" redefined
       540 | #    define chmod  PerlLIO_chmod
           |
     In file included from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/sys/stat.h:1003: note: this is the location of the previous 
definition

      1003 | #   define chmod _chmod
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:542: warning: "close" redefined
       542 | #    define close  PerlLIO_close
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:937: note: this is the location of the previous 
definition
       937 | #   define close rpl_close
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:543: warning: "dup" redefined
       543 | #    define dup   PerlLIO_dup
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:1041: note: this is the location of the previous 
definition
      1041 | #   define dup _dup
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:544: warning: "dup2" redefined
       544 | #    define dup2  PerlLIO_dup2
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:1059: note: this is the location of the previous 
definition
      1059 | #   define dup2 rpl_dup2
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:546: warning: "fstat" redefined
       546 | #    define fstat  PerlLIO_fstat
           |
     In file included from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/sys/stat.h:1048: note: this is the location of the previous 
definition

      1048 | #   define fstat rpl_fstat
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:548: warning: "isatty" redefined
       548 | #    define isatty  PerlLIO_isatty
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:2214: note: this is the location of the previous 
definition
      2214 | #   define isatty _isatty
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:550: warning: "lseek" redefined
       550 | #    define lseek  PerlLIO_lseek
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:2357: note: this is the location of the previous 
definition
      2357 | #   define lseek _lseek
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:551: warning: "lstat" redefined
       551 | #    define lstat  PerlLIO_lstat
           |
     In file included from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/sys/stat.h:1454: note: this is the location of the previous 
definition

      1454 | #   define lstat stat
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:553: warning: "open" redefined
       553 | #    define open  PerlLIO_open
           |
     In file included from D:/usr/Perl/lib/CORE/win32.h:164,
                      from D:/usr/Perl/lib/CORE/win32thread.h:4,
                      from D:/usr/Perl/lib/CORE/perl.h:2690,
                      from misc.c:39:
     ./gnulib/lib/fcntl.h:708: note: this is the location of the previous 
definition
       708 | #   define open rpl_open
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:554: warning: "read" redefined
       554 | #    define read  PerlLIO_read
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:2510: note: this is the location of the previous 
definition
      2510 | #   define read _read
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:557: warning: "stat" redefined
       557 | #    define stat(buf,sb) PerlLIO_stat(buf,sb)
           |
     In file included from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/sys/stat.h:1430: note: this is the location of the previous 
definition

      1430 | #    define stat(name, st) rpl_stat (name, st)
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:559: warning: "umask" redefined
       559 | #    define umask  PerlLIO_umask
           |
     In file included from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/sys/stat.h:1496: note: this is the location of the previous 
definition

      1496 | #   define umask _umask
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:560: warning: "unlink" redefined
       560 | #    define unlink  PerlLIO_unlink
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:2903: note: this is the location of the previous 
definition
      2903 | #   define unlink _unlink
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:562: warning: "write" redefined
       562 | #    define write  PerlLIO_write
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:2986: note: this is the location of the previous 
definition
      2986 | #   define write _write
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:563: warning: "malloc" redefined
       563 | #    define malloc  PerlMem_malloc
           |
     In file included from misc.c:19:
     ./gnulib/lib/stdlib.h:1276: note: this is the location of the previous 
definition
      1276 | #   define malloc rpl_malloc
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:564: warning: "realloc" redefined
       564 | #    define realloc  PerlMem_realloc
           |
     In file included from misc.c:19:
     ./gnulib/lib/stdlib.h:2049: note: this is the location of the previous 
definition
      2049 | #   define realloc rpl_realloc
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:569: warning: "execl" redefined
       569 | #    define execl  PerlProc_execl
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:1224: note: this is the location of the previous 
definition
      1224 | #   define execl _execl
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:570: warning: "execv" redefined
       570 | #    define execv  PerlProc_execv
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:1332: note: this is the location of the previous 
definition
      1332 | #   define execv _execv
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:571: warning: "execvp" redefined
       571 | #    define execvp  PerlProc_execvp
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:1409: note: this is the location of the previous 
definition
      1409 | #   define execvp _execvp
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:591: warning: "getpid" redefined
       591 | #    define getpid  PerlProc_getpid
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:2081: note: this is the location of the previous 
definition
      2081 | #   define getpid _getpid
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:592: warning: "gettimeofday" redefined
       592 | #    define gettimeofday PerlProc_gettimeofday
           |
     In file included from d:\usr\include\winsock.h:82,
                      from d:\usr\include\winsock2.h:69,
                      from D:/usr/Perl/lib/CORE/sys/socket.h:24,
                      from D:/usr/Perl/lib/CORE/win32.h:397,
                      from D:/usr/Perl/lib/CORE/win32thread.h:4,
                      from D:/usr/Perl/lib/CORE/perl.h:2690,
                      from misc.c:39:
     ./gnulib/lib/sys/time.h:642: note: this is the location of the previous 
definition
       642 | #   define gettimeofday rpl_gettimeofday
           |
     In file included from misc.c:44:
     D:/usr/Perl/lib/CORE/XSUB.h:607: warning: "gethostname" redefined
       607 | #    define gethostname  PerlSock_gethostname
           |
     In file included from ./gnulib/lib/time.h:51,
                      from ./gnulib/lib/sys/stat.h:51,
                      from D:/usr/Perl/lib/CORE/perl.h:1054,
                      from misc.c:39:
     ./gnulib/lib/unistd.h:1877: note: this is the location of the previous 
definition
      1877 | #  define gethostname 
gethostname_used_without_requesting_gnulib_module_gethostname
           |

4. Compilation error in api_to_perl.c:

     In file included from D:/usr/Perl/lib/CORE/perl.h:5056,
                      from main/api_to_perl.c:23:
     D:/usr/Perl/lib/CORE/embedvar.h:58:23: error: expected ')' before '->' 
token
        58 | #define PL_Mem   (vTHX->IMem)
           |                       ^~
     In file included from D:/usr/Perl/lib/CORE/perl.h:3277,
                      from main/api_to_perl.c:23:
     D:/usr/Perl/lib/CORE/iperlsys.h:813:10: error: expected ')' before '->' 
token
       813 |  (*PL_Mem->pFree)(PL_Mem, (buf))
           |          ^~
     Makefile:3749: recipe for target `main/libtexinfo_la-api_to_perl.lo' failed

Here I gave up.

Let me know if you'd like me to provide more information or to test
some fixes.

Btw, an additional annoyance when unpacking the tarball of this
pretest is that it creates files with non-ASCII characters that any
Windows commands cannot delete.  I needed to look for a suitable tool
which would be up to the job; 3 out of 4 tools failed.  I wonder if
this could be avoided in some way.

Reply via email to