> From: Gavin Smith <gavinsmith0...@gmail.com> > Date: Sat, 30 Sep 2023 17:16:57 +0100 > Cc: platform-test...@gnu.org > > A pretest distribution for the next Texinfo release (7.1) has been > uploaded to > > https://alpha.gnu.org/gnu/texinfo/texinfo-7.0.93.tar.xz
This fails to build on MS-Windows with mingw.org's MinGW. First, I needed to add the missing dTHX in several places; patch below. After making those changes, the extensions compiled and linked, but Perl crashed while running this command: make[3]: Entering directory `/d/gnu/texinfo-7.0.93/doc' restore=: && backupdir=".am$$" && \ rm -rf $backupdir && mkdir $backupdir && \ if (TEXINFO_DEV_SOURCE=1 top_srcdir=".." top_builddir=".." /d/usr/Perl/bin/perl ../tp/texi2any --version) >/dev/null 2>&1; then \ for f in texinfo.info texinfo.info-[0-9] texinfo.info-[0-9][0-9] texinfo.i[0-9] texinfo.i[0-9][0-9]; do \ if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ if TEXINFO_DEV_SOURCE=1 top_srcdir=".." top_builddir=".." /d/usr/Perl/bin/perl ../tp/texi2any -c INFO_SPECIAL_CHARS_WARNING=0 -I . \ -o texinfo.info `test -f 'texinfo.texi' || echo './'`texinfo.texi; \ then \ rc=0; \ else \ rc=$?; \ $restore $backupdir/* `echo "./texinfo.info" | sed 's|[^/]*$||'`; \ fi; \ rm -rf $backupdir; exit $rc Makefile:1833: recipe for target `texinfo.info' failed make[3]: *** [texinfo.info] Error 5 The crash is inside parsetexi.dll, but I don't know where exactly. Any ideas how to debug this? Here's the patch I promised: --- tp/Texinfo/XS/xspara.c.~1~ 2023-08-14 21:47:01.000000000 +0300 +++ tp/Texinfo/XS/xspara.c 2023-10-07 15:48:18.903000000 +0300 @@ -242,6 +242,9 @@ xspara__print_escaped_spaces (char *stri { static TEXT t; char *p = string; + + dTHX; + text_reset (&t); while (*p) { @@ -566,6 +569,8 @@ xspara_get_pending (void) void xspara__add_pending_word (TEXT *result, int add_spaces) { + dTHX; + if (state.word.end == 0 && !state.invisible_pending_word && !add_spaces) return; @@ -641,6 +646,9 @@ char * xspara_end (void) { static TEXT ret; + + dTHX; + text_reset (&ret); state.end_line_count = 0; @@ -687,6 +695,8 @@ xspara_end (void) void xspara__add_next (TEXT *result, char *word, int word_len, int transparent) { + dTHX; + int disinhibit = 0; if (!word) return; --- tp/Texinfo/XS/parsetexi/api.c.~1~ 2023-08-14 23:12:04.000000000 +0300 +++ tp/Texinfo/XS/parsetexi/api.c 2023-10-07 15:50:23.496750000 +0300 @@ -158,6 +158,8 @@ reset_parser_except_conf (void) void reset_parser (int debug_output) { + dTHX; + /* NOTE: Do not call 'malloc' or 'free' in this function or in any function called in this file. Since this file (api.c) includes the Perl headers, we get the Perl redefinitions, which we do not want, as we don't use