Skip to content

[MSWindows] 32-bit quadmath builds fail multiple tests. #21313

Closed
@sisyphus

Description

@sisyphus

This issue pertains to MSWin32-x86-multi-thread-quadmath and MSWin32-x86-multi-thread-64int-quadmath builds of perl, going back over at least the last couple of years.
All other configurations are currently fine, irrespective of whether gcc's threads model is POSIX or MCF, and irrespective of whether gcc's runtime is msvcrt or ucrt.

For the record, at time of writing, current stable release is 5.38.0, and current devel release is 5.39.0.

Over the last year or two, I have played around with a number of mingw-w64 ports of gcc provided by nixman (https://github.com/niXman/mingw-builds-binaries/releases/), by lhmouse (https://gcc-mcf.lhmouse.com/) and by Brecht Sanders (https://winlibs.com).
Most of the ones that I've tried (and there has been quite a few) have been from the winlibs website.

The 32-bit quadmath builds always fail multiple tests (irrespective of IVSIZE) - except when using lhmouse's compilers, where all tests always pass (again, irrespective of IVSIZE).
The only 3 compilers from lhmouse that I've actually tried have been a 13.0.1 snapshot, the 13.1.0 (dated 2023-04-26), and the 13.2.1 snapshot (dated 2023-07-28). All three have successfully built these 32-bit quadmath perls 5.37.10 to 5.39.1, with all tests passing.
And all 3 were built with MCF-threads && msvc runtime.

From a discussion at
https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/CADZSBj2PDJj1E64zWeWUeZ%3DrvRj7_ETbHxb6p1pBKg-rf9BJ5Q%40mail.gmail.com/#msg37836780
I gather that lhmouse's gcc builds have Intel as the default assembly syntax, whereas AFAIK the other builders are still specifying AT&T as the default.
I don't know if the default of Intel could account for the success that I have in building 32-bit quadmath perls with lhmouse's compilers.
I can well envisage that there might be other differences, too - but the default assembly syntax is the only difference I know of.

When using Brecht Sanders releases of gcc-13.1.0 built with MCF-threads && msvc runtime, the perls they build suffer multiple test failures.
Here is the 'gmake test' report for almost-current (commit 942fa8d) blead, using Brecht Sanders' gcc-13.1.0 built with MCF-threads && msvc runtime.

Test Summary Report
-------------------
op/fork.t                                                          (Wstat: 0 Tests: 28 Failed: 1)
  Failed test:  9
op/index_thr.t                                                     (Wstat: 1280 (exited 5) Tests: 58 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 415 tests but ran 58.
op/threads.t                                                       (Wstat: 1280 (exited 5) Tests: 3 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 30 tests but ran 3.
re/pat_advanced_thr.t                                              (Wstat: 1280 (exited 5) Tests: 1 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
re/pat_psycho_thr.t                                                (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
re/pat_re_eval_thr.t                                               (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 527 tests but ran 2.
re/pat_rt_report_thr.t                                             (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 2514 tests but ran 0.
re/pat_special_cc_thr.t                                            (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 9 tests but ran 0.
re/reg_email_thr.t                                                 (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
re/regexp_unicode_prop_thr.t                                       (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 1110 tests but ran 2.
re/speed_thr.t                                                     (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 59 tests but ran 0.
re/user_prop_race_thr.t                                            (Wstat: 0 Tests: 3 Failed: 1)
  Failed test:  1
win32/popen.t                                                      (Wstat: 0 Tests: 1 Failed: 1)
  Failed test:  1
win32/signal.t                                                     (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 4 tests but ran 2.
../cpan/File-Temp/t/fork.t                                         (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 8 tests but ran 2.
../cpan/Test-Simple/t/Legacy/Builder/fork_with_new_stdout.t        (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 2 tests but ran 0.
../cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t          (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
../cpan/Test-Simple/t/Legacy/subtest/fork.t                        (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 1 tests but ran 0.
../cpan/Test-Simple/t/Legacy/threads.t                             (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 6 tests but ran 0.
../cpan/Test-Simple/t/regression/fork_first.t                      (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
../cpan/Test-Simple/t/Test2/acceptance/try_it_threads.t            (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 6 tests but ran 0.
../cpan/Test-Simple/t/Test2/modules/Hub.t                          (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
../cpan/Test-Simple/t/Test2/regression/746-forking-subtest.t       (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
../dist/IO/t/io_multihomed.t                                       (Wstat: 1280 (exited 5) Tests: 5 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 8 tests but ran 5.
../dist/IO/t/io_sock.t                                             (Wstat: 1280 (exited 5) Tests: 17 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 26 tests but ran 17.
../dist/Storable/t/threads.t                                       (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 2 tests but ran 0.
../dist/Thread-Queue/t/01_basic.t                                  (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 81 tests but ran 2.
../dist/Thread-Queue/t/02_refs.t                                   (Wstat: 1280 (exited 5) Tests: 6 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 46 tests but ran 6.
../dist/Thread-Queue/t/03_peek.t                                   (Wstat: 1280 (exited 5) Tests: 1 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 19 tests but ran 1.
../dist/Thread-Queue/t/05_extract.t                                (Wstat: 1280 (exited 5) Tests: 8 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 20 tests but ran 8.
../dist/Thread-Queue/t/07_lock.t                                   (Wstat: 1280 (exited 5) Tests: 1 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 3 tests but ran 1.
../dist/Thread-Queue/t/09_ended.t                                  (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 60 tests but ran 0.
../dist/Thread-Queue/t/10_timed.t                                  (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 19 tests but ran 2.
../dist/Thread-Queue/t/11_limit.t                                  (Wstat: 1280 (exited 5) Tests: 1 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 13 tests but ran 1.
../dist/Thread-Semaphore/t/01_basic.t                              (Wstat: 1280 (exited 5) Tests: 3 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 10 tests but ran 3.
../dist/Thread-Semaphore/t/05_force.t                              (Wstat: 1280 (exited 5) Tests: 2 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 8 tests but ran 2.
../dist/Thread-Semaphore/t/06_timed.t                              (Wstat: 1280 (exited 5) Tests: 3 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 10 tests but ran 3.
../dist/threads-shared/t/object2.t                                 (Wstat: 1280 (exited 5) Tests: 131 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 133 tests but ran 131.
../dist/threads-shared/t/stress.t                                  (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 1 tests but ran 0.
../dist/threads-shared/t/wait.t                                    (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 91 tests but ran 0.
../dist/threads/t/free.t                                           (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 29 tests but ran 0.
../dist/threads/t/free2.t                                          (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 78 tests but ran 0.
../dist/threads/t/libc.t                                           (Wstat: 1280 (exited 5) Tests: 1 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 11 tests but ran 1.
../dist/threads/t/stack.t                                          (Wstat: 1280 (exited 5) Tests: 15 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 18 tests but ran 15.
../dist/threads/t/stress_cv.t                                      (Wstat: 1280 (exited 5) Tests: 30 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 61 tests but ran 30.
../dist/threads/t/stress_string.t                                  (Wstat: 1280 (exited 5) Tests: 31 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 61 tests but ran 31.
../dist/threads/t/thread.t                                         (Wstat: 1280 (exited 5) Tests: 14 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 35 tests but ran 14.
../ext/B/t/b.t                                                     (Wstat: 1280 (exited 5) Tests: 86 Failed: 0)
  Non-zero exit status: 5
  Parse errors: No plan found in TAP output
../ext/IPC-Open3/t/IPC-Open3.t                                     (Wstat: 0 Tests: 45 Failed: 0)
  TODO passed:   25
../ext/PerlIO-encoding/t/threads.t                                 (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 4 tests but ran 0.
../ext/XS-APItest/t/keyword_plugin_threads.t                       (Wstat: 0 Tests: 1 Failed: 1)
  Failed test:  1
../ext/XS-APItest/t/my_cxt.t                                       (Wstat: 1280 (exited 5) Tests: 7 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 16 tests but ran 7.
../dist/threads-shared/t/waithires.t                               (Wstat: 1280 (exited 5) Tests: 0 Failed: 0)
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 63 tests but ran 0.
Files=2771, Tests=1116289, 1157 wallclock secs ( 7.99 usr +  0.45 sys =  8.44 CPU)
Result: FAIL

There are far fewer failures when the same perl source is built using Brecht Sanders' gcc-13.1.0 that is built with POSIX-threads && msvc runtime:

Test Summary Report
-------------------
op/index_thr.t                                                     (Wstat: 0 Tests: 412 Failed: 0)
  Parse errors: Bad plan.  You planned 415 tests but ran 412.
op/substr_thr.t                                                    (Wstat: 256 (exited 1) Tests: 153 Failed: 0)
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 400 tests but ran 153.
op/threads.t                                                       (Wstat: 2304 (exited 9) Tests: 9 Failed: 0)
  Non-zero exit status: 9
  Parse errors: Bad plan.  You planned 30 tests but ran 9.
re/pat_psycho_thr.t                                                (Wstat: 256 (exited 1) Tests: 13 Failed: 0)
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 15 tests but ran 13.
re/speed_thr.t                                                     (Wstat: 256 (exited 1) Tests: 25 Failed: 0)
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 59 tests but ran 25.
../dist/threads/t/thread.t                                         (Wstat: 0 Tests: 35 Failed: 2)
  Failed tests:  15, 20
../ext/IPC-Open3/t/IPC-Open3.t                                     (Wstat: 0 Tests: 45 Failed: 0)
  TODO passed:   25
../ext/XS-APItest/t/keyword_plugin_threads.t                       (Wstat: 0 Tests: 1 Failed: 1)
  Failed test:  1
Files=2771, Tests=1123102, 2441 wallclock secs ( 7.25 usr +  0.30 sys =  7.55 CPU)
Result: FAIL

So we see that the number of failures increases markedly when Brecht Sanders' MCF-threads version of gcc-13.1.0 is used. (Though it's lhmouse's MCF-threads version that succeeds.)

Things look pretty much the same with Brecht Sanders' 13.2.0 compilers.
LHmouse hasn't provided a gcc-13.2.0, but the gcc-13.2.1 (snapshot) works fine.
(For the 32-bit compilers lhmouse provides only MCF-threads with msvc runtime.)

Perl configuration

> ..\perl -I..\lib -V
Summary of my perl5 (revision 5 version 39 subversion 2) configuration:
  Derived from:
  Platform:
    osname=MSWin32
    osvers=10.0.22621.1992
    archname=MSWin32-x86-multi-thread-quadmath
    uname=''
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=undef
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='gcc'
    ccflags =' -DWIN32 -fdiagnostics-color=never -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='13.1.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=4
    doublesize=8
    byteorder=1234
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=12
    longdblkind=3
    ivtype='long'
    ivsize=4
    nvtype='__float128'
    nvsize=16
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"D:\perl-5.39.2-1310\lib\MSWin32-x86-multi-thread-quadmath\CORE" -L"C:\winpos-gcc-1310\mingw32\lib" -L"C:\winpos-gcc-1310\mingw32\i686-w64-mingw32\lib" -L"C:\winpos-gcc-1310\mingw32\lib\gcc\i686-w64-mingw32\13.1.0"'
    libpth=C:\winpos-gcc-1310\mingw32\lib C:\winpos-gcc-1310\mingw32\i686-w64-mingw32\lib C:\winpos-gcc-1310\mingw32\lib\gcc\i686-w64-mingw32\13.1.0 D:\_32\msys_1310\1.0\local\lib
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lquadmath
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lquadmath
    libc=
    so=dll
    useshrplib=true
    libperl=libperl539.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-shared -s -L"D:\perl-5.39.2-1310\lib\MSWin32-x86-multi-thread-quadmath\CORE" -L"C:\winpos-gcc-1310\mingw32\lib" -L"C:\winpos-gcc-1310\mingw32\i686-w64-mingw32\lib" -L"C:\winpos-gcc-1310\mingw32\lib\gcc\i686-w64-mingw32\13.1.0"'


Characteristics of this binary (from libperl):
  Compile-time options:
    HAS_LONG_DOUBLE
    HAS_STRTOLD
    HAS_TIMES
    HAVE_INTERP_INTERN
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_ZAPHOD32
    PERL_HASH_USE_SBOX32
    PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_SAFE_PUTENV
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_QUADMATH
  Locally applied patches:
    uncommitted-changes
  Built under MSWin32
  Compiled at Jul 31 2023 11:46:25
  @INC:
    ..\lib
    D:/comp-1310/perl-5.39.2/lib

Cheers,
Rob

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions