Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.98k stars 560 forks source link

Failures building Perl 5.32.1 on HP-UX (hpia11.31) - configpm fails to create Config files #19151

Open lmcne opened 3 years ago

lmcne commented 3 years ago

Description

Building Perl 5.32.1 on an hpia11.31 system fails during execution of configpm: lib/Config.pm, lib/Config_heavy.pl, and lib/Config.pod are not generated and hence are unavailable to the later steps of the build process.

Errors reported from build process:

makefile:272: recipe for target 'lib/Config_git.pl' failed
gmake-4.1[2]: *** [lib/Config_git.pl] Error 248
gmake-4.1[2]: *** Waiting for unfinished jobs....
./miniperl -Ilib pod/perlmodlib.PL -q
'$VERSION' is not a valid variable name at /home/lmcnerne/sandbox/perl32/src/perl/hpia11.31/perl-5.32.1/cpan/Text-Tabs/lib/Text/Wrap.pm line 15.
BEGIN failed--compilation aborted at /home/lmcnerne/sandbox/perl32/src/perl/hpia11.31/perl-5.32.1/cpan/Text-Tabs/lib/Text/Wrap.pm line 15.
Compilation failed in require at ./regen/regen_lib.pl line 6.
BEGIN failed--compilation aborted at ./regen/regen_lib.pl line 6.
Compilation failed in require at pod/perlmodlib.PL line 16.
makefile:409: recipe for target 'pod/perlmodlib.pod' failed
gmake-4.1[2]: *** [pod/perlmodlib.pod] Error 255
./miniperl -Ilib autodoc.pl
'$VERSION' is not a valid variable name at /home/lmcnerne/sandbox/perl32/src/perl/hpia11.31/perl-5.32.1/cpan/Text-Tabs/lib/Text/Wrap.pm line 15.
BEGIN failed--compilation aborted at /home/lmcnerne/sandbox/perl32/src/perl/hpia11.31/perl-5.32.1/cpan/Text-Tabs/lib/Text/Wrap.pm line 15.
Compilation failed in require at ./regen/regen_lib.pl line 6.
BEGIN failed--compilation aborted at ./regen/regen_lib.pl line 6.
Compilation failed in require at autodoc.pl line 35.
makefile:406: recipe for target 'pod/perlintern.pod' failed
gmake-4.1[2]: *** [pod/perlintern.pod] Error 255
gmake-4.1[2]: Leaving directory '/home/lmcnerne/sandbox/perl32/src/perl/hpia11.31/perl-5.32.1'
From /home/lmcnerne/sandbox/perl32/src/perl/hpia11.31: ( cd perl-5.32.1 ; /net/nbstore/vol/tools/bin/gmake-4.1 ) failed: 2
../Build:68: recipe for target 'make_make.txt' failed
gmake-4.1[1]: *** [make_make.txt] Error 2
gmake-4.1[1]: Leaving directory '/home/lmcnerne/sandbox/perl32/src/perl/hpia11.31'
/home/lmcnerne/sandbox/perl32/src/nbbuild/Build.platforms:117: recipe for target 'all' failed
gmake-4.1: *** [all] Error 2

6 make errors detected by /home/lmcnerne/sandbox/perl32/src/nbbuild/scripts/filter-errors.pl
/home/lmcnerne/sandbox/perl32/src/perl/hpia11.31/perl-5.32.1
        gmake-4.1[2]: *** [lib/Config_git.pl] Error 248
        gmake-4.1[2]: *** Waiting for unfinished jobs....
        gmake-4.1[2]: *** [pod/perlmodlib.pod] Error 255
        gmake-4.1[2]: *** [pod/perlintern.pod] Error 255
        gmake-4.1[1]: *** [make_make.txt] Error 2
        gmake-4.1: *** [all] Error 2

Expected behavior

Completing a successful build of Perl 5.32.1 on HP-UX (hpia11.31).

Additional Info

This seems to be related to the regex parser used during the build process: make_patchnum.pl fails because a regex intended to pull the filename from a heredoc instead returns the entire heredoc as the filename:

./miniperl -Ilib make_patchnum.pl
Failed to open for write './lib/Config_git.pl' is generated by make_patchnum.pl
#          DO NOT EDIT DIRECTLY - edit make_patchnum.pl instead   
######################################################################
$Config::Git_Data=<<'ENDOFGIT';
git_commit_id=''
git_describe=''    
git_branch=''
git_uncommitted_changes=''
git_commit_id_title='':File name too long at make_patchnum.pl line 84.

Manually getting past that, configpm exhibits the same issue: regex evaluations to extract variable headers fail in 5.32.1 where they succeed in 5.28.1. Sample output:

Expected a Configure variable header, instead we got:
_exe (Unix.U):
    This variable defines the extension used for executable files.
    DJGPP, Cygwin and OS/2 use '.exe'.  Stratus VOS uses '.pm'.
    On operating systems which do not require a specific extension
    for executable files, this variable is empty.

Compiler info:

bash-4.0$ /opt/aCC/bin/cc --version
cc: HP C/aC++ B3910B A.06.20 [May 13 2008]

Some warnings are reported building regexec.c, but they seem consistent with warnings reported when building 5.28.1 on the same host with the same toolchain: I don't see anything here that suggests it doesn't work.

Build command and output for regexec.c:

cc -c -DPERL_CORE -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -D_INCLUDE__STDC_A1_SOURCE -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit regexec.c
"regexec.c", line 523: warning #2111-D: statement is unreachable
      return FALSE; /* Things like CNTRL are always below 256 */
      ^

"regexec.c", line 1472: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
          const U8* const str = (U8*)STRING(progi->regstclass);
                                     ^

"regexec.c", line 1477: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
                          ? (SSize_t)utf8_distance(str + STR_LEN(progi->regstclass), str)
                                     ^

"regexec.c", line 1478: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
                          : (SSize_t)STR_LEN(progi->regstclass))
                                     ^

"regexec.c", line 2160: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
              REXEC_FBC_CLASS_SCAN(0, ANYOF_BITMAP_TEST(c, *((U8*)s)));
              ^

"regexec.c", line 2167: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
          REXEC_FBC_FIND_NEXT_SCAN(0,
          ^

"regexec.c", line 2174: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
          REXEC_FBC_FIND_NEXT_SCAN(utf8_target,
          ^

"regexec.c", line 2212: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_anyofhs *" may cause misaligned access
                     && memEQ(s, ((struct regnode_anyofhs *) c)->string, FLAGS(c))
                                  ^

"regexec.c", line 2219: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_CLASS_SCAN(TRUE,
              ^

"regexec.c", line 2219: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_CLASS_SCAN(TRUE,
              ^

"regexec.c", line 2227: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_CLASS_SCAN(0, withinCOUNT((U8) *s,
              ^

"regexec.c", line 2227: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_CLASS_SCAN(0, withinCOUNT((U8) *s,
              ^

"regexec.c", line 2238: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_FIND_NEXT_UTF8_BYTE_SCAN(first_byte,
              ^

"regexec.c", line 2238: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_FIND_NEXT_UTF8_BYTE_SCAN(first_byte,
              ^

"regexec.c", line 2245: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_CLASS_SCAN(0, withinCOUNT((U8) *s,
              ^

"regexec.c", line 2245: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              REXEC_FBC_CLASS_SCAN(0, withinCOUNT((U8) *s,
              ^

"regexec.c", line 2898: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              reg_ac_data *aho = (reg_ac_data*)progi->data->data[ ARG( c ) ];
                                                                  ^

"regexec.c", line 2936: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
                      bitmap=(U8*)ANYOF_BITMAP(c);
                                  ^

"regexec.c", line 4190: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
      SV *sv_dat= MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
                  ^

"regexec.c", line 4278: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
      U8 *pat = (U8*)STRING(text_node);

"regexec.c", line 4479: warning #2111-D: statement is unreachable
                          NOT_REACHED; /* NOTREACHED */
                          ^

"regexec.c", line 5920: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 5926: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 5968: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
                  && ! ANYOF_BITMAP_TEST(scan, nextchr))
                       ^

"regexec.c", line 5975: warning #2111-D: statement is unreachable
                  NOT_REACHED; /* NOTREACHED */
                  ^

"regexec.c", line 6029: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                    = (reg_trie_data*)rexi->data->data[ ARG( scan ) ];
                                                        ^

"regexec.c", line 6030: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                HV * widecharmap = MUTABLE_HV(rexi->data->data[ ARG( scan ) + 1 ]);
                                   ^

"regexec.c", line 6177: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 6207: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                    = ((reg_trie_data*)rexi->data->data[ARG(ST.me)])->wordinfo;
                                                        ^

"regexec.c", line 6231: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                    = (reg_trie_data*)rexi->data->data[ARG(ST.me)];
                                                       ^

"regexec.c", line 6297: warning #2111-D: statement is unreachable
                NOT_REACHED; /* NOTREACHED */
                ^

"regexec.c", line 6334: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
            s = STRINGl(scan);
                ^

"regexec.c", line 6335: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
            ln = STR_LENl(scan);
                 ^

"regexec.c", line 6846: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
                  if (! ANYOF_BITMAP_TEST(scan, * (U8 *) (locinput))) {
                        ^

"regexec.c", line 6863: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  || (UCHARAT(locinput) & FLAGS(scan)) != ARG(scan)
                                                          ^

"regexec.c", line 6873: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  || (UCHARAT(locinput) & FLAGS(scan)) == ARG(scan)
                                                          ^

"regexec.c", line 6923: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_anyofhs *" may cause misaligned access
                  ||   memNE(locinput, ((struct regnode_anyofhs *) scan)->string, FLAGS(scan))
                                        ^

"regexec.c", line 6939: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     || ! withinCOUNT(utf8_to_uvchr_buf((U8 *) locinput,
                          ^

"regexec.c", line 6939: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     || ! withinCOUNT(utf8_to_uvchr_buf((U8 *) locinput,
                          ^

"regexec.c", line 6948: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  if (! withinCOUNT((U8) *locinput,
                        ^

"regexec.c", line 6948: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  if (! withinCOUNT((U8) *locinput,
                        ^

"regexec.c", line 6964: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                      || ! withinCOUNT(utf8_to_uvchr_buf((U8 *) locinput,
                           ^

"regexec.c", line 6964: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                      || ! withinCOUNT(utf8_to_uvchr_buf((U8 *) locinput,
                           ^

"regexec.c", line 6973: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  if (! withinCOUNT((U8) *locinput,
                        ^

"regexec.c", line 6973: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  if (! withinCOUNT((U8) *locinput,
                        ^

"regexec.c", line 7292: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
            n = ARG(scan);  /* which paren pair */
                ^

"regexec.c", line 7362: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              arg= (U32)ARG(scan);
                        ^

"regexec.c", line 7374: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_2L *" may cause misaligned access
              startpoint = scan + ARG2L(scan);
                                  ^

"regexec.c", line 7435: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                n = ARG(scan);
                    ^

"regexec.c", line 7675: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_2L *" may cause misaligned access
                                      ARG2L(scan),
                                      ^

"regexec.c", line 7743: warning #2111-D: statement is unreachable
                NOT_REACHED; /* NOTREACHED */
                ^

"regexec.c", line 7830: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
            n = ARG(scan);  /* which paren pair */
                ^

"regexec.c", line 7852: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
            n = ARG(scan);  /* which paren pair */
                ^

"regexec.c", line 7872: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  sv_yes_mark = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
                                ^

"regexec.c", line 7873: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_2L *" may cause misaligned access
              if (ARG2L(scan)){
                  ^

"regexec.c", line 7880: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                          n = ARG(cursor);
                              ^

"regexec.c", line 7884: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                              if ( n == ARG(scan) || EVAL_CLOSE_PAREN_IS(cur_eval, n) )
                                        ^

"regexec.c", line 7894: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
            n = ARG(scan);  /* which paren pair */
                ^

"regexec.c", line 7904: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              n = ARG(scan);
                  ^
"regexec.c", line 7919: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                next = scan + ARG(scan);
                              ^

"regexec.c", line 8021: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                next += ARG(next);
                        ^

"regexec.c", line 8044: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8050: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8056: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8093: warning #2111-D: statement is unreachable
                NOT_REACHED; /* NOTREACHED */
                ^

"regexec.c", line 8201: warning #2111-D: statement is unreachable
                NOT_REACHED; /* NOTREACHED */
                ^

"regexec.c", line 8213: warning #2111-D: statement is unreachable
                NOT_REACHED; /* NOTREACHED */
                ^

"regexec.c", line 8217: warning #2111-D: statement is unreachable
        NOT_REACHED; /* NOTREACHED */
        ^

"regexec.c", line 8223: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8230: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8240: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8265: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8296: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8302: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
            next = scan + ARG(scan);
                          ^

"regexec.c", line 8323: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8327: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  ? MUTABLE_SV(rexi->data->data[ ARG( scan ) ])
                    ^

"regexec.c", line 8331: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^

"regexec.c", line 8339: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^

"regexec.c", line 8343: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^

"regexec.c", line 8409: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8457: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                if (HAS_TEXT(ST.B) || JUMPABLE(ST.B)) {
                                      ^

"regexec.c", line 8460: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                        FIND_NEXT_IMPT(text_node);
                        ^

"regexec.c", line 8460: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                        FIND_NEXT_IMPT(text_node);
                        ^

"regexec.c", line 8534: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8620: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              if (! HAS_TEXT(next) && ! JUMPABLE(next)) {
                                        ^

"regexec.c", line 8627: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                    FIND_NEXT_IMPT(text_node);
                    ^

"regexec.c", line 8627: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                    FIND_NEXT_IMPT(text_node);
                    ^

"regexec.c", line 8708: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8835: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 8863: warning #2111-D: statement is unreachable
                    NOT_REACHED; /* NOTREACHED */
                    ^

"regexec.c", line 8993: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  next = scan + ARG(scan);
                                ^

"regexec.c", line 9007: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 9042: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
            scan = ST.me + ARG(ST.me);
                           ^

"regexec.c", line 9052: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
            next = scan + ARG(scan);
                          ^

"regexec.c", line 9063: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                sv_yes_mark = sv_commit = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
                                          ^

"regexec.c", line 9066: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 9072: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^
"regexec.c", line 9076: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  sv_commit = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
                              ^

"regexec.c", line 9086: warning #2111-D: statement is unreachable
            NOT_REACHED; /* NOTREACHED */
            ^

"regexec.c", line 9092: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
                    ^

"regexec.c", line 9097: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^

"regexec.c", line 9102: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^

"regexec.c", line 9122: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^

"regexec.c", line 9136: warning #4232-D: conversion from "regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                  SV *find = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
                             ^

"regexec.c", line 9169: warning #2111-D: statement is unreachable
              NOT_REACHED; /* NOTREACHED */
              ^

"regexec.c", line 9508: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
        string = (U8 *) STRINGl(p);
                        ^

"regexec.c", line 9509: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_lstring *" may cause misaligned access
          str_len = STR_LENl(p);
                    ^

"regexec.c", line 9736: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
            while (scan < this_eol && ANYOF_BITMAP_TEST(p, *((U8*)scan)))
                                      ^

"regexec.c", line 9750: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
          scan = (char *) find_span_end_mask((U8 *) scan, (U8 *) this_eol, (U8) ARG(p), FLAGS(p));
                                                                                ^

"regexec.c", line 9757: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                   &&  (*scan & FLAGS(p)) != ARG(p))
                                             ^

"regexec.c", line 9764: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
              scan = (char *) find_next_masked((U8 *) scan, (U8 *) this_eol, (U8) ARG(p), FLAGS(p));
                                                                                  ^

"regexec.c", line 9817: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_anyofhs *" may cause misaligned access
                     && memEQ(scan, ((struct regnode_anyofhs *) p)->string, FLAGS(p))
                                     ^

"regexec.c", line 9831: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT(utf8_to_uvchr_buf((U8 *) scan,
                        ^

"regexec.c", line 9831: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT(utf8_to_uvchr_buf((U8 *) scan,
                        ^

"regexec.c", line 9843: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT((U8) *scan, ANYOFRbase(p), ANYOFRdelta(p)))
                        ^

"regexec.c", line 9843: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT((U8) *scan, ANYOFRbase(p), ANYOFRdelta(p)))
                        ^

"regexec.c", line 9856: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT(utf8_to_uvchr_buf((U8 *) scan,
                        ^
"regexec.c", line 9856: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT(utf8_to_uvchr_buf((U8 *) scan,
                        ^

"regexec.c", line 9868: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT((U8) *scan, ANYOFRbase(p), ANYOFRdelta(p)))
                        ^

"regexec.c", line 9868: warning #4232-D: conversion from "const regnode *" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
                     && withinCOUNT((U8) *scan, ANYOFRbase(p), ANYOFRdelta(p)))
                        ^

"regexec.c", line 10149: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
        if (ANYOF_BITMAP_TEST(n, c))
            ^

"regexec.c", line 10162: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
                && ANYOF_BITMAP_TEST(n, PL_fold_locale[c]))
                   ^

"regexec.c", line 10166: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "regnode_charclass_posixl *" may cause misaligned access
              else if (   ANYOF_POSIXL_TEST_ANY_SET(n)
                          ^

"regexec.c", line 10204: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "regnode_charclass_posixl *" may cause misaligned access
                      if (ANYOF_POSIXL_TEST(n, count)
                          ^

"regexec.c", line 10236: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "struct regnode_1 *" may cause misaligned access
        else if (    ARG(n) != ANYOF_ONLY_HAS_BITMAP
                     ^

"regexec.c", line 10305: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
                if (ANYOF_BITMAP_TEST(n, 'i')) {
                    ^

"regexec.c", line 10310: warning #4232-D: conversion from "const regnode *const" to a more strictly aligned type "regnode_charclass *" may cause misaligned access
                if (ANYOF_BITMAP_TEST(n, 'I')) {
                    ^

"regexec.c", line 3228: warning #4276-D: relational operator ">" always evaluates to 'false'
              Copy(strbeg + min, prog->subbeg, sublen, char);
              ^

"regexec.c", line 4298: warning #4276-D: relational operator ">" always evaluates to 'false'
              Copy(pat, c1_utf8, UTF8SKIP(pat), U8);
              ^

"regexec.c", line 4299: warning #4276-D: relational operator ">" always evaluates to 'false'
              Copy(pat, c2_utf8, UTF8SKIP(pat), U8);
              ^

"regexec.c", line 8157: warning #4276-D: relational operator ">" always evaluates to 'false'
                            Renew(aux->poscache, size, char);
                            ^

"regexec.c", line 8160: warning #4276-D: relational operator ">" always evaluates to 'false'
                        Zero(aux->poscache, size, char);
                        ^

"regexec.c", line 8164: warning #4276-D: relational operator ">" always evaluates to 'false'
                        Newxz(aux->poscache, size, char);
                        ^

Perl configuration

NOTE: this is the Perl available to the system during the build process, NOT the Perl I am attempting to build

This is perl 5, version 28, subversion 1 (v5.28.1) built for IA64.ARCHREV_0-thread-multi-LP64

Copyright 1987-2018, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
lmcne commented 3 years ago

Cross-posted to StackOverflow: https://stackoverflow.com/questions/69226303/failures-bulding-perl-5-32-1-on-hp-ux-hpia11-31-related-to-failed-regex-eval

nwc10 commented 3 years ago

I have access to a HP-UX system (thanks Merijn).

With cc: HP C/aC++ B3910B A.06.28.02 [Mar 09 2016] I can build v5.32.1:

./perl -v

This is perl 5, version 32, subversion 1 (v5.32.1) built for IA64.ARCHREV_0-thread-multi-LP64

So it looks like the problem is something to do with the different compiler. Maybe a bug in the older compiler, because whilst Perl's C code does a few naughty things, it seems strange that every other compiler observed is fine.

Are you able to run make minitest and post the failure output?

(If there's lots, the files that fail is interesting, and some sample diagnostic output)

If that won't even build, then the manual steps to get some output are

  1. make miniperl
  2. cd t
  3. ln -s ../miniperl perl
  4. ./perl TEST base/*.t re/*.t

I'd hope that we can figure out what the C compiler is objecting to, and hence create a work-around.

If we can reduce the problem to a small test-case, then I'd hope that it's possible to use git bisect to figure out the exact commit. Given a test case, there's a wrapper script Porting/bisect.pl that can automate most of this.

lmcne commented 3 years ago

Steps and output from building minitest. There is a lot more output which I've excluded for legibility but can provide if needed.

N.B. the first time I ran Configure and make I saw these errors repeatedly:

./Configure -des -Dprefix=$HOME/localperl

-->8 snip 8<--

"intrpvar.h", line 950: error #2020: identifier "mbstate_t" is undefined
  PERLVAR(I, wcrtomb_ps, mbstate_t)
                         ^

Adding -Accflags="-D_INCLUDE__STDC_A1_SOURCE" alleviated that issue.

./Configure -des -Dprefix=$HOME/localperl -Accflags="-D_INCLUDE__STDC_A1_SOURCE"

-->8 snip 8<--

bash-4.0$ make minitest
        rm -f opmini.c
        /usr/bin/ln -s op.c opmini.c
        /bin/sh config_h.SH
Extracting config.h (with variable substitutions)
        /bin/sh cflags.SH
cflags.SH: cc       = cc
cflags.SH: ccflags  = -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE
cflags.SH: stdflags =
cflags.SH: optimize = +O2 +Onolimit
cflags.SH: warn     =
Extracting cflags (with variable substitutions)
        echo @`sh  cflags "optimize='+O2 +Onolimit'" opmini.o`  -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB opmini.c
@cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB opmini.c
"op.c", line 2443: warning #2111-D: statement is unreachable
      return arg;
      ^
-->8 snip 8<--

        rm -f perlmini.c
        /usr/bin/ln -s perl.c perlmini.c
        echo @`sh  cflags "optimize='+O2 +Onolimit'" perlmini.o`  -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c
@cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c
"perl.c", line 3581: warning #2111-D: statement is unreachable
          NOT_REACHED; /* NOTREACHED */
          ^

"perl.c", line 4653: warning #4232-D: conversion from "XPVHV *" to a more
          strictly aligned type "XPVMG *" may cause misaligned access
            if (HvKEYS(dups)) {
                ^

-->8 snip 8<--

cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit pp_sort.c
cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit caretx.c
cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit dquote.c
cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit time64.c
cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit miniperlmain.c
        cc -L/usr/local/lib -L/usr/lib/hpux32 -o miniperl \
            opmini.o perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o  miniperlmain.o  -lcl -lpthread -lnsl -ldl -lm -lsec -lc
cc: warning 983: The -lc library specified on the command line is also added automatically by the compiler driver.
         ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
         ./miniperl -Ilib -f write_buildcustomize.pl
        rm -f opmini.c
        /usr/bin/ln -s op.c opmini.c
        rm -f perlmini.c
        /usr/bin/ln -s perl.c perlmini.c
        ./generate_uudmap uudmap.h bitcount.h mg_data.h
cc -c -DPERL_CORE -Ae -Wp,-H150000 -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE__STDC_A1_SOURCE +O2 +Onolimit globals.c
        cc -L/usr/local/lib -L/usr/lib/hpux32 -o miniperl \
            opmini.o perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o  miniperlmain.o  -lcl -lpthread -lnsl -ldl -lm -lsec -lc
cc: warning 983: The -lc library specified on the command line is also added automatically by the compiler driver.
         ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
         ./miniperl -Ilib -f write_buildcustomize.pl
         ./miniperl -Ilib make_patchnum.pl
Updating 'git_version.h' and 'lib/Config_git.pl' is generated by make_patchnum.pl
#          DO NOT EDIT DIRECTLY - edit make_patchnum.pl instead
######################################################################
$Config::Git_Data=<<'ENDOFGIT';
git_commit_id=''
git_describe=''
git_branch=''
git_uncommitted_changes=''
git_commit_id_title=''
Failed to open for write './lib/Config_git.pl' is generated by make_patchnum.pl
#          DO NOT EDIT DIRECTLY - edit make_patchnum.pl instead
######################################################################
$Config::Git_Data=<<'ENDOFGIT';
git_commit_id=''
git_describe=''
git_branch=''
git_uncommitted_changes=''
git_commit_id_title='':File name too long at make_patchnum.pl line 84.
*** Error exit code 248

Stop.
*** Error exit code 1 (ignored)

You may see some irrelevant test failures if you have been unable
to build lib/Config.pm, or the Unicode data files.

        cd t && (rm -f perl; /usr/bin/ln -s ../miniperl perl)
        cd t &&   ./perl -Ilib -I. TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t </dev/tty
t/base/cond .................... FAILED--unexpected output at test 0
Failed a basic test (base/cond.t) under minitest -- cannot continue.
*** Error exit code 255

Stop.

The 'Failed to open' message towards the end matches what I've seen in the regular build: regex parsing of the filename from make_patchnum.pl fails resulting in a too-long filename. Patching for this issue moves the build into configpm which also exhibits regex issues which prevent creation of lib/Config.pm and associated files.

nwc10 commented 3 years ago

t/base/cond .................... FAILED--unexpected output at test 0 Failed a basic test (base/cond.t) under minitest -- cannot continue.

Oh erk, that failure is far earlier in the testsuite than I expected, and seemingly nothing to do with regular expressions.

If I run it manually I have:

-bash-5.1$ ./miniperl t/base/cond.t
1..4
ok 1 - operator eq
ok 2 - operator ne
ok 3 - operator ==
ok 4 - operator !=

For you, I assume that it's crashing before it can produce 1..4. Is this the case?

Assuming that t/base/cond.t passes on v5.28.0 (or so), and it's crashing on v5.32.1, and that the cause is one commit somewhere in the history between, it should be possible to automate finding out which;

  1. start with a clean git checkout
  2. copy Porting/bisect.pl and Porting/bisect-runner.pl to any location outside of the checkout (eg /tmp)
  3. Run (I think) this:
/tmp/bisect.pl --end v5.32.1 --crash --target miniperl -Duse64bitall -Dusethreads -- ./miniperl t/base/cond.t

(I can't test that completely as I don't have it crashing at any revision, and the HP-UX machine is rather too slow)

One could add a --start option (eg --start v5.28.0) to slightly cut down the search for a start revision

If I've got the options right it should

  1. build 64bit and with threads (your config)
  2. only build as far as miniperl
  3. use miniperl to run t/base/cond.t (default is its #! line, which is ./perl and so won't work)
  4. treat crashes as bad, non-crashes as good

The (numerous) command line options are documented in bisect-runner.pl (which might seem odd, but makes sense implementation-wise)

nwc10 commented 3 years ago

Oops, given that you needed to add -Accflags="-D_INCLUDE__STDC_A1_SOURCE" to the ./Configure command line, I think you'll need

/tmp/bisect.pl --end v5.32.1 --crash --target miniperl -Duse64bitall -Dusethreads `-Accflags="-D_INCLUDE__STDC_A1_SOURCE" -- ./miniperl t/base/cond.t

lmcne commented 3 years ago

Actually I get the same output you do, which is unexpected and perplexing:

bash-4.0$ ./miniperl t/base/cond.t
1..4
ok 1 - operator eq
ok 2 - operator ne
ok 3 - operator ==
ok 4 - operator !=

EDIT: running all the t/base/*.t unit tests manually results in the following test failures:

bash-4.0$ ./miniperl `t/base/term.t`
1..7
ok 1
sh: ./miniperl:  not found.
not ok 2
#3      :1: == :1:
ok 3
ok 4
ok 5
ok 6
ok 7

Failing tests in t/base/term.t:

# check `` processing

$x = `$^X -le "print 'hi there'"`;
if ($x eq "hi there\n") {print "ok 2\n";} else {print "not ok 2\n";}
bash-4.0$ ./miniperl t/base/lex.t
1..120
#1      :x: eq :x:
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12 - make sure single quotes are honored \nnot ok
ok 13
ok 14
ok 15
ok 16
ok 17
ok 18 - was the test for the deprecated use of bare << to mean <<""
ok 19
ok 20
ok 21
ok 22
ok 23
not ok 24
ok 25
not ok 26
ok 27
ok 28
ok 29
ok 30
ok 31
ok 32
ok 33
ok 34
ok 35
ok 36
ok 37
ok 38
ok 39
ok 40
ok 41
ok 42
ok 43
ok 44
ok 45
ok 46
ok 47
# uggedaboudit
ok 48
ok 49
ok 50
ok 51
ok 52
ok 53
ok 54
ok 55
ok 56
ok 57
ok 58
ok 59
ok 60
ok 61
ok 62
ok 63 - heredoc after "" in s/// in eval
ok 64 - heredoc in "" in multiline s///e in eval
ok 65 - null on same line as heredoc in s/// in eval
ok 66 - heredoc in "" in single-line s///e in eval
ok 67 - heredoc in "" in multiline s///e outside eval
ok 68 - s/// in s/// pattern
ok 69 - here-doc in re-eval
ok 70 - here-doc in re-eval in string eval
ok 71 - eval ending with semicolon
ok 72 - here-doc in single-line re-eval
ok 73 - here-doc in quotes in multiline re-eval
ok 74 - eval 's//<<END/' does not leave extra newlines
ok 75 - # after null in s/// repl
ok 76 - s//'#' . <<END/e
ok 77 - s//3}->{3/e
ok 78 - s//${\%x}{3}/e
ok 79 - s/${foo#}//e
ok 80 - listop({ok 78 => 1} + 1)
ok 81 - [perl #105924] require WORD << ...
ok 82 - [perl #105924] goto WORD << ...
ok 83 - [perl #105924] last WORD << ...
ok 84 - [perl #105924] next WORD << ...
ok 85 - [perl #105924] redo WORD << ...
ok 86 - [perl #105924] CORE::dump WORD << ...
ok 87 - Use v[0-9]+ as a label
ok 88 - Use v[0-9]+ as a label with space before colon
ok 89 - call a function in package v10::foo
ok 90 - colon detection after vstring does not break ? vstring :
#not
ok 91 - print vstring prints the vstring
ok 92 - q <comment> <newline> ...
ok 93 - qq <comment> <newline> ...
ok 94 - qw <comment> <newline> ...
ok 95 - m <comment> <newline> ...
ok 96 - qr <comment> <newline> ...
ok 97 - s <comment> <newline> ...
ok 98 - tr <comment> <newline> ...
ok 99 - y <comment> <newline> ...
ok 100 - => quotes keywords across lines
ok 101 - [perl #80368] qq <a\U=>
ok 102 - ${...} where {...} looks like hash
ok 103 - map{BEGIN...
ok 104 - map{BEGIN...
ok 105 - ${ <newline> =pod
ok 106 - map{ <newline> =pod
ok 107 - ${...} (literal triple-dot)
ok 108 - map{...} (literal triple-dot)
ok 109 - &{sub :lvalue...}
ok 110 - map{sub :lvalue...}
ok 111 - 124385
ok 112 - 125350
ok 113 - 128171
ok 114 - 132640
ok 115 - 125351
ok 116 - 126192
ok 117 - [perl #128478] "$foo::$bar"
ok 118 - [perl #128478] "$foo::@bar"
ok 119 - first constant in 'const1 const2' is not upgraded
ok 120 - second constant in 'const1 const2' is not upgraded

Failing tests in t/base/lex.t:

print "FOO:" =~ /$foo[:]/ ? "ok 24\n" : "not ok 24\n";
print "FOOZ" =~ /^$foo[$A-Z]$/ ? "ok 26\n" : "not ok 26\n";
hvds commented 3 years ago

Character classes are common to the t/base/lex.t and make_patchnum.pl failures. If the bisection does not work, you could try building with -DDEBUGGING and trying the lex.t tests with -Dr, eg:

./miniperl -Dr -e 'print "FOO:" =~ /FOO[:]/ ? "ok\n" : "not ok\n"'

which might give us some more information.

nwc10 commented 3 years ago

You might be able to bisect that to a single commit in the C source that upset the compiler. Something like:

/tmp/bisect.pl --end v5.32.1 --target miniperl -Duse64bitall -Dusethreads `-Accflags="-D_INCLUDE__STDC_A1_SOURCE" -e 'exit("FOO:" =~ /$foo[:]/ ? 0 : 1)'

[Edited to change exit ... to exit(...) - sorry, I didn't test this carefully enough]

It might be that some "innocent" (and correct) change to the type of an expression inside an array index (or how some data structures are stored) between v5.28 and v5.32 has tickled a bug in that compiler.

I also wondered (but this might be a long shot) whether the compiler would behave differently in C99 mode. I think that the default is C89 - are you able to build by adding -AC99 to the compiler options?

(That flag is approaching the limit of my HP-UX specific knowledge.)

lmcne commented 3 years ago

Definitely a long shot, and unsuccessful :-)

I'll try to run the bisect; not sure if I'll hit issues because git is not installed on our build machines.

nwc10 commented 3 years ago

I'll try to run the bisect; not sure if I'll hit issues because git is not installed on our build machines.

Oh erk, and good luck.

You might benefit from adding --start v5.28.0 to the command line. The default is to try to find a start point automatically by trying stable versions in order. The earliest attempted is perl-5.002, but to build that early the bisect runner has to patch various files in the source tree, which it attempts with patch, so if you build machines don't have that either, it will fail (and IIRC hard fail, rather than deciding that that version should be skipped, and simply moving onwards)

lmcne commented 3 years ago

A colleague was able to run bisect between 5.29.7 (successful) and 5.29.8 (failing); here's the results:

git bisect start                                                         ᚠ devel/v5.29.7
git bisect bad v5.29.7                                                   ᚠ devel/v5.29.7
git bisect good v5.29.6                                                  ᚠ devel/v5.29.7
Bisecting: 57 revisions left to test after this (roughly 6 steps)
[317a726d5977fc277a50871ea89e79ce9da36bed] regcomp.c: Rename a variable

$ sh Configure -des -Dprefix=/opt/perl/5.32.1/hpia11.31 -Duseshrplib=false -Dusethreads -Dnoextensions=ODBM_File -Duse64bitall -Dusedevel && make minitest
-- Logged to step01-317a726d59...log

  ⋯/sandbox/GitHub/perl5  git bisect bad                                                              ᚠ 317a726d59
Bisecting: 28 revisions left to test after this (roughly 5 steps)
[a308c7e049aaaf6b8a593459292704ecb29655ac] regcomp.c, regexec.c: Rename some related variables
 ⋯/sandbox/GitHub/perl5                                                                              ᚠ a308c7e049

git clean -diX

$ sh Configure -des -Dprefix=/opt/perl/5.32.1/hpia11.31 -Duseshrplib=false -Dusethreads -Dnoextensions=ODBM_File -Duse64bitall -Dusedevel && make minitest 2>&1 | tee step02-a308c7e049.log

 ⋯/sandbox/GitHub/perl5  git bisect good                                                            ᚠ a308c7e049
Bisecting: 14 revisions left to test after this (roughly 4 steps)
[0fbec7cfee07bcb4184ad6f26fffb15af3fdc048] regexec.c: Avoid unnecessary folding
 ⋯/sandbox/GitHub/perl5                                                                              ᚠ 0fbec7cfee

git clean -diX

$ ( sh Configure -des -Dprefix=/opt/perl/5.32.1/hpia11.31 -Duseshrplib=false -Dusethreads -Dnoextensions=ODBM_File -Duse64bitall -Dusedevel && make minitest ) 2>&1 | tee step03-0fbec7cfee.log

 ⋯/sandbox/GitHub/perl5  git bisect good                                                             ᚠ 0fbec7cfee
Bisecting: 7 revisions left to test after this (roughly 3 steps)
[98074cb544cfa35eb31ad1895dfc1015be2fab50] regcomp.c: Consolidate common code
 ⋯/sandbox/GitHub/perl5                                                                              ᚠ 98074cb544

git clean -diX

$ ( sh Configure -des -Dprefix=/opt/perl/5.32.1/hpia11.31 -Duseshrplib=false -Dusethreads -Dnoextensions=ODBM_File -Duse64bitall -Dusedevel && make minitest ) 2>&1 | tee step04-98074cb544.log

 ⋯/sandbox/GitHub/perl5  git bisect good                                                             ᚠ 98074cb544
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[ddb2f1506d64f5966468a7d16db8d80608ab103e] regcomp.c: Refactor looking for POSIX optimizations
 ⋯/sandbox/GitHub/perl5                                                                              ᚠ ddb2f1506d

git clean -diX

$ ( sh Configure -des -Dprefix=/opt/perl/5.32.1/hpia11.31 -Duseshrplib=false -Dusethreads -Dnoextensions=ODBM_File -Duse64bitall -Dusedevel && make minitest ) 2>&1 | tee step05-ddb2f1506d.log

 ⋯/sandbox/GitHub/perl5  git bisect bad                                                              ᚠ ddb2f1506d
Bisecting: 1 revision left to test after this (roughly 1 step)
[17e8e8e82459ab4457d5037180fa67796e0fac8e] regcomp.c: Remove no longer used static function
 ⋯/sandbox/GitHub/perl5                                                                              ᚠ 17e8e8e824

git clean -diX

$ ( sh Configure -des -Dprefix=/opt/perl/5.32.1/hpia11.31 -Duseshrplib=false -Dusethreads -Dnoextensions=ODBM_File -Duse64bitall -Dusedevel && make minitest ) 2>&1 | tee step06-17e8e8e824.log

 ⋯/sandbox/GitHub/perl5  git bisect good                                                             ᚠ 17e8e8e824
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[c5d6a6ca99e382c5efe257bef87df4e1369cdc7e] regcomp.c: Rename a variable
 ⋯/sandbox/GitHub/perl5                                                                              ᚠ c5d6a6ca99

git clean -diX

$ ( sh Configure -des -Dprefix=/opt/perl/5.32.1/hpia11.31 -Duseshrplib=false -Dusethreads -Dnoextensions=ODBM_File -Duse64bitall -Dusedevel && make minitest ) 2>&1 | tee step07-c5d6a6ca99.log

 ⋯/sandbox/GitHub/perl5  git bisect good                                                             ᚠ c5d6a6ca99
ddb2f1506d64f5966468a7d16db8d80608ab103e is the first bad commit
commit ddb2f1506d64f5966468a7d16db8d80608ab103e
Author: Karl Williamson <khw@cpan.org>
Date:   Tue Nov 27 11:59:03 2018 -0700

    regcomp.c: Refactor looking for POSIX optimizations

    Instead of repeating the code, slightly modified, this uses a loop.
    This is in preparation for a future commit where a third instance would
    have been required

:100644 100644 779cc05d8fc1e720e0a7e1e12edb5227ff7a8584 909764aeaf9c82dbb3581b43fcea9f66b77b0fc6 M    regcomp.c

Here's the git bisect log:

 ⋯/sandbox/GitHub/perl5  git bisect log                    ᚠ bisect/good-c5d6a6ca99e382c5efe257bef87df4e1369cdc7e
git bisect start
# bad: [e0cf033f421e677e25c7c28ce932de16832f814b] And 5.29.7 release to pod/perlhist
git bisect bad e0cf033f421e677e25c7c28ce932de16832f814b
# good: [4a292fc5f1b9c62ae52c835d69cb90c874a52ca0] Perlhist: Date of the 5.29.6 release.
git bisect good 4a292fc5f1b9c62ae52c835d69cb90c874a52ca0
# bad: [317a726d5977fc277a50871ea89e79ce9da36bed] regcomp.c: Rename a variable
git bisect bad 317a726d5977fc277a50871ea89e79ce9da36bed
# good: [a308c7e049aaaf6b8a593459292704ecb29655ac] regcomp.c, regexec.c: Rename some related variables
git bisect good a308c7e049aaaf6b8a593459292704ecb29655ac
# good: [0fbec7cfee07bcb4184ad6f26fffb15af3fdc048] regexec.c: Avoid unnecessary folding
git bisect good 0fbec7cfee07bcb4184ad6f26fffb15af3fdc048
# good: [98074cb544cfa35eb31ad1895dfc1015be2fab50] regcomp.c: Consolidate common code
git bisect good 98074cb544cfa35eb31ad1895dfc1015be2fab50
# bad: [ddb2f1506d64f5966468a7d16db8d80608ab103e] regcomp.c: Refactor looking for POSIX optimizations
git bisect bad ddb2f1506d64f5966468a7d16db8d80608ab103e
# good: [17e8e8e82459ab4457d5037180fa67796e0fac8e] regcomp.c: Remove no longer used static function
git bisect good 17e8e8e82459ab4457d5037180fa67796e0fac8e
# good: [c5d6a6ca99e382c5efe257bef87df4e1369cdc7e] regcomp.c: Rename a variable
git bisect good c5d6a6ca99e382c5efe257bef87df4e1369cdc7e
# first bad commit: [ddb2f1506d64f5966468a7d16db8d80608ab103e] regcomp.c: Refactor looking for POSIX optimizations

My colleague successfully built with bad commit - 1. Bumping up to the bad commit then failed.

Tail end of the failed build log:

make[1]: *** [uni.data] Error 255
make[1]: Leaving directory `/sandbox/GitHub/perl5'
make: [minitest_prep] Error 2 (ignored)

You may see some irrelevant test failures if you have been unable
to build lib/Config.pm, or the Unicode data files.

cd t && (rm -f perl; /usr/bin/ln -s ../miniperl perl)
cd t &&   ./perl -Ilib -I. TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t </dev/tty
t/base/cond .................... FAILED--unexpected output at test 0
Failed a basic test (base/cond.t) under minitest -- cannot continue.
make: [minitest] Error 255 (ignored)
nwc10 commented 3 years ago

That commit that git bisect has found looks plausible as a cause of the problem:

commit ddb2f1506d64f5966468a7d16db8d80608ab103e
Author: Karl Williamson <khw@cpan.org>
Date:   Tue Nov 27 11:59:03 2018 -0700

    regcomp.c: Refactor looking for POSIX optimizations

    Instead of repeating the code, slightly modified, this uses a loop.
    This is in preparation for a future commit where a third instance would
    have been required

diff --git a/regcomp.c b/regcomp.c
index 779cc05..909764a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -18403,50 +18403,52 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flag>
             }
             }

+        {
+            PERL_UINT_FAST8_T type;
+
             /* Here, didn't find an optimization.  See if this matches any
              * of the POSIX classes.  The POSIXA ones are about the same speed
              * as ANYOF ops, but take less room; the ones that have
              * above-Latin1 code point matches are somewhat faster than ANYOF.
              * */

+            for (type = POSIXU; type <= POSIXA; type++) {
+

...

I think that that commit was one of the first uses in the source code of the C99 types. And your compiler is older, so maybe it doesn't quite get something right.

If I make regcomp.i working backwards I see:

$ grep PERL_UINT_FAST8_T regcomp.i
    typedef uint_fast8_t  PERL_UINT_FAST8_T;
            PERL_UINT_FAST8_T inverted = 0;
            const PERL_UINT_FAST8_T max_permissible = 0x7F;
            PERL_UINT_FAST8_T type;
$ grep uint_fast8_t regcomp.i
typedef unsigned int uint_fast8_t;
    typedef uint_fast8_t  PERL_UINT_FAST8_T;

so for cc: HP C/aC++ B3910B A.06.28.02 [Mar 09 2016] the type is unsigned int.

The pre-processed source code for that loop above starts

        {
            PERL_UINT_FAST8_T type;

            for (type = 26; type <= 27; type++) {

I'd assume that you should see the same. (and hopefully PERL_UINT_FAST8_T also ends up as unsigned int)

but this sort of bug is about finding out which assumption turns out to be wrong... :-)

lmcne commented 3 years ago

We do indeed see the same thing; nice to have some confirmation!

nwc10 commented 3 years ago

We do indeed see the same thing; nice to have some confirmation!

That's sort of good news and bad news simultaneously. Because the compiler I have access to compiles that code correctly. Whereas (if I understand your report correctly) the compiler on your systems does not.

Which seems nuts, as that C code looks to be doing nothing special whatsoever. What about it contuses your compiler? I'm struggling to even guess sensibly.

Tux commented 2 years ago

The compiler that @nwc10 can use on that HP-UX is:

hp-ux$ cc --version
cc: HP C/aC++ B3910B A.06.28.02 [Mar 09 2016]

(next to some GNU gcc variants) If yours is newer, something broke in HP's patches. If yours is older and you still have a support contract to get the patches, it might be making sense to apply them

demerphq commented 1 year ago

Could you try with the latest version of blead? I just fixed a bunch of HPUX build issues.