Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation errors during compiling Perl 5.40.0 for Emscripten/WebAssembly #22793

Open
vadimkantorov opened this issue Nov 28, 2024 · 17 comments

Comments

@vadimkantorov
Copy link

vadimkantorov commented Nov 28, 2024

Related:

I had to set d_setlocale='undef' to circumvent the errors from #22728

hintfile_wasm.sh based on work of @haukex from blead...haukex:emperl5:emperl_v5.30.0

Now the errors are: (note siginfo_t vs Siginfo_t)

emcc -c   -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -pipe -fstack-protector-strong -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"0.31\" -DXS_VERSION=\"0.31\"  "-I../.."   encoding.c
In file included from encoding.xs:3:
../../perl.h:907:9: warning: 'STANDARD_C' macro redefined [-Wmacro-redefined]
  907 | #define STANDARD_C
      |         ^
<command line>:4:9: note: previous definition is here
    4 | #define STANDARD_C 1
      |         ^
In file included from encoding.xs:3:
../../perl.h:1088:9: warning: 'PERL_USE_SAFE_PUTENV' macro redefined [-Wmacro-redefined]
 1088 | #define PERL_USE_SAFE_PUTENV
      |         ^
<command line>:5:9: note: previous definition is here
    5 | #define PERL_USE_SAFE_PUTENV 1
      |         ^
2 warnings generated.
rm -f "../../lib/auto/PerlIO/encoding/encoding.a"
/usr/bin/ar cr "../../lib/auto/PerlIO/encoding/encoding.a" encoding.o
/home/runner/work/_temp/2a9b3be7-18ae-445b-ac4f-7d905286b440/emsdk-main/upstream/emscripten/emranlib "../../lib/auto/PerlIO/encoding/encoding.a"
chmod 755 ../../lib/auto/PerlIO/encoding/encoding.a
make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-encoding'
./miniperl -Ilib make_ext.pl lib/auto/PerlIO/scalar/scalar.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
Running pm_to_blib for ext/PerlIO-scalar directly
./miniperl -Ilib make_ext.pl lib/auto/PerlIO/via/via.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
Generating a Unix-style Makefile
Writing Makefile for PerlIO::via
make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-via'
"../../miniperl" "-I../../lib" "../../lib/ExtUtils/xsubpp"  -typemap '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-via/../../lib/ExtUtils/typemap'  via.xs > via.xsc
mv via.xsc via.c
emcc -c   -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -pipe -fstack-protector-strong -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"0.19\" -DXS_VERSION=\"0.19\"  "-I../.."   via.c
In file included from via.xs:3:
../../perl.h:907:9: warning: 'STANDARD_C' macro redefined [-Wmacro-redefined]
  907 | #define STANDARD_C
      |         ^
<command line>:4:9: note: previous definition is here
    4 | #define STANDARD_C 1
      |         ^
In file included from via.xs:3:
../../perl.h:1088:9: warning: 'PERL_USE_SAFE_PUTENV' macro redefined [-Wmacro-redefined]
 1088 | #define PERL_USE_SAFE_PUTENV
      |         ^
<command line>:5:9: note: previous definition is here
    5 | #define PERL_USE_SAFE_PUTENV 1
      |         ^
2 warnings generated.
rm -f "../../lib/auto/PerlIO/via/via.a"
/usr/bin/ar cr "../../lib/auto/PerlIO/via/via.a" via.o
/home/runner/work/_temp/2a9b3be7-18ae-445b-ac4f-7d905286b440/emsdk-main/upstream/emscripten/emranlib "../../lib/auto/PerlIO/via/via.a"
chmod 755 ../../lib/auto/PerlIO/via/via.a
make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-via'
./miniperl -Ilib make_ext.pl lib/auto/POSIX/POSIX.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
Warning (mostly harmless): No library found for -lm
Warning (mostly harmless): No library found for -lposix
Warning (mostly harmless): No library found for -lcposix
Generating a Unix-style Makefile
Writing Makefile for POSIX
make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/POSIX'
"../../miniperl" "-I../../lib" "../../lib/ExtUtils/xsubpp" -noprototypes -typemap '/home/runner/work/busybiber/busybiber/wasm/ext/POSIX/../../lib/ExtUtils/typemap' -typemap '/home/runner/work/busybiber/busybiber/wasm/ext/POSIX/typemap'  POSIX.xs > POSIX.xsc
mv POSIX.xsc POSIX.c
emcc -c   -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -pipe -fstack-protector-strong -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"2.20\" -DXS_VERSION=\"2.20\"  "-I../.."   POSIX.c
In file included from POSIX.xs:11:
../../perl.h:907:9: warning: 'STANDARD_C' macro redefined [-Wmacro-redefined]
  907 | #define STANDARD_C
      |         ^
<command line>:4:9: note: previous definition is here
    4 | #define STANDARD_C 1
      |         ^
In file included from POSIX.xs:11:
../../perl.h:1088:9: warning: 'PERL_USE_SAFE_PUTENV' macro redefined [-Wmacro-redefined]
 1088 | #define PERL_USE_SAFE_PUTENV
      |         ^
<command line>:5:9: note: previous definition is here
    5 | #define PERL_USE_SAFE_PUTENV 1
      |         ^
POSIX.xs:2909:48: warning: comparison of distinct pointer types ('void (*)(int, siginfo_t *, void *)' and 'Sighandler3_t' (aka 'void (*)(int, Siginfo_t *, void *)')) [-Wcompare-distinct-pointer-types]
 2909 |                         ? (  oact.sa_sigaction == PL_csighandler3p
      |                              ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
POSIX.xs:2941:38: error: incompatible function pointer types assigning to 'void (*)(int, siginfo_t *, void *)' from 'Sighandler3_t' (aka 'void (*)(int, Siginfo_t *, void *)') [-Wincompatible-function-pointer-types]
 2941 |                     act.sa_sigaction =
      |                                      ^
 2942 |                             safe ? PL_csighandler3p : PL_sighandler3p;
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
make[1]: *** [Makefile:336: POSIX.o] Error 1
make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/POSIX'
make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/POSIX'
emcc -c   -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -pipe -fstack-protector-strong -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"2.20\" -DXS_VERSION=\"2.20\"  "-I../.."   POSIX.c
In file included from POSIX.xs:11:
../../perl.h:907:9: warning: 'STANDARD_C' macro redefined [-Wmacro-redefined]
  907 | #define STANDARD_C
      |         ^
<command line>:4:9: note: previous definition is here
    4 | #define STANDARD_C 1
      |         ^
In file included from POSIX.xs:11:
../../perl.h:1088:9: warning: 'PERL_USE_SAFE_PUTENV' macro redefined [-Wmacro-redefined]
 1088 | #define PERL_USE_SAFE_PUTENV
      |         ^
<command line>:5:9: note: previous definition is here
    5 | #define PERL_USE_SAFE_PUTENV 1
      |         ^
POSIX.xs:2909:48: warning: comparison of distinct pointer types ('void (*)(int, siginfo_t *, void *)' and 'Sighandler3_t' (aka 'void (*)(int, Siginfo_t *, void *)')) [-Wcompare-distinct-pointer-types]
 2909 |                         ? (  oact.sa_sigaction == PL_csighandler3p
      |                              ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
POSIX.xs:2941:38: error: incompatible function pointer types assigning to 'void (*)(int, siginfo_t *, void *)' from 'Sighandler3_t' (aka 'void (*)(int, Siginfo_t *, void *)') [-Wincompatible-function-pointer-types]
 2941 |                     act.sa_sigaction =
      |                                      ^
 2942 |                             safe ? PL_csighandler3p : PL_sighandler3p;
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
make[1]: *** [Makefile:336: POSIX.o] Error 1

Here is a full current GitHub Workflow Actions script:

name: buildperlwasm

on: workflow_dispatch
env:
  URLPERL: https://www.cpan.org/src/5.0/perl-5.40.0.tar.gz
  EMSCRIPTEN_VERSION: 3.1.73

jobs:

  buildperlwasm:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4

      - name: Setup Emscripten
        uses: mymindstorm/setup-emsdk@v13
        with:
          version: ${{env.EMSCRIPTEN_VERSION}}

      - name: Install Perl static native
        shell: bash
        run: |
          mkdir native && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=native
          cd native && BUILD_ZLIB=0 sh +x ./Configure -sde -Dman1dir=none -Dman3dir=none -Dprefix="$PWD/prefix" -Dusedevel -Uversiononly -Dlibs="-lpthread -ldl -lm -lutil -lc -lz" -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode" && cd -
          make -C native
          make -C native install

      - name: Heredoc
        run: |
          cat <<'EOF' > patch.sh
            d_perl_lc_all_uses_name_value_pairs="$undef"
            d_perl_lc_all_separator="$undef"
            perl_lc_all_separator=
            d_perl_lc_all_category_positions_init="$undef";
            perl_lc_all_category_positions_init=
          EOF
          cat <<'EOF' > hintfile_wasm.sh
            #2020-11-29T00:24:34.8505712Z warning: undefined symbol: __stack_chk_fail (referenced by top-level compiled C/C++ code)
            #2020-11-29T00:24:34.8573524Z warning: undefined symbol: sigsuspend (referenced by top-level compiled C/C++ code)

            # ##### WebPerl - http://webperl.zero-g.net #####
            #
            # Copyright (c) 2018 Hauke Daempfling (haukex@zero-g.net)
            # at the Leibniz Institute of Freshwater Ecology and Inland Fisheries (IGB),
            # Berlin, Germany, http://www.igb-berlin.de
            #
            # This program is free software; you can redistribute it and/or modify
            # it under the same terms as Perl 5 itself: either the GNU General Public
            # License as published by the Free Software Foundation (either version 1,
            # or, at your option, any later version), or the "Artistic License" which
            # comes with Perl 5.
            #
            # This program is distributed in the hope that it will be useful, but
            # WITHOUT ANY WARRANTY; without even the implied warranty of
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
            # See the licenses for details.
            #
            # You should have received a copy of the licenses along with this program.
            # If not, see http://perldoc.perl.org/index-licence.html


            osname="emscripten"
            archname="wasm"
            osvers="2.0.5"

            myhostname='localhost'
            mydomain='.local'
            cf_email='haukex@zero-g.net'
            perladmin='root@localhost'

            #TODO: almost all of the known_extensions are still being built. we should probably exclude some of them! (see also nonxs_ext)
            # [arybase attributes B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd Data/Dumper
            # Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob
            # File/Glob Filter/Util/Call Hash/Util Hash/Util/FieldHash I18N/Langinfo IO
            # List/Util Math/BigInt/FastCalc MIME/Base64 mro Opcode PerlIO/encoding
            # PerlIO/mmap PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable
            # Sys/Hostname Sys/Syslog threads threads/shared Tie/Hash/NamedCapture
            # Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize XS/APItest XS/Typemap]
            #TODO Later: Reinsert Storable after Socket, its Makefile seems to not work in our environment
            static_ext="attributes B Cwd Data/Dumper Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Hash/Util I18N/Langinfo IO List/Util mro Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Normalize"
            dynamic_ext=''
            noextensions='IPC/SysV'

            cc="emcc"
            ld="emcc"

            #nm="`which llvm-nm`"  # note from Glossary: 'After Configure runs, the value is reset to a plain "nm" and is not useful.'
            ar="`which emar`"  # note from Glossary: 'After Configure runs, the value is reset to a plain "ar" and is not useful.'
            ranlib="`which emranlib`"

            # Here's a fun one: apparently, when building perlmini.c, emcc notices that it's a symlink to perl.c, and compiles to perl.o
            # (because there is no -o option), so the final perl ends up thinking it's miniperl (shown in "perl -v", @INC doesn't work, etc.).
            # Because of this and other issues I've had with symlinks, I'm switching to hard links instead.
            # (Another possible fix might be to fix the Makefile steps so that they use the -o option, but this solution works for now.)
            #TODO Later: In NODEFS, does Perl's -e test work correctly on symlinks? (./t/TEST was having issues detecting ./t/perl, a symlink to ./perl).
            lns="/bin/ln"

            prefix="/opt/perl"
            inc_version_list="none"

            man1dir="none"
            man3dir="none"

            loclibpth=''
            glibpth=''

            usemymalloc="n"
            uselargefiles="n"
            usenm='undef'

            usemallocwrap="define"
            d_procselfexe='undef'
            d_dlopen='undef'
            d_setlocale='undef'
            dlsrc='none'
            d_getgrgid_r='define'
            d_getgrnam_r='define'
            d_libname_unique="define"
            d_getnameinfo='define'

            d_setrgid='undef'
            d_setruid='undef'
            d_setproctitle='undef'
            d_malloc_size='undef'
            d_malloc_good_size='undef'
            d_fdclose='undef'

            #d_prctl='define' # hm, it's present in the libc source, but Configure shows Emscripten error output? -> for now, assume it's not available

            # It *looks* like shm*, sem* and a few others exist in Emscripten's libc,
            # but I'm not sure why Configure isn't detecting them. But at the moment I'm not going
            # to worry about them, and just not build IPC-SysV.
            d_clearenv='undef'
            d_cuserid='undef'
            d_eaccess='undef'
            d_getspnam='undef'
            d_msgctl='undef'
            d_msgget='undef'
            d_msgrcv='undef'
            d_msgsnd='undef'
            d_semget='undef'
            d_semop='undef'
            d_shmat='undef'
            d_shmctl='undef'
            d_shmdt='undef'
            d_shmget='undef'
            d_syscall='undef'


            # Emscripten does not have signals support (documentation isn't 100% clear on this? but see "$EMSCRIPTEN/system/include/libc/setjmp.h")
            # but if you do: grep -r 'Calling stub instead of' "$EMSCRIPTEN"
            # you'll see the unsupported stuff (as of 1.37.35):
            # signal() sigaction() sigprocmask() __libc_current_sigrtmin __libc_current_sigrtmax kill() killpg() siginterrupt() raise() pause()
            # plus: "Calling longjmp() instead of siglongjmp()"
            d_sigaction='undef'
            d_sigprocmask='undef'
            d_killpg='undef'
            d_pause='undef'
            d_sigsetjmp='undef' # this also disables Perl's use of siglongjmp() (see config.h)
            # the others either aren't used by Perl (like siginterrupt) or can't be Configure'd (like kill)
            #TODO Later: currently I've disabled Perl's use of signal() by patching the source - maybe there's a better way?

            # Emscripten doesn't actually have these either (see "$EMSCRIPTEN/src/library.js")
            d_wait4='undef'
            d_waitpid='undef'
            d_fork='define' # BUT, perl needs this one to at least build
            d_vfork='undef'
            d_pseudofork='undef'

            i_pthread='undef'
            d_pthread_atfork='undef'
            d_pthread_attr_setscope='undef'
            d_pthread_yield='undef'

            # We're avoiding all the 64-bit stuff for now.
            # Commented out stuff is correctly detected.
            #TODO: JavaScript uses 64-bit IEEE double FP numbers - will Perl use those?
            #TODO: Now that we've switched to WebAssembly, can we use 64 bits everywhere?
            # see https://groups.google.com/forum/#!topic/emscripten-discuss/nWmO3gi8_Jg
            #use64bitall='undef'
            #use64bitint='undef'
            #usemorebits='undef'
            #usequadmath='undef'
            #TODO Later: Why does Configure seem to ignore the following? (and do we care?)
            d_quad='undef'

            #TODO Later: The test for "selectminbits" seems to fail,
            # the error appears to be coming from this line (because apparently stream.stream_ops is undefined):
            # https://github.com/kripken/emscripten/blob/ddfc3e32f65/src/library_syscall.js#L750
            # For now, just use this number from a build with an earlier version where this didn't fail:
            selectminbits='32'
            alignbytes='4'


            optimize="-O2"


            ldflags="$ldflags -lm -O2 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -Wno-almost-asm"
            ldflags="$ldflags -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s WASM=1"

            # the following is needed for the "musl" libc provided by emscripten to provide all functions
            ccflags="$ccflags -D_GNU_SOURCE -D_POSIX_C_SOURCE"
            # from Makefile.emcc / Makefile.micro
            ccflags="$ccflags -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS"
            # disable this warning, I don't think we need it - TODO: how to append this after -Wall?
            ccflags="$ccflags -Wno-null-pointer-arithmetic"


            # Configure apparently changes "-s ASSERTIONS=2 -s STACK_OVERFLOW_CHECK=2" to "-s -s" when converting ccflags to cppflags
            # this is the current hack/workaround: copy cppflags from config.sh and fix it (TODO Later: better way would be to patch Configure)
            cppflags='-lm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'

            libs='-lm'
          EOF

      - name: Install Perl static wasm
        shell: bash
        run: |
          mkdir wasm && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=wasm
          cp hintfile_wasm.sh wasm/hints/emscripten.sh
          # https://github.com/Perl/perl5/issues/22728
          sed -i -e "17836r patch.sh" ./wasm/Configure
          cd wasm
          emconfigure bash ./Configure -sde -Dhintfile=emscripten -Dsysroot=$(dirname $(which emcc))/system -Dhostperl=$PWD/../native/miniperl -Dhostgenerate=$PWD/../native/generate_uudmap -Dprefix=$PWD/prefix
          sed -i 's/$(generated_pods)//' Makefile
          emmake make perl
          emmake make install
@Leont
Copy link
Contributor

Leont commented Nov 28, 2024

../../perl.h:907:9: warning: 'STANDARD_C' macro redefined [-Wmacro-redefined]
  907 | #define STANDARD_C
      |         ^
<command line>:4:9: note: previous definition is here
    4 | #define STANDARD_C 1
      |         ^
In file included from encoding.xs:3:
../../perl.h:1088:9: warning: 'PERL_USE_SAFE_PUTENV' macro redefined [-Wmacro-redefined]
 1088 | #define PERL_USE_SAFE_PUTENV
      |         ^
<command line>:5:9: note: previous definition is here
    5 | #define PERL_USE_SAFE_PUTENV 1
      |         ^

Yeah you need to remove -DSTANDARD_C -DPERL_USE_SAFE_PUTENV from cc_flags, and then this warning goes away

POSIX.xs:2909:48: warning: comparison of distinct pointer types ('void (*)(int, siginfo_t *, void *)' and 'Sighandler3_t' (aka 'void (*)(int, Siginfo_t *, void *)')) [-Wcompare-distinct-pointer-types]
 2909 |                         ? (  oact.sa_sigaction == PL_csighandler3p
      |                              ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
POSIX.xs:2941:38: error: incompatible function pointer types assigning to 'void (*)(int, siginfo_t *, void *)' from 'Sighandler3_t' (aka 'void (*)(int, Siginfo_t *, void *)') [-Wincompatible-function-pointer-types]
 2941 |                     act.sa_sigaction =
      |                                      ^
 2942 |                             safe ? PL_csighandler3p : PL_sighandler3p;

That is caused by your d_sigaction='undef', I suspect that should also go away.

@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 29, 2024

Thanks for the the advice. My current version (building all modules statically) below and it builds successfully.

  1. How could I fix the locale-related error? Grateful for advice!
  2. Could we convert the hintfile to Configure command arguments?

Thanks!

name: buildperlwasm

on: workflow_dispatch
env:
  URLPERL: https://www.cpan.org/src/5.0/perl-5.40.0.tar.gz
  EMSCRIPTEN_VERSION: 3.1.73

jobs:

  buildperlwasm:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4

      - name: Setup Emscripten
        uses: mymindstorm/setup-emsdk@v13
        with:
          version: ${{env.EMSCRIPTEN_VERSION}}

      - name: Install Perl static native
        shell: bash
        run: |
          mkdir native && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=native
          cd native && BUILD_ZLIB=0 sh +x ./Configure -sde -Dman1dir=none -Dman3dir=none -Dprefix="$PWD/prefix" -Dusedevel -Uversiononly -Dlibs="-lpthread -ldl -lm -lutil -lc -lz" -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode" && cd -
          make -C native
          make -C native install

      - name: Heredoc
        run: |
          cat <<'EOF' > hintfile_wasm.sh
            osname="emscripten"
            archname="wasm"
            osvers="2.0.5"

            myhostname='localhost'
            mydomain='.local'

            #TODO: almost all of the known_extensions are still being built. we should probably exclude some of them! (see also nonxs_ext)
            #dynamic_ext=''
            #noextensions='IPC/SysV'

            cc="emcc"
            ld="emcc"

            #nm="`which llvm-nm`"  # note from Glossary: 'After Configure runs, the value is reset to a plain "nm" and is not useful.'
            ar="`which emar`"  # note from Glossary: 'After Configure runs, the value is reset to a plain "ar" and is not useful.'
            ranlib="`which emranlib`"

            # Here's a fun one: apparently, when building perlmini.c, emcc notices that it's a symlink to perl.c, and compiles to perl.o
            # (because there is no -o option), so the final perl ends up thinking it's miniperl (shown in "perl -v", @INC doesn't work, etc.).
            # Because of this and other issues I've had with symlinks, I'm switching to hard links instead.
            # (Another possible fix might be to fix the Makefile steps so that they use the -o option, but this solution works for now.)
            #TODO Later: In NODEFS, does Perl's -e test work correctly on symlinks? (./t/TEST was having issues detecting ./t/perl, a symlink to ./perl).
            lns="/bin/ln"

            #prefix="/opt/perl"
            inc_version_list="none"

            loclibpth=''
            glibpth=''

            usemymalloc="n"
            uselargefiles="n"
            usenm='undef'

            usemallocwrap="define"
            d_procselfexe='undef'
            d_dlopen='undef'

            d_setlocale='undef'
            d_perl_lc_all_category_positions_init='define'
            d_perl_lc_all_separator='define'
            d_perl_lc_all_uses_name_value_pairs='undef'
            perl_lc_all_category_positions_init='{0,1,5,2,3,4}'
            perl_lc_all_separator=''

            dlsrc='none'
            d_getgrgid_r='define'
            d_getgrnam_r='define'
            d_libname_unique="define"
            d_getnameinfo='define'

            d_setrgid='undef'
            d_setruid='undef'
            d_setproctitle='undef'
            d_malloc_size='undef'
            d_malloc_good_size='undef'
            d_fdclose='undef'

            #d_prctl='define' # hm, it's present in the libc source, but Configure shows Emscripten error output? -> for now, assume it's not available

            # It *looks* like shm*, sem* and a few others exist in Emscripten's libc,
            # but I'm not sure why Configure isn't detecting them. But at the moment I'm not going
            # to worry about them, and just not build IPC-SysV.
            d_clearenv='undef'
            d_cuserid='undef'
            d_eaccess='undef'
            d_getspnam='undef'
            d_msgctl='undef'
            d_msgget='undef'
            d_msgrcv='undef'
            d_msgsnd='undef'
            d_semget='undef'
            d_semop='undef'
            d_shmat='undef'
            d_shmctl='undef'
            d_shmdt='undef'
            d_shmget='undef'
            d_syscall='undef'


            # Emscripten does not have signals support (documentation isn't 100% clear on this? but see "$EMSCRIPTEN/system/include/libc/setjmp.h")
            # but if you do: grep -r 'Calling stub instead of' "$EMSCRIPTEN"
            # you'll see the unsupported stuff (as of 1.37.35):
            # signal() sigaction() sigprocmask() __libc_current_sigrtmin __libc_current_sigrtmax kill() killpg() siginterrupt() raise() pause()
            # plus: "Calling longjmp() instead of siglongjmp()"
            #d_sigaction='undef'
            #d_sigprocmask='undef'

            d_killpg='undef'
            d_pause='undef'
            d_sigsetjmp='undef' # this also disables Perl's use of siglongjmp() (see config.h)
            # the others either aren't used by Perl (like siginterrupt) or can't be Configure'd (like kill)
            #TODO Later: currently I've disabled Perl's use of signal() by patching the source - maybe there's a better way?

            # Emscripten doesn't actually have these either (see "$EMSCRIPTEN/src/library.js")
            d_wait4='undef'
            d_waitpid='undef'
            d_fork='define' # BUT, perl needs this one to at least build
            d_vfork='undef'
            d_pseudofork='undef'

            i_pthread='undef'
            d_pthread_atfork='undef'
            d_pthread_attr_setscope='undef'
            d_pthread_yield='undef'

            # We're avoiding all the 64-bit stuff for now.
            # Commented out stuff is correctly detected.
            #TODO: JavaScript uses 64-bit IEEE double FP numbers - will Perl use those?
            #TODO: Now that we've switched to WebAssembly, can we use 64 bits everywhere?
            # see https://groups.google.com/forum/#!topic/emscripten-discuss/nWmO3gi8_Jg
            #use64bitall='undef'
            #use64bitint='undef'
            #usemorebits='undef'
            #usequadmath='undef'
            #TODO Later: Why does Configure seem to ignore the following? (and do we care?)
            d_quad='undef'

            #TODO Later: The test for "selectminbits" seems to fail,
            # the error appears to be coming from this line (because apparently stream.stream_ops is undefined):
            # https://github.com/kripken/emscripten/blob/ddfc3e32f65/src/library_syscall.js#L750
            # For now, just use this number from a build with an earlier version where this didn't fail:
            selectminbits='32'
            alignbytes='4'
            optimize="-O2"


            ldflags="$ldflags -lm -O2 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -Wno-almost-asm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s WASM=1"

            # the following is needed for the "musl" libc provided by emscripten to provide all functions
            # from Makefile.emcc / Makefile.micro  -DSTANDARD_C -DPERL_USE_SAFE_PUTENV
            # disable this warning, I don't think we need it - TODO: how to append this after -Wall?
            ccflags="$ccflags -D_GNU_SOURCE -D_POSIX_C_SOURCE  -DNO_MATHOMS -Wno-null-pointer-arithmetic"

            # Configure apparently changes "-s ASSERTIONS=2 -s STACK_OVERFLOW_CHECK=2" to "-s -s" when converting ccflags to cppflags
            # this is the current hack/workaround: copy cppflags from config.sh and fix it (TODO Later: better way would be to patch Configure)
            cppflags='-lm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'

            libs='-lm'
          EOF

      - name: Install Perl static wasm
        shell: bash
        run: |
          mkdir wasm && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=wasm
          cp hintfile_wasm.sh wasm/hints/emscripten.sh
          # https://github.com/Perl/perl5/issues/22728
          cd wasm
          emconfigure bash ./Configure -sde -Dman1dir=none -Dman3dir=none -Dhintfile=emscripten -Dsysroot=$(dirname $(which emcc))/system -Dhostperl=$PWD/../native/miniperl -Dhostgenerate=$PWD/../native/generate_uudmap -Dprefix=$PWD/prefix -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode"
          sed -i 's/$(generated_pods)//' Makefile
          sed -i 's/public = $(PERL_EXE) utilities/public = $(PERL_EXE)/' Makefile

          emmake make
          # LC_ALL="C" node ./perl -e 'print("hello world\n");' # fails with Perl locale errors
          # emmake make install # fails while trying to use ./perl instead of host perls

@khwilliamson
Copy link
Contributor

For the locale, have you tried adding to the Configure options -Accflags=-DNO_LOCALE ? If doing that works, you can remove the d_setlocale bit.

Look at files in the /hints directory for how people deal with the other Configure stuff

@vadimkantorov
Copy link
Author

I've tried this NO_LOCALE but this was still leading to broken config.g...

@khwilliamson
Copy link
Contributor

At line number 17502 of Configure in current blead is the beginning of a C program. Extract that program, compile it, and run it, and report the results, including exit code.

@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 29, 2024

Here is the output:

$ emcc -o try try.c
../try.c:247:54: warning: flag ''' results in undefined behavior with 's' conversion specifier [-Wformat]
  247 |             fprintf(stderr, "Couldn't find '%s' in '%'s\n", alternate, lc_all);
      |                                                     ~^~
1 warning generated.
$ node ./try
";"
{ 0, 1, 2, 3, 4, 5 }

exit code is 0

@khwilliamson
Copy link
Contributor

Thanks; I can't work on this right now, but maybe later tonight, and if not, first thing tomorrow my time UTC-7. I'll get you a Configure patch.

@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 29, 2024

In openwrt/packages#24512 there is also a lot of discussion of making a hintfile for bypassing this problem on musl systems... That's where I copied from: https://github.com/openwrt/packages/pull/24614/files

            d_perl_lc_all_category_positions_init='define'
            d_perl_lc_all_separator='define'
            d_perl_lc_all_uses_name_value_pairs='undef'
            perl_lc_all_category_positions_init='{0,1,5,2,3,4}'
            perl_lc_all_separator=''

Emscripten is also musl libc-based

@khwilliamson
Copy link
Contributor

It looks to me that this is the inevitable result currently of specifying d_setlocale to be undef, which is a bug in Configure and needs to be fixed, but is actually tangential to your problem.

I have access to a system running Alpine Linux, which is using /usr/lib/x86_64-alpine-linux-musl/13.1.1, and it Configures fine on blead, yielding the following in config.h

/*#define PERL_LC_ALL_USES_NAME_VALUE_PAIRS     / **/
#define  PERL_LC_ALL_SEPARATOR ";"      /**/
#define  PERL_LC_ALL_CATEGORY_POSITIONS_INIT  { 0, 1, 2, 3, 4, 5 }      /**/

From what you said, I infer that you were getting Failed to compile lc_all probe and that's why you set d_setlocale to undef. But that's not going to work, it turns out.

Configure (unwisely) redirects the stderr of compilations to /dev/null. Let's find out why it isn't compiling. The attached patch allows that output to come out. What you did earlier was to compile on its own the code that is failing to compile in Configure And it compiled! but with a warning. The attached patch fixes the typo that led to that warning.

So, get rid of setting d_setlocale, patch Configure with the attached, and rerun. Maybe it will fix it, but certainly should tell us enough to get to the root cause.

musl-Configure.txt.

@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 30, 2024

@khwilliamson your patch worked! Hope you can upstream it!

2024-11-30T12:01:02.8675950Z Checking to see if you have setlocale() and its behavior
2024-11-30T12:01:03.4225103Z Your system has setlocale()...
2024-11-30T12:01:03.4468921Z and it seems sane, but accepts any locale name as valid
2024-11-30T12:01:03.4493680Z Checking the syntax of LC_ALL when categories are set to different locales...

hello world printed successfully. Note that some late part of emmake make tries to execute ./perl (and this currently does not work with emscripten as it does not auto-add shebang to the final exeuctables), but I would say that make should not do that in these cross-compilation scenarios. How can I instruct it to not try to use the freshly-produced binary and only use the hostminiperl?

I'll paste now the error produced by emmake make install

Last lines of my log:

emcc -o perl -lm -O2 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -Wno-almost-asm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s WASM=1 -fstack-protector-strong  perlmain.o  lib/auto/mro/mro.a lib/auto/Devel/Peek/Peek.a lib/auto/File/DosGlob/DosGlob.a lib/auto/File/Glob/Glob.a lib/auto/Sys/Syslog/Syslog.a lib/auto/Sys/Hostname/Hostname.a lib/auto/PerlIO/via/via.a lib/auto/PerlIO/mmap/mmap.a lib/auto/PerlIO/encoding/encoding.a lib/auto/B/B.a lib/auto/attributes/attributes.a lib/auto/Unicode/Normalize/Normalize.a lib/auto/Unicode/Collate/Collate.a lib/auto/threads/threads.a lib/auto/threads/shared/shared.a lib/auto/IPC/SysV/SysV.a lib/auto/re/re.a lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Math/BigInt/FastCalc/FastCalc.a lib/auto/Data/Dumper/Dumper.a lib/auto/I18N/Langinfo/Langinfo.a lib/auto/Time/HiRes/HiRes.a lib/auto/Time/Piece/Piece.a lib/auto/IO/IO.a lib/auto/Socket/Socket.a lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/Hash/Util/Util.a lib/auto/Filter/Util/Call/Call.a lib/auto/POSIX/POSIX.a lib/auto/Encode/Unicode/Unicode.a lib/auto/Encode/Encode.a lib/auto/Encode/JP/JP.a lib/auto/Encode/KR/KR.a lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/CN/CN.a lib/auto/Encode/Symbol/Symbol.a lib/auto/Encode/Byte/Byte.a lib/auto/Encode/TW/TW.a lib/auto/Compress/Raw/Zlib/Zlib.a lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/MIME/Base64/Base64.a lib/auto/Cwd/Cwd.a lib/auto/Storable/Storable.a lib/auto/List/Util/Util.a lib/auto/Fcntl/Fcntl.a lib/auto/Opcode/Opcode.a lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a libperl.a `cat ext.libs` -lm 
cache:INFO: generating system asset: symbol_lists/e2173083170998da29b94504cd20c1e23a0940e9.json... (this will be cached in "/home/runner/work/_temp/5fb16ed5-7bcb-48f9-b27d-e042dd01752d/emsdk-main/upstream/emscripten/cache/symbol_lists/e2173083170998da29b94504cd20c1e23a0940e9.json" for subsequent builds)
cache:INFO:  - ok
warning: undefined symbol: sigsuspend (referenced by root reference (e.g. compiled C/C++ code))
emcc: warning: warnings in JS library compilation [-Wjs-compiler]
/bin/sh: 1: ./perl: Permission denied
WARNING: re-sorting MANIFEST
/bin/sh: 2: ./perl: Permission denied
 
	Everything is up to date. Type 'make test' to run test suite.
hello world

khwilliamson added a commit to khwilliamson/perl5 that referenced this issue Nov 30, 2024
See Perl#22793

This typo in a printf format causes some C compilations to fail; others
to just warn.  However stderr is redirected to /dev/null, so we weren't
aware of this issue.

When it fails, other issues cause perl to not be usable on the system.
@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 30, 2024

Regarding locale: now that I removed all locale-related configs, curiously, it worked without issues. Not sure why I previously was getting Failed to compile lc_all probe... Regarding another person having this error - you may also reach out to #22728 and to openwrt/packages#24512 , openwrt (musl-based) had to some patches because of these problems...

Current emmake make install errors:

...
2024-11-30T13:38:54.9621053Z /home/runner/work/busybiber/busybiber/wasm/../native/miniperl installperl --destdir=   
2024-11-30T13:38:55.2224498Z perl isn't executable!

It is correct that host miniperl is used /home/runner/work/busybiber/busybiber/wasm/../native/miniperl, but I don't see why it's then trying to run the ./perl (and failing with perl isn't executable!) for the installation purposes (mainly just copying files around)

2024-11-30T13:38:46.5640017Z make: make install
2024-11-30T13:38:46.5665594Z makefile:587: target 'lib/auto/Encode/Byte/Byte.a' given more than once in the same rule
2024-11-30T13:38:46.5666225Z makefile:587: target 'lib/auto/Encode/CN/CN.a' given more than once in the same rule
2024-11-30T13:38:46.5667158Z makefile:587: target 'lib/auto/Encode/EBCDIC/EBCDIC.a' given more than once in the same rule
2024-11-30T13:38:46.5667754Z makefile:587: target 'lib/auto/Encode/JP/JP.a' given more than once in the same rule
2024-11-30T13:38:46.5668366Z makefile:587: target 'lib/auto/Encode/KR/KR.a' given more than once in the same rule
2024-11-30T13:38:46.5669296Z makefile:587: target 'lib/auto/Encode/Symbol/Symbol.a' given more than once in the same rule
2024-11-30T13:38:46.5669939Z makefile:587: target 'lib/auto/Encode/TW/TW.a' given more than once in the same rule
2024-11-30T13:38:46.5670536Z makefile:587: target 'lib/auto/Encode/Unicode/Unicode.a' given more than once in the same rule
2024-11-30T13:38:46.5850754Z /bin/ln /home/runner/work/busybiber/busybiber/wasm/../native/generate_uudmap generate_uudmap
2024-11-30T13:38:46.5904097Z ./miniperl -Ilib make_ext.pl cpan/Archive-Tar/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.6513602Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Archive-Tar'
2024-11-30T13:38:46.6577052Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Archive-Tar'
2024-11-30T13:38:46.6595636Z ./miniperl -Ilib make_ext.pl dist/Attribute-Handlers/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.7200964Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Attribute-Handlers'
2024-11-30T13:38:46.7262011Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Attribute-Handlers'
2024-11-30T13:38:46.7279845Z ./miniperl -Ilib make_ext.pl cpan/AutoLoader/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.7490802Z Running pm_to_blib for cpan/AutoLoader directly
2024-11-30T13:38:46.7498130Z ./miniperl -Ilib make_ext.pl cpan/CPAN/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.8102702Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/CPAN'
2024-11-30T13:38:46.8221899Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/CPAN'
2024-11-30T13:38:46.8240761Z ./miniperl -Ilib make_ext.pl cpan/CPAN-Meta/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.8846898Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/CPAN-Meta'
2024-11-30T13:38:46.8928842Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/CPAN-Meta'
2024-11-30T13:38:46.8945916Z ./miniperl -Ilib make_ext.pl cpan/CPAN-Meta-Requirements/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.9209172Z Running pm_to_blib for cpan/CPAN-Meta-Requirements directly
2024-11-30T13:38:46.9223489Z ./miniperl -Ilib make_ext.pl cpan/CPAN-Meta-YAML/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.9444753Z Running pm_to_blib for cpan/CPAN-Meta-YAML directly
2024-11-30T13:38:46.9452270Z ./miniperl -Ilib make_ext.pl dist/Carp/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.9665119Z Running pm_to_blib for dist/Carp directly
2024-11-30T13:38:46.9672195Z ./miniperl -Ilib make_ext.pl cpan/Config-Perl-V/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.9775631Z Running pm_to_blib for cpan/Config-Perl-V directly
2024-11-30T13:38:46.9781578Z ./miniperl -Ilib make_ext.pl dist/Devel-SelfStubber/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:46.9995205Z Running pm_to_blib for dist/Devel-SelfStubber directly
2024-11-30T13:38:47.0002732Z ./miniperl -Ilib make_ext.pl cpan/Digest/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.0213465Z Running pm_to_blib for cpan/Digest directly
2024-11-30T13:38:47.0220733Z ./miniperl -Ilib make_ext.pl dist/Dumpvalue/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.0430582Z Running pm_to_blib for dist/Dumpvalue directly
2024-11-30T13:38:47.0437681Z ./miniperl -Ilib make_ext.pl dist/Env/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.0648736Z Running pm_to_blib for dist/Env directly
2024-11-30T13:38:47.0655736Z ./miniperl -Ilib make_ext.pl ext/Errno/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.1258845Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Errno'
2024-11-30T13:38:47.1325979Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Errno'
2024-11-30T13:38:47.1343065Z ./miniperl -Ilib make_ext.pl dist/Exporter/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.1948186Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Exporter'
2024-11-30T13:38:47.2010492Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Exporter'
2024-11-30T13:38:47.2029809Z ./miniperl -Ilib make_ext.pl dist/ExtUtils-CBuilder/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.2243897Z Running pm_to_blib for dist/ExtUtils-CBuilder directly
2024-11-30T13:38:47.2251412Z ./miniperl -Ilib make_ext.pl cpan/ExtUtils-Constant/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.2462538Z Running pm_to_blib for cpan/ExtUtils-Constant directly
2024-11-30T13:38:47.2469965Z ./miniperl -Ilib make_ext.pl cpan/ExtUtils-Install/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.2679070Z Running pm_to_blib for cpan/ExtUtils-Install directly
2024-11-30T13:38:47.2686205Z ./miniperl -Ilib make_ext.pl cpan/ExtUtils-MakeMaker/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.3303311Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/ExtUtils-MakeMaker'
2024-11-30T13:38:47.3415663Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/ExtUtils-MakeMaker'
2024-11-30T13:38:47.3433914Z ./miniperl -Ilib make_ext.pl cpan/ExtUtils-Manifest/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.4041418Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/ExtUtils-Manifest'
2024-11-30T13:38:47.4103798Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/ExtUtils-Manifest'
2024-11-30T13:38:47.4120850Z ./miniperl -Ilib make_ext.pl ext/ExtUtils-Miniperl/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.4333724Z Running pm_to_blib for ext/ExtUtils-Miniperl directly
2024-11-30T13:38:47.4340688Z ./miniperl -Ilib make_ext.pl cpan/ExtUtils-PL2Bat/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.4553163Z Running pm_to_blib for cpan/ExtUtils-PL2Bat directly
2024-11-30T13:38:47.4560341Z ./miniperl -Ilib make_ext.pl dist/ExtUtils-ParseXS/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.5165272Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/ExtUtils-ParseXS'
2024-11-30T13:38:47.5247674Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/ExtUtils-ParseXS'
2024-11-30T13:38:47.5264332Z ./miniperl -Ilib make_ext.pl cpan/File-Fetch/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.5477130Z Running pm_to_blib for cpan/File-Fetch directly
2024-11-30T13:38:47.5484116Z ./miniperl -Ilib make_ext.pl ext/File-Find/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.5694743Z Running pm_to_blib for ext/File-Find directly
2024-11-30T13:38:47.5701823Z ./miniperl -Ilib make_ext.pl cpan/File-Path/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.5920503Z Running pm_to_blib for cpan/File-Path directly
2024-11-30T13:38:47.5927586Z ./miniperl -Ilib make_ext.pl cpan/File-Temp/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.6138598Z Running pm_to_blib for cpan/File-Temp directly
2024-11-30T13:38:47.6145280Z ./miniperl -Ilib make_ext.pl ext/FileCache/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.6355873Z Running pm_to_blib for ext/FileCache directly
2024-11-30T13:38:47.6363404Z ./miniperl -Ilib make_ext.pl dist/Filter-Simple/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.6970672Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Filter-Simple'
2024-11-30T13:38:47.7031398Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Filter-Simple'
2024-11-30T13:38:47.7049295Z ./miniperl -Ilib make_ext.pl dist/FindBin/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.7653765Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/FindBin'
2024-11-30T13:38:47.7717348Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/FindBin'
2024-11-30T13:38:47.7734619Z ./miniperl -Ilib make_ext.pl cpan/Getopt-Long/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.7948862Z Running pm_to_blib for cpan/Getopt-Long directly
2024-11-30T13:38:47.7956957Z ./miniperl -Ilib make_ext.pl cpan/HTTP-Tiny/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.8570692Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/HTTP-Tiny'
2024-11-30T13:38:47.8633610Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/HTTP-Tiny'
2024-11-30T13:38:47.8651440Z ./miniperl -Ilib make_ext.pl dist/I18N-Collate/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.8864996Z Running pm_to_blib for dist/I18N-Collate directly
2024-11-30T13:38:47.8871809Z ./miniperl -Ilib make_ext.pl dist/I18N-LangTags/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.9473334Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/I18N-LangTags'
2024-11-30T13:38:47.9536388Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/I18N-LangTags'
2024-11-30T13:38:47.9553604Z ./miniperl -Ilib make_ext.pl dist/lib/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:47.9658951Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/lib'
2024-11-30T13:38:47.9724496Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/lib'
2024-11-30T13:38:47.9733069Z ./miniperl -Ilib make_ext.pl cpan/IO-Compress/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.0333769Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/IO-Compress'
2024-11-30T13:38:48.0444824Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/IO-Compress'
2024-11-30T13:38:48.0461346Z ./miniperl -Ilib make_ext.pl cpan/IO-Socket-IP/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.0672759Z Running pm_to_blib for cpan/IO-Socket-IP directly
2024-11-30T13:38:48.0680130Z ./miniperl -Ilib make_ext.pl cpan/IO-Zlib/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.0782655Z Running pm_to_blib for cpan/IO-Zlib directly
2024-11-30T13:38:48.0789112Z ./miniperl -Ilib make_ext.pl cpan/IPC-Cmd/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.0997466Z Running pm_to_blib for cpan/IPC-Cmd directly
2024-11-30T13:38:48.1004530Z ./miniperl -Ilib make_ext.pl ext/IPC-Open3/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.1213153Z Running pm_to_blib for ext/IPC-Open3 directly
2024-11-30T13:38:48.1220414Z ./miniperl -Ilib make_ext.pl cpan/JSON-PP/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.1821221Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/JSON-PP'
2024-11-30T13:38:48.1882828Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/JSON-PP'
2024-11-30T13:38:48.1899680Z ./miniperl -Ilib make_ext.pl dist/Locale-Maketext/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.2503019Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Locale-Maketext'
2024-11-30T13:38:48.2571568Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Locale-Maketext'
2024-11-30T13:38:48.2588390Z ./miniperl -Ilib make_ext.pl cpan/Locale-Maketext-Simple/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.2800120Z Running pm_to_blib for cpan/Locale-Maketext-Simple directly
2024-11-30T13:38:48.2807222Z ./miniperl -Ilib make_ext.pl cpan/Math-BigInt/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.3018947Z Running pm_to_blib for cpan/Math-BigInt directly
2024-11-30T13:38:48.3026089Z ./miniperl -Ilib make_ext.pl dist/Math-Complex/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.3627455Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Math-Complex'
2024-11-30T13:38:48.3689208Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Math-Complex'
2024-11-30T13:38:48.3705597Z ./miniperl -Ilib make_ext.pl cpan/Memoize/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.3918520Z Running pm_to_blib for cpan/Memoize directly
2024-11-30T13:38:48.3925789Z ./miniperl -Ilib make_ext.pl dist/Module-CoreList/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.4521911Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Module-CoreList'
2024-11-30T13:38:48.4593734Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Module-CoreList'
2024-11-30T13:38:48.4612538Z ./miniperl -Ilib make_ext.pl cpan/Module-Load/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.4823548Z Running pm_to_blib for cpan/Module-Load directly
2024-11-30T13:38:48.4830946Z ./miniperl -Ilib make_ext.pl cpan/Module-Load-Conditional/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.5041430Z Running pm_to_blib for cpan/Module-Load-Conditional directly
2024-11-30T13:38:48.5048831Z ./miniperl -Ilib make_ext.pl cpan/Module-Loaded/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.5257961Z Running pm_to_blib for cpan/Module-Loaded directly
2024-11-30T13:38:48.5265052Z ./miniperl -Ilib make_ext.pl cpan/Module-Metadata/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.5869902Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Module-Metadata'
2024-11-30T13:38:48.5932654Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Module-Metadata'
2024-11-30T13:38:48.5952198Z ./miniperl -Ilib make_ext.pl cpan/NEXT/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.6164549Z Running pm_to_blib for cpan/NEXT directly
2024-11-30T13:38:48.6171979Z ./miniperl -Ilib make_ext.pl dist/Net-Ping/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.6799959Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Net-Ping'
2024-11-30T13:38:48.6860759Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Net-Ping'
2024-11-30T13:38:48.6879624Z ./miniperl -Ilib make_ext.pl cpan/Params-Check/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.7089848Z Running pm_to_blib for cpan/Params-Check directly
2024-11-30T13:38:48.7097147Z ./miniperl -Ilib make_ext.pl cpan/Perl-OSType/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.7305801Z Running pm_to_blib for cpan/Perl-OSType directly
2024-11-30T13:38:48.7313143Z ./miniperl -Ilib make_ext.pl ext/PerlIO-scalar/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.7414079Z Running pm_to_blib for ext/PerlIO-scalar directly
2024-11-30T13:38:48.7420518Z ./miniperl -Ilib make_ext.pl cpan/PerlIO-via-QuotedPrint/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.7630498Z Running pm_to_blib for cpan/PerlIO-via-QuotedPrint directly
2024-11-30T13:38:48.7637696Z ./miniperl -Ilib make_ext.pl cpan/Pod-Checker/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.8241109Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Pod-Checker'
2024-11-30T13:38:48.8315142Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Pod-Checker'
2024-11-30T13:38:48.8333205Z ./miniperl -Ilib make_ext.pl cpan/Pod-Escapes/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.8546817Z Running pm_to_blib for cpan/Pod-Escapes directly
2024-11-30T13:38:48.8553646Z ./miniperl -Ilib make_ext.pl dist/if/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.9165292Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/if'
2024-11-30T13:38:48.9229423Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/if'
2024-11-30T13:38:48.9248317Z ./miniperl -Ilib make_ext.pl cpan/Pod-Simple/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:48.9465606Z Running pm_to_blib for cpan/Pod-Simple directly
2024-11-30T13:38:48.9477641Z ./miniperl -Ilib make_ext.pl ext/Pod-Functions/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.0081854Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Pod-Functions'
2024-11-30T13:38:49.0152772Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Pod-Functions'
2024-11-30T13:38:49.0169930Z ./miniperl -Ilib make_ext.pl ext/Pod-Html/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.0770734Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Pod-Html'
2024-11-30T13:38:49.0833468Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Pod-Html'
2024-11-30T13:38:49.0853504Z ./miniperl -Ilib make_ext.pl cpan/Pod-Perldoc/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.1460743Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Pod-Perldoc'
2024-11-30T13:38:49.1540861Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Pod-Perldoc'
2024-11-30T13:38:49.1557578Z ./miniperl -Ilib make_ext.pl cpan/Pod-Usage/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.2158168Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Pod-Usage'
2024-11-30T13:38:49.2231600Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Pod-Usage'
2024-11-30T13:38:49.2248370Z ./miniperl -Ilib make_ext.pl dist/Safe/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.2351878Z Running pm_to_blib for dist/Safe directly
2024-11-30T13:38:49.2358241Z ./miniperl -Ilib make_ext.pl dist/Search-Dict/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.2567144Z Running pm_to_blib for dist/Search-Dict directly
2024-11-30T13:38:49.2574215Z ./miniperl -Ilib make_ext.pl dist/SelfLoader/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.3180704Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/SelfLoader'
2024-11-30T13:38:49.3241069Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/SelfLoader'
2024-11-30T13:38:49.3258127Z ./miniperl -Ilib make_ext.pl cpan/Term-ANSIColor/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.3467496Z Running pm_to_blib for cpan/Term-ANSIColor directly
2024-11-30T13:38:49.3474611Z ./miniperl -Ilib make_ext.pl cpan/Term-Cap/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.4074830Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Term-Cap'
2024-11-30T13:38:49.4135337Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Term-Cap'
2024-11-30T13:38:49.4152217Z ./miniperl -Ilib make_ext.pl dist/Term-Complete/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.4362366Z Running pm_to_blib for dist/Term-Complete directly
2024-11-30T13:38:49.4369670Z ./miniperl -Ilib make_ext.pl dist/Term-ReadLine/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.4587982Z Running pm_to_blib for dist/Term-ReadLine directly
2024-11-30T13:38:49.4595439Z ./miniperl -Ilib make_ext.pl cpan/Term-Table/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.4805221Z Running pm_to_blib for cpan/Term-Table directly
2024-11-30T13:38:49.4812850Z ./miniperl -Ilib make_ext.pl dist/Test/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.5414548Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Test'
2024-11-30T13:38:49.5474975Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Test'
2024-11-30T13:38:49.5491613Z ./miniperl -Ilib make_ext.pl cpan/Test-Harness/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.6092738Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Test-Harness'
2024-11-30T13:38:49.6237702Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Test-Harness'
2024-11-30T13:38:49.6254897Z ./miniperl -Ilib make_ext.pl cpan/Test-Simple/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.6474371Z Running pm_to_blib for cpan/Test-Simple directly
2024-11-30T13:38:49.6481822Z ./miniperl -Ilib make_ext.pl cpan/Test2-Suite/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.6703990Z Running pm_to_blib for cpan/Test2-Suite directly
2024-11-30T13:38:49.6711237Z ./miniperl -Ilib make_ext.pl dist/Text-Abbrev/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.6921492Z Running pm_to_blib for dist/Text-Abbrev directly
2024-11-30T13:38:49.6928994Z ./miniperl -Ilib make_ext.pl cpan/Text-Balanced/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.7138654Z Running pm_to_blib for cpan/Text-Balanced directly
2024-11-30T13:38:49.7145699Z ./miniperl -Ilib make_ext.pl cpan/Text-ParseWords/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.7354513Z Running pm_to_blib for cpan/Text-ParseWords directly
2024-11-30T13:38:49.7361796Z ./miniperl -Ilib make_ext.pl cpan/Text-Tabs/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.7570517Z Running pm_to_blib for cpan/Text-Tabs directly
2024-11-30T13:38:49.7578003Z ./miniperl -Ilib make_ext.pl dist/Thread-Queue/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.8181536Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Thread-Queue'
2024-11-30T13:38:49.8243283Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Thread-Queue'
2024-11-30T13:38:49.8263564Z ./miniperl -Ilib make_ext.pl dist/Thread-Semaphore/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.8870403Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Thread-Semaphore'
2024-11-30T13:38:49.8931550Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Thread-Semaphore'
2024-11-30T13:38:49.8949974Z ./miniperl -Ilib make_ext.pl dist/Tie-File/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.9560250Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Tie-File'
2024-11-30T13:38:49.9622771Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Tie-File'
2024-11-30T13:38:49.9640426Z ./miniperl -Ilib make_ext.pl ext/Tie-Hash-NamedCapture/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.9743247Z Running pm_to_blib for ext/Tie-Hash-NamedCapture directly
2024-11-30T13:38:49.9749320Z ./miniperl -Ilib make_ext.pl ext/Tie-Memoize/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:49.9958805Z Running pm_to_blib for ext/Tie-Memoize directly
2024-11-30T13:38:49.9966007Z ./miniperl -Ilib make_ext.pl cpan/Tie-RefHash/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.0182706Z Running pm_to_blib for cpan/Tie-RefHash directly
2024-11-30T13:38:50.0189469Z ./miniperl -Ilib make_ext.pl cpan/Time-Local/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.0400549Z Running pm_to_blib for cpan/Time-Local directly
2024-11-30T13:38:50.0407787Z ./miniperl -Ilib make_ext.pl dist/XSLoader/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.1009754Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/XSLoader'
2024-11-30T13:38:50.1076355Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/XSLoader'
2024-11-30T13:38:50.1093927Z ./miniperl -Ilib make_ext.pl cpan/autodie/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.1309241Z Running pm_to_blib for cpan/autodie directly
2024-11-30T13:38:50.1316337Z ./miniperl -Ilib make_ext.pl dist/autouse/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.1525683Z Running pm_to_blib for dist/autouse directly
2024-11-30T13:38:50.1532907Z ./miniperl -Ilib make_ext.pl dist/base/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.2137086Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/base'
2024-11-30T13:38:50.2199204Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/base'
2024-11-30T13:38:50.2218527Z ./miniperl -Ilib make_ext.pl cpan/bignum/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.2822318Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/bignum'
2024-11-30T13:38:50.2891938Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/bignum'
2024-11-30T13:38:50.2909535Z ./miniperl -Ilib make_ext.pl dist/constant/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.3568952Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/constant'
2024-11-30T13:38:50.3636276Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/constant'
2024-11-30T13:38:50.3656235Z ./miniperl -Ilib make_ext.pl dist/encoding-warnings/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.4277810Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/encoding-warnings'
2024-11-30T13:38:50.4338522Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/encoding-warnings'
2024-11-30T13:38:50.4355490Z ./miniperl -Ilib make_ext.pl cpan/experimental/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.4566945Z Running pm_to_blib for cpan/experimental directly
2024-11-30T13:38:50.4574033Z ./miniperl -Ilib make_ext.pl cpan/libnet/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.4678307Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/libnet'
2024-11-30T13:38:50.4757033Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/libnet'
2024-11-30T13:38:50.4765527Z ./miniperl -Ilib make_ext.pl cpan/parent/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.4976860Z Running pm_to_blib for cpan/parent directly
2024-11-30T13:38:50.4983936Z ./miniperl -Ilib make_ext.pl cpan/perlfaq/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.5195518Z Running pm_to_blib for cpan/perlfaq directly
2024-11-30T13:38:50.5202750Z ./miniperl -Ilib make_ext.pl cpan/podlators/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.5802275Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/podlators'
2024-11-30T13:38:50.6215670Z Manifying 2 pod documents
2024-11-30T13:38:50.6230396Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/podlators'
2024-11-30T13:38:50.6249085Z ./miniperl -Ilib make_ext.pl cpan/version/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
2024-11-30T13:38:50.6461826Z Running pm_to_blib for cpan/version directly
2024-11-30T13:38:50.6469490Z ./miniperl -Ilib lib/unicore/mktables -C lib/unicore -P pod -maketest -makenormtest -makelist -p
2024-11-30T13:38:50.7356418Z lib/unicore/mktables: Files seem to be ok, not bothering to rebuild.  Add '-w' option to force build
2024-11-30T13:38:50.7413884Z ./miniperl -Ilib make_ext.pl DynaLoader.o  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:50.8024253Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/DynaLoader'
2024-11-30T13:38:50.8091009Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/DynaLoader'
2024-11-30T13:38:50.8108449Z ./miniperl -Ilib mkppport
2024-11-30T13:38:50.8757105Z running "/home/runner/work/busybiber/busybiber/wasm/miniperl" -I../../lib PPPort_pm.PL
2024-11-30T13:38:51.9431428Z including ppphdoc
2024-11-30T13:38:51.9432151Z including inctools
2024-11-30T13:38:51.9432494Z including ppphbin
2024-11-30T13:38:51.9432807Z including version
2024-11-30T13:38:51.9433124Z including threads
2024-11-30T13:38:51.9433416Z including limits
2024-11-30T13:38:51.9433713Z including variables
2024-11-30T13:38:51.9434026Z including subparse
2024-11-30T13:38:51.9434333Z including newCONSTSUB
2024-11-30T13:38:51.9434660Z including magic_defs
2024-11-30T13:38:51.9434974Z including misc
2024-11-30T13:38:51.9435266Z including sv_xpvf
2024-11-30T13:38:51.9435559Z including SvPV
2024-11-30T13:38:51.9435842Z including warn
2024-11-30T13:38:51.9436128Z including format
2024-11-30T13:38:51.9436417Z including uv
2024-11-30T13:38:51.9436974Z including memory
2024-11-30T13:38:51.9437269Z including mess
2024-11-30T13:38:51.9437564Z including mPUSH
2024-11-30T13:38:51.9437865Z including call
2024-11-30T13:38:51.9438149Z including newRV
2024-11-30T13:38:51.9438442Z including MY_CXT
2024-11-30T13:38:51.9439023Z including SvREFCNT
2024-11-30T13:38:51.9439345Z including newSV_type
2024-11-30T13:38:51.9439673Z including newSVpv
2024-11-30T13:38:51.9439989Z including Sv_set
2024-11-30T13:38:51.9440286Z including shared_pv
2024-11-30T13:38:51.9440597Z including HvNAME
2024-11-30T13:38:51.9440897Z including gv
2024-11-30T13:38:51.9441171Z including pvs
2024-11-30T13:38:51.9441461Z including magic
2024-11-30T13:38:51.9441753Z including cop
2024-11-30T13:38:51.9442028Z including grok
2024-11-30T13:38:51.9442318Z including snprintf
2024-11-30T13:38:51.9442608Z including sprintf
2024-11-30T13:38:51.9442872Z including exception
2024-11-30T13:38:51.9443163Z including strlfuncs
2024-11-30T13:38:51.9443448Z including utf8
2024-11-30T13:38:51.9443728Z including pv_tools
2024-11-30T13:38:51.9444022Z including locale
2024-11-30T13:38:51.9474353Z running "/home/runner/work/busybiber/busybiber/wasm/miniperl" -I../../lib ppport_h.PL
2024-11-30T13:38:51.9610709Z ppport.h in cpan/DB_File is up-to-date
2024-11-30T13:38:51.9611237Z ppport.h in cpan/IPC-SysV is up-to-date
2024-11-30T13:38:51.9611718Z ppport.h in cpan/Win32API-File is up-to-date
2024-11-30T13:38:51.9612180Z ppport.h in dist/Data-Dumper is up-to-date
2024-11-30T13:38:51.9612642Z ppport.h in dist/Devel-PPPort is up-to-date
2024-11-30T13:38:51.9613133Z ppport.h in dist/ExtUtils-ParseXS is up-to-date
2024-11-30T13:38:51.9613595Z ppport.h in dist/IO is up-to-date
2024-11-30T13:38:51.9614007Z ppport.h in dist/PathTools is up-to-date
2024-11-30T13:38:51.9614290Z ppport.h in dist/Storable is up-to-date
2024-11-30T13:38:51.9614557Z ppport.h in dist/threads is up-to-date
2024-11-30T13:38:51.9614828Z ppport.h in dist/threads-shared is up-to-date
2024-11-30T13:38:51.9615104Z ppport.h in dist/Time-HiRes is up-to-date
2024-11-30T13:38:51.9615381Z ppport.h in dist/Unicode-Normalize is up-to-date
2024-11-30T13:38:51.9615666Z removing temporary file PPPort.pm
2024-11-30T13:38:51.9615921Z removing temporary file ppport.h
2024-11-30T13:38:51.9627705Z ./miniperl -Ilib make_ext.pl lib/auto/mro/mro.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.0236055Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/mro'
2024-11-30T13:38:52.0307580Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/mro'
2024-11-30T13:38:52.0324901Z ./miniperl -Ilib make_ext.pl lib/auto/Devel/Peek/Peek.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.0928738Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Devel-Peek'
2024-11-30T13:38:52.0999303Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Devel-Peek'
2024-11-30T13:38:52.1017512Z ./miniperl -Ilib make_ext.pl lib/auto/File/DosGlob/DosGlob.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.1628489Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/File-DosGlob'
2024-11-30T13:38:52.1700066Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/File-DosGlob'
2024-11-30T13:38:52.1717711Z ./miniperl -Ilib make_ext.pl lib/auto/File/Glob/Glob.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.2323544Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/File-Glob'
2024-11-30T13:38:52.2394391Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/File-Glob'
2024-11-30T13:38:52.2411536Z ./miniperl -Ilib make_ext.pl lib/auto/Sys/Syslog/Syslog.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.3021937Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Sys-Syslog'
2024-11-30T13:38:52.3092657Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Sys-Syslog'
2024-11-30T13:38:52.3111944Z ./miniperl -Ilib make_ext.pl lib/auto/Sys/Hostname/Hostname.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.3723690Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Sys-Hostname'
2024-11-30T13:38:52.3795495Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Sys-Hostname'
2024-11-30T13:38:52.3815281Z ./miniperl -Ilib make_ext.pl lib/auto/PerlIO/via/via.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.4422903Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-via'
2024-11-30T13:38:52.4493113Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-via'
2024-11-30T13:38:52.4511244Z ./miniperl -Ilib make_ext.pl lib/auto/PerlIO/mmap/mmap.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.5120359Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-mmap'
2024-11-30T13:38:52.5193397Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-mmap'
2024-11-30T13:38:52.5213851Z ./miniperl -Ilib make_ext.pl lib/auto/PerlIO/encoding/encoding.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.5831397Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-encoding'
2024-11-30T13:38:52.5901632Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/PerlIO-encoding'
2024-11-30T13:38:52.5922470Z ./miniperl -Ilib make_ext.pl lib/auto/B/B.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.6529872Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/B'
2024-11-30T13:38:52.6606801Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/B'
2024-11-30T13:38:52.6625395Z ./miniperl -Ilib make_ext.pl lib/auto/attributes/attributes.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.7234235Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/attributes'
2024-11-30T13:38:52.7304138Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/attributes'
2024-11-30T13:38:52.7321385Z ./miniperl -Ilib make_ext.pl lib/auto/Unicode/Normalize/Normalize.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.7933251Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Unicode-Normalize'
2024-11-30T13:38:52.8006013Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Unicode-Normalize'
2024-11-30T13:38:52.8025303Z ./miniperl -Ilib make_ext.pl lib/auto/Unicode/Collate/Collate.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.8636047Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Unicode-Collate'
2024-11-30T13:38:52.8907192Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Unicode-Collate'
2024-11-30T13:38:52.8928396Z ./miniperl -Ilib make_ext.pl lib/auto/threads/threads.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:52.9536899Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/threads'
2024-11-30T13:38:52.9609877Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/threads'
2024-11-30T13:38:52.9629171Z ./miniperl -Ilib make_ext.pl lib/auto/threads/shared/shared.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.0235798Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/threads-shared'
2024-11-30T13:38:53.0306491Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/threads-shared'
2024-11-30T13:38:53.0323824Z ./miniperl -Ilib make_ext.pl lib/auto/IPC/SysV/SysV.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.0926783Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/IPC-SysV'
2024-11-30T13:38:53.1003290Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/IPC-SysV'
2024-11-30T13:38:53.1021145Z ./miniperl -Ilib make_ext.pl lib/auto/re/re.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.1637076Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/re'
2024-11-30T13:38:53.1712113Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/re'
2024-11-30T13:38:53.1729524Z ./miniperl -Ilib make_ext.pl lib/auto/Digest/MD5/MD5.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.2333513Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Digest-MD5'
2024-11-30T13:38:53.2407358Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Digest-MD5'
2024-11-30T13:38:53.2423618Z ./miniperl -Ilib make_ext.pl lib/auto/Digest/SHA/SHA.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.3028317Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Digest-SHA'
2024-11-30T13:38:53.3107314Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Digest-SHA'
2024-11-30T13:38:53.3124343Z ./miniperl -Ilib make_ext.pl lib/auto/SDBM_File/SDBM_File.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.3732559Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/SDBM_File'
2024-11-30T13:38:53.3804272Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/SDBM_File'
2024-11-30T13:38:53.3821204Z ./miniperl -Ilib make_ext.pl lib/auto/List/Util/Util.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.4428088Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Scalar-List-Utils'
2024-11-30T13:38:53.4503539Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Scalar-List-Utils'
2024-11-30T13:38:53.4521125Z ./miniperl -Ilib make_ext.pl lib/auto/Math/BigInt/FastCalc/FastCalc.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.5129684Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Math-BigInt-FastCalc'
2024-11-30T13:38:53.5200964Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Math-BigInt-FastCalc'
2024-11-30T13:38:53.5219531Z ./miniperl -Ilib make_ext.pl lib/auto/Data/Dumper/Dumper.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.5828373Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Data-Dumper'
2024-11-30T13:38:53.5898844Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Data-Dumper'
2024-11-30T13:38:53.5919638Z ./miniperl -Ilib make_ext.pl lib/auto/I18N/Langinfo/Langinfo.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.6525894Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/I18N-Langinfo'
2024-11-30T13:38:53.6597632Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/I18N-Langinfo'
2024-11-30T13:38:53.6615539Z ./miniperl -Ilib make_ext.pl lib/auto/Time/HiRes/HiRes.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.7229649Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Time-HiRes'
2024-11-30T13:38:53.7300411Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Time-HiRes'
2024-11-30T13:38:53.7317169Z ./miniperl -Ilib make_ext.pl lib/auto/Time/Piece/Piece.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.7945742Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Time-Piece'
2024-11-30T13:38:53.8019561Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Time-Piece'
2024-11-30T13:38:53.8037988Z ./miniperl -Ilib make_ext.pl lib/auto/IO/IO.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.8646762Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/IO'
2024-11-30T13:38:53.8732803Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/IO'
2024-11-30T13:38:53.8749691Z ./miniperl -Ilib make_ext.pl lib/auto/Socket/Socket.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:53.9352978Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Socket'
2024-11-30T13:38:53.9424900Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Socket'
2024-11-30T13:38:53.9442575Z ./miniperl -Ilib make_ext.pl lib/auto/Hash/Util/FieldHash/FieldHash.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.0046298Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Hash-Util-FieldHash'
2024-11-30T13:38:54.0117009Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Hash-Util-FieldHash'
2024-11-30T13:38:54.0133421Z ./miniperl -Ilib make_ext.pl lib/auto/Hash/Util/Util.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.0742151Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Hash-Util'
2024-11-30T13:38:54.0808618Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Hash-Util'
2024-11-30T13:38:54.0827011Z ./miniperl -Ilib make_ext.pl lib/auto/Filter/Util/Call/Call.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.1434580Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Filter-Util-Call'
2024-11-30T13:38:54.1505100Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Filter-Util-Call'
2024-11-30T13:38:54.1522068Z ./miniperl -Ilib make_ext.pl lib/auto/POSIX/POSIX.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.2126415Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/POSIX'
2024-11-30T13:38:54.2198950Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/POSIX'
2024-11-30T13:38:54.2216013Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/Unicode/Unicode.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.2298606Z Can't find extension Encode/Unicode in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.2304477Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/Encode.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.2908665Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode'
2024-11-30T13:38:54.2998786Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/Byte'
2024-11-30T13:38:54.3184481Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/Byte'
2024-11-30T13:38:54.3213045Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/CN'
2024-11-30T13:38:54.3300136Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/CN'
2024-11-30T13:38:54.3329209Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/EBCDIC'
2024-11-30T13:38:54.3411668Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/EBCDIC'
2024-11-30T13:38:54.3439920Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/JP'
2024-11-30T13:38:54.3523513Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/JP'
2024-11-30T13:38:54.3551594Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/KR'
2024-11-30T13:38:54.3633433Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/KR'
2024-11-30T13:38:54.3661408Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/Symbol'
2024-11-30T13:38:54.3744036Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/Symbol'
2024-11-30T13:38:54.3772488Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/TW'
2024-11-30T13:38:54.3852496Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/TW'
2024-11-30T13:38:54.3880440Z make[2]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/Unicode'
2024-11-30T13:38:54.3951779Z make[2]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode/Unicode'
2024-11-30T13:38:54.4019022Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Encode'
2024-11-30T13:38:54.4039498Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/JP/JP.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.4122498Z Can't find extension Encode/JP in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.4128761Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/KR/KR.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.4209967Z Can't find extension Encode/KR in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.4215988Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/EBCDIC/EBCDIC.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.4297096Z Can't find extension Encode/EBCDIC in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.4303013Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/CN/CN.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.4383238Z Can't find extension Encode/CN in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.4389401Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/Symbol/Symbol.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.4469602Z Can't find extension Encode/Symbol in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.4475570Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/Byte/Byte.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.4556157Z Can't find extension Encode/Byte in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.4562457Z ./miniperl -Ilib make_ext.pl lib/auto/Encode/TW/TW.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.4643722Z Can't find extension Encode/TW in any of cpan dist ext at make_ext.pl line 264.
2024-11-30T13:38:54.4649952Z ./miniperl -Ilib make_ext.pl lib/auto/Compress/Raw/Zlib/Zlib.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.5260189Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Compress-Raw-Zlib'
2024-11-30T13:38:54.5337369Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Compress-Raw-Zlib'
2024-11-30T13:38:54.5357132Z ./miniperl -Ilib make_ext.pl lib/auto/Compress/Raw/Bzip2/Bzip2.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.5964891Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Compress-Raw-Bzip2'
2024-11-30T13:38:54.6042222Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/Compress-Raw-Bzip2'
2024-11-30T13:38:54.6058928Z ./miniperl -Ilib make_ext.pl lib/auto/MIME/Base64/Base64.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.6666197Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/cpan/MIME-Base64'
2024-11-30T13:38:54.6738754Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/cpan/MIME-Base64'
2024-11-30T13:38:54.6755754Z ./miniperl -Ilib make_ext.pl lib/auto/Cwd/Cwd.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.7361313Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/PathTools'
2024-11-30T13:38:54.7447136Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/PathTools'
2024-11-30T13:38:54.7463918Z ./miniperl -Ilib make_ext.pl lib/auto/Storable/Storable.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.8074308Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/dist/Storable'
2024-11-30T13:38:54.8144710Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/dist/Storable'
2024-11-30T13:38:54.8163875Z ./miniperl -Ilib make_ext.pl lib/auto/Fcntl/Fcntl.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.8779260Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Fcntl'
2024-11-30T13:38:54.8851680Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Fcntl'
2024-11-30T13:38:54.8871347Z ./miniperl -Ilib make_ext.pl lib/auto/Opcode/Opcode.a  MAKE="make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
2024-11-30T13:38:54.9487610Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/ext/Opcode'
2024-11-30T13:38:54.9559559Z make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/ext/Opcode'
2024-11-30T13:38:54.9595117Z  
2024-11-30T13:38:54.9601921Z 	Everything is up to date. Type 'make test' to run test suite.
2024-11-30T13:38:54.9621053Z /home/runner/work/busybiber/busybiber/wasm/../native/miniperl installperl --destdir=   
2024-11-30T13:38:55.2224498Z perl isn't executable!
2024-11-30T13:38:55.2234722Z make: *** [makefile:460: install-all] Error 2
2024-11-30T13:38:55.2238769Z emmake: error: 'make install' failed (returned 2)
2024-11-30T13:38:55.2337866Z ##[error]Process completed with exit code 1.

Full workflow:

name: buildperlwasm

on: workflow_dispatch
env:
  URLPERL: https://www.cpan.org/src/5.0/perl-5.40.0.tar.gz
  EMSCRIPTEN_VERSION: 3.1.73

jobs:

  buildperlwasm:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4

      - name: Setup Emscripten
        uses: mymindstorm/setup-emsdk@v13
        with:
          version: ${{env.EMSCRIPTEN_VERSION}}

      - name: Install Perl static native
        shell: bash
        run: |
          mkdir native && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=native
          cd native && BUILD_ZLIB=0 sh +x ./Configure -sde -Dman1dir=none -Dman3dir=none -Dprefix="$PWD/prefix" -Dusedevel -Uversiononly -Dlibs="-lpthread -ldl -lm -lutil -lc -lz" -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode" && cd -
          make -C native
          make -C native install

      - name: Heredoc
        run: |
          cat <<'EOF' > hintfile_wasm.sh
            osname="emscripten"
            archname="wasm"
            osvers="2.0.5"

            cc="emcc"
            ld="emcc"

            #nm="`which llvm-nm`"  # note from Glossary: 'After Configure runs, the value is reset to a plain "nm" and is not useful.'
            ar="`which emar`"  # note from Glossary: 'After Configure runs, the value is reset to a plain "ar" and is not useful.'
            ranlib="`which emranlib`"

            #TODO: almost all of the known_extensions are still being built. we should probably exclude some of them! (see also nonxs_ext)
            #dynamic_ext=''
            #noextensions='IPC/SysV'
            # Here's a fun one: apparently, when building perlmini.c, emcc notices that it's a symlink to perl.c, and compiles to perl.o
            # (because there is no -o option), so the final perl ends up thinking it's miniperl (shown in "perl -v", @INC doesn't work, etc.).
            # Because of this and other issues I've had with symlinks, I'm switching to hard links instead.
            # (Another possible fix might be to fix the Makefile steps so that they use the -o option, but this solution works for now.)
            #TODO Later: In NODEFS, does Perl's -e test work correctly on symlinks? (./t/TEST was having issues detecting ./t/perl, a symlink to ./perl).
            lns="/bin/ln"

            #prefix="/opt/perl"
            inc_version_list="none"

            loclibpth=''
            glibpth=''

            usemymalloc="n"
            uselargefiles="n"
            usenm='undef'

            usemallocwrap="define"
            d_procselfexe='undef'
            d_dlopen='undef'

            dlsrc='none'
            d_getgrgid_r='define'
            d_getgrnam_r='define'
            d_libname_unique="define"
            d_getnameinfo='define'

            d_setrgid='undef'
            d_setruid='undef'
            d_setproctitle='undef'
            d_malloc_size='undef'
            d_malloc_good_size='undef'
            d_fdclose='undef'

            #d_prctl='define' # hm, it's present in the libc source, but Configure shows Emscripten error output? -> for now, assume it's not available

            # It *looks* like shm*, sem* and a few others exist in Emscripten's libc,
            # but I'm not sure why Configure isn't detecting them. But at the moment I'm not going
            # to worry about them, and just not build IPC-SysV.
            d_clearenv='undef'
            d_cuserid='undef'
            d_eaccess='undef'
            d_getspnam='undef'
            d_msgctl='undef'
            d_msgget='undef'
            d_msgrcv='undef'
            d_msgsnd='undef'
            d_semget='undef'
            d_semop='undef'
            d_shmat='undef'
            d_shmctl='undef'
            d_shmdt='undef'
            d_shmget='undef'
            d_syscall='undef'


            # Emscripten does not have signals support (documentation isn't 100% clear on this? but see "$EMSCRIPTEN/system/include/libc/setjmp.h")
            # but if you do: grep -r 'Calling stub instead of' "$EMSCRIPTEN"
            # you'll see the unsupported stuff (as of 1.37.35):
            # signal() sigaction() sigprocmask() __libc_current_sigrtmin __libc_current_sigrtmax kill() killpg() siginterrupt() raise() pause()
            # plus: "Calling longjmp() instead of siglongjmp()"
            #d_sigaction='undef'
            #d_sigprocmask='undef'

            d_killpg='undef'
            d_pause='undef'
            d_sigsetjmp='undef' # this also disables Perl's use of siglongjmp() (see config.h)
            # the others either aren't used by Perl (like siginterrupt) or can't be Configure'd (like kill)
            #TODO Later: currently I've disabled Perl's use of signal() by patching the source - maybe there's a better way?

            # Emscripten doesn't actually have these either (see "$EMSCRIPTEN/src/library.js")
            d_wait4='undef'
            d_waitpid='undef'
            d_fork='define' # BUT, perl needs this one to at least build
            d_vfork='undef'
            d_pseudofork='undef'

            i_pthread='undef'
            d_pthread_atfork='undef'
            d_pthread_attr_setscope='undef'
            d_pthread_yield='undef'

            # We're avoiding all the 64-bit stuff for now.
            # Commented out stuff is correctly detected.
            #TODO: JavaScript uses 64-bit IEEE double FP numbers - will Perl use those?
            #TODO: Now that we've switched to WebAssembly, can we use 64 bits everywhere?
            # see https://groups.google.com/forum/#!topic/emscripten-discuss/nWmO3gi8_Jg
            #use64bitall='undef'
            #use64bitint='undef'
            #usemorebits='undef'
            #usequadmath='undef'
            #TODO Later: Why does Configure seem to ignore the following? (and do we care?)
            d_quad='undef'

            #TODO Later: The test for "selectminbits" seems to fail,
            # the error appears to be coming from this line (because apparently stream.stream_ops is undefined):
            # https://github.com/kripken/emscripten/blob/ddfc3e32f65/src/library_syscall.js#L750
            # For now, just use this number from a build with an earlier version where this didn't fail:
            selectminbits='32'
            alignbytes='4'
            optimize="-O2"


            ldflags="$ldflags -lm -O2 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -Wno-almost-asm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s WASM=1"

            # the following is needed for the "musl" libc provided by emscripten to provide all functions
            # from Makefile.emcc / Makefile.micro  -DSTANDARD_C -DPERL_USE_SAFE_PUTENV
            # disable this warning, I don't think we need it - TODO: how to append this after -Wall?
            ccflags="$ccflags -D_GNU_SOURCE -D_POSIX_C_SOURCE  -DNO_MATHOMS -Wno-null-pointer-arithmetic"

            # Configure apparently changes "-s ASSERTIONS=2 -s STACK_OVERFLOW_CHECK=2" to "-s -s" when converting ccflags to cppflags
            # this is the current hack/workaround: copy cppflags from config.sh and fix it (TODO Later: better way would be to patch Configure)
            cppflags='-lm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'

            libs='-lm'
          EOF

      - name: Install Perl static wasm
        shell: bash
        run: |
          mkdir wasm && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=wasm
          cp hintfile_wasm.sh wasm/hints/emscripten.sh
          cd wasm
          emconfigure bash ./Configure -sde -Dman1dir=none -Dman3dir=none -Dmyhostname='localhost' -Dmydomain='.local' -Dperladmin=root -Dhintfile=emscripten -Dsysroot=$(dirname $(which emcc))/system -Dhostperl=$PWD/../native/miniperl -Dhostgenerate=$PWD/../native/generate_uudmap -Dprefix=$PWD/prefix -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode"
          sed -i 's/$(generated_pods)//' Makefile
          sed -i 's/public = $(PERL_EXE) utilities/public = $(PERL_EXE)/' Makefile

          emmake make
          node ./perl -e 'print("hello world\n");'

          emmake make install

@Leont
Copy link
Contributor

Leont commented Nov 30, 2024

hello world printed successfully. Note that some late part of emmake make tries to execute ./perl (and this currently does not work with emscripten as it does not auto-add shebang to the final executables), but I would say that make should not do that in these cross-compilation scenarios.

In general our cross-compilation support is poor, and a lot of it is hard to fix without rewriting everything.

How can I instruct it to not try to use the freshly-produced binary and only use the hostminiperl?

You could try to change the RUN_PERL definition in the Makefile to use the hostminiperl.

@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 30, 2024

I've tried patching RUN_PERL to use /usr/bin/perl but to no avail - apparently whatever prints pers isn't executable is not using RUN_PERL and instead uses wasm/prefix/bin/perl (the freshly-installed perl binary) regardless of RUN_PERL

This is being printed by the installperl script:

-x $ndbg . 'perl' . $exe_ext || die "${ndbg}perl$exe_ext isn't executable!\n";

It checks if the produced perl binary has executable bit

chmod +x ./perl before running emmake make install helped!

@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 30, 2024

Current emmake make install problems:

  • could not copy utils as I don't build them because of some other problems (will put them in the issue later)
  • could not copy pods as I disabled their generation for now

Is it possible to disabled pod-generation in some proper way?

But otherwise, it completed!

The emmake make install log:
make_install.txt

@vadimkantorov
Copy link
Author

vadimkantorov commented Nov 30, 2024

If I comment out sed -i 's/$(generated_pods)//' Makefile, then I get the following errors during emmake make:

2024-11-30T21:24:04.2461256Z emcc -c -DPERL_CORE -D_GNU_SOURCE -D_POSIX_C_SOURCE -DNO_MATHOMS -Wno-null-pointer-arithmetic -pipe -fstack-protector-strong -std=c99 -O2 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings miniperlmain.c
2024-11-30T21:24:04.4662462Z rm: cannot remove 'miniperl': No such file or directory
2024-11-30T21:24:04.4663312Z make: [makefile:383: lib/buildcustomize.pl] Error 1 (ignored)
2024-11-30T21:24:04.4664055Z /bin/ln /home/runner/work/busybiber/busybiber/wasm/../native/miniperl miniperl
2024-11-30T21:24:04.4673602Z ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
2024-11-30T21:24:04.4726062Z ./miniperl -Ilib -f write_buildcustomize.pl 'osname' "emscripten"
2024-11-30T21:24:04.4899714Z /bin/ln: failed to access '../README.aix': No such file or directory
2024-11-30T21:24:04.4924643Z /bin/ln: failed to access '../README.amiga': No such file or directory
2024-11-30T21:24:04.4949645Z /bin/ln: failed to access '../README.android': No such file or directory
2024-11-30T21:24:04.4974690Z /bin/ln: failed to access '../README.bs2000': No such file or directory
2024-11-30T21:24:04.4999897Z /bin/ln: failed to access '../README.cn': No such file or directory
2024-11-30T21:24:04.5024193Z /bin/ln: failed to access '../README.cygwin': No such file or directory
2024-11-30T21:24:04.5049036Z /bin/ln: failed to access '../README.freebsd': No such file or directory
2024-11-30T21:24:04.5073306Z /bin/ln: failed to access '../README.haiku': No such file or directory
2024-11-30T21:24:04.5097932Z /bin/ln: failed to access '../README.hpux': No such file or directory
2024-11-30T21:24:04.5122673Z /bin/ln: failed to access '../README.hurd': No such file or directory
2024-11-30T21:24:04.5147514Z /bin/ln: failed to access '../README.irix': No such file or directory
2024-11-30T21:24:04.5172022Z /bin/ln: failed to access '../README.jp': No such file or directory
2024-11-30T21:24:04.5197621Z /bin/ln: failed to access '../README.ko': No such file or directory
2024-11-30T21:24:04.5221581Z /bin/ln: failed to access '../README.linux': No such file or directory
2024-11-30T21:24:04.5246731Z /bin/ln: failed to access '../README.macosx': No such file or directory
2024-11-30T21:24:04.5271761Z /bin/ln: failed to access '../README.openbsd': No such file or directory
2024-11-30T21:24:04.5297373Z /bin/ln: failed to access '../README.os2': No such file or directory
2024-11-30T21:24:04.5321457Z /bin/ln: failed to access '../README.os390': No such file or directory
2024-11-30T21:24:04.5345794Z /bin/ln: failed to access '../README.os400': No such file or directory
2024-11-30T21:24:04.5369964Z /bin/ln: failed to access '../README.plan9': No such file or directory
2024-11-30T21:24:04.5394355Z /bin/ln: failed to access '../README.qnx': No such file or directory
2024-11-30T21:24:04.5419426Z /bin/ln: failed to access '../README.riscos': No such file or directory
2024-11-30T21:24:04.5444700Z /bin/ln: failed to access '../README.solaris': No such file or directory
2024-11-30T21:24:04.5469188Z /bin/ln: failed to access '../README.synology': No such file or directory
2024-11-30T21:24:04.5493206Z /bin/ln: failed to access '../README.tru64': No such file or directory
2024-11-30T21:24:04.5520584Z /bin/ln: failed to access '../README.tw': No such file or directory
2024-11-30T21:24:04.5546278Z /bin/ln: failed to access '../README.vos': No such file or directory
2024-11-30T21:24:04.5570642Z /bin/ln: failed to access '../README.win32': No such file or directory
2024-11-30T21:24:04.5577991Z rm -f pod/perl5400delta.pod
2024-11-30T21:24:04.5587763Z /bin/ln perldelta.pod pod/perl5400delta.pod
2024-11-30T21:24:04.5595263Z /bin/ln: failed to access 'perldelta.pod': No such file or directory
2024-11-30T21:24:04.5597149Z make: *** [makefile:429: pod/perl5400delta.pod] Error 1
2024-11-30T21:24:04.5602745Z emmake: error: 'make' failed (returned 2)
2024-11-30T21:24:04.5710093Z ##[error]Process completed with exit code 1.

Regarding utilities, what exactly is built in this target? E.g. could I manually make the utilities targets one by one to find out which work and which fail?

If I uncomment sed -i 's/public = $(PERL_EXE) utilities/public = $(PERL_EXE)/' Makefile, here are the errors I get:

So it for some reason tries to execute ./perl -Ilib utils/corelist.PL instead of host miniperl

Extracting utils/Makefile (with variable substitutions)
 
	Making utilities
make[1]: Entering directory '/home/runner/work/busybiber/busybiber/wasm/utils'
../perl -I../lib corelist.PL
make[1]: ../perl: Permission denied
make[1]: Leaving directory '/home/runner/work/busybiber/busybiber/wasm/utils'
make[1]: *** [Makefile:21: corelist] Error 127
make: *** [makefile:295: utilities] Error 2
emmake: error: 'make' failed (returned 2)

Although for host perl build, it correctly uses miniperl:

2024-11-30T19:19:54.9796151Z Extracting utils/Makefile (with variable substitutions)
2024-11-30T19:19:54.9809568Z  
2024-11-30T19:19:54.9809858Z 	Making utilities
2024-11-30T19:19:54.9827568Z make[1]: Entering directory '/home/runner/work/busybiber/busybiber/native/utils'
2024-11-30T19:19:54.9828204Z ../miniperl -I../lib corelist.PL

How can I make it always use the host's miniperl for launching corelist.PL?

So it appears that utils/Makefile contains this in the header - which is the cause of the problem:

Extracting utils/Makefile (with variable substitutions)
# -*- mode: Perl; buffer-read-only: t -*-
# !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
# This file is built by utils/Makefile.PL.
# Any changes made here will be lost!

PERL = ../perl
REALPERL = ../perl

I produced this file by running emmake make utils/Makefile. How can I force it to set PERL/REALPERL to hosts's miniperl?

utils/Makefile.PL contains the following which is problematic for cross-compilation scenarios. I'd say it should use host miniperl if it's specified in a config.

# These use the Cwd extension.  For statically-built perls, we
# need perl, not just miniperl.
my $perl = defined $Config{usedl} ? '../miniperl' : '../perl';

print $fh <<"EOT";
PERL = $perl
REALPERL = ../perl
RUN =  # Used mainly cross-compilation setups.

@vadimkantorov
Copy link
Author

vadimkantorov commented Dec 1, 2024

So the current workaround for make utilities involves manual setting PERL = miniperl.

The remaining question is how to bypass problems with pod generation? (and which makefile targets are pod-related? so that I could try running/debugging them manually one by one)

name: buildperlwasm

on: workflow_dispatch
env:
  URLPERL: https://www.cpan.org/src/5.0/perl-5.40.0.tar.gz
  EMSCRIPTEN_VERSION: 3.1.73

jobs:

  buildperlwasm:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4

      - name: Setup Emscripten
        uses: mymindstorm/setup-emsdk@v13
        with:
          version: ${{env.EMSCRIPTEN_VERSION}}

      - name: Install Perl static native
        shell: bash
        run: |
          mkdir native && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=native
          cd native && BUILD_ZLIB=0 sh +x ./Configure -sde -Dman1dir=none -Dman3dir=none -Dprefix="$PWD/prefix" -Dusedevel -Uversiononly -Dlibs="-lpthread -ldl -lm -lutil -lc -lz" -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode" && cd -
          make -C native
          make -C native install

      - name: Heredoc
        run: |
          cat <<'EOF' > hintfile_wasm.sh
            #TODO: almost all of the known_extensions are still being built. we should probably exclude some of them! (see also nonxs_ext)
            #dynamic_ext=''
            #noextensions='IPC/SysV'
            # Here's a fun one: apparently, when building perlmini.c, emcc notices that it's a symlink to perl.c, and compiles to perl.o
            # (because there is no -o option), so the final perl ends up thinking it's miniperl (shown in "perl -v", @INC doesn't work, etc.).
            # Because of this and other issues I've had with symlinks, I'm switching to hard links instead.
            # (Another possible fix might be to fix the Makefile steps so that they use the -o option, but this solution works for now.)
            #TODO Later: In NODEFS, does Perl's -e test work correctly on symlinks? (./t/TEST was having issues detecting ./t/perl, a symlink to ./perl).
            lns="/bin/ln"

            loclibpth=''
            glibpth=''

            usemymalloc="n"
            uselargefiles="n"
            usenm='undef'

            usemallocwrap="define"
            d_procselfexe='undef'
            d_dlopen='undef'

            dlsrc='none'
            d_getgrgid_r='define'
            d_getgrnam_r='define'
            d_libname_unique="define"
            d_getnameinfo='define'

            d_setrgid='undef'
            d_setruid='undef'
            d_setproctitle='undef'
            d_malloc_size='undef'
            d_malloc_good_size='undef'
            d_fdclose='undef'

            #d_prctl='define' # hm, it's present in the libc source, but Configure shows Emscripten error output? -> for now, assume it's not available

            # It *looks* like shm*, sem* and a few others exist in Emscripten's libc,
            # but I'm not sure why Configure isn't detecting them. But at the moment I'm not going
            # to worry about them, and just not build IPC-SysV.
            d_clearenv='undef'
            d_cuserid='undef'
            d_eaccess='undef'
            d_getspnam='undef'
            d_msgctl='undef'
            d_msgget='undef'
            d_msgrcv='undef'
            d_msgsnd='undef'
            d_semget='undef'
            d_semop='undef'
            d_shmat='undef'
            d_shmctl='undef'
            d_shmdt='undef'
            d_shmget='undef'
            d_syscall='undef'


            # Emscripten does not have signals support (documentation isn't 100% clear on this? but see "$EMSCRIPTEN/system/include/libc/setjmp.h")
            # but if you do: grep -r 'Calling stub instead of' "$EMSCRIPTEN"
            # you'll see the unsupported stuff (as of 1.37.35):
            # signal() sigaction() sigprocmask() __libc_current_sigrtmin __libc_current_sigrtmax kill() killpg() siginterrupt() raise() pause()
            # plus: "Calling longjmp() instead of siglongjmp()"
            #d_sigaction='undef'
            #d_sigprocmask='undef'

            d_killpg='undef'
            d_pause='undef'
            d_sigsetjmp='undef' # this also disables Perl's use of siglongjmp() (see config.h)
            # the others either aren't used by Perl (like siginterrupt) or can't be Configure'd (like kill)
            #TODO Later: currently I've disabled Perl's use of signal() by patching the source - maybe there's a better way?

            # Emscripten doesn't actually have these either (see "$EMSCRIPTEN/src/library.js")
            d_wait4='undef'
            d_waitpid='undef'
            d_fork='define' # BUT, perl needs this one to at least build
            d_vfork='undef'
            d_pseudofork='undef'

            i_pthread='undef'
            d_pthread_atfork='undef'
            d_pthread_attr_setscope='undef'
            d_pthread_yield='undef'

            #TODO Later: Why does Configure seem to ignore the following? (and do we care?)
            d_quad='undef'

            #TODO Later: The test for "selectminbits" seems to fail,
            # the error appears to be coming from this line (because apparently stream.stream_ops is undefined):
            # https://github.com/kripken/emscripten/blob/ddfc3e32f65/src/library_syscall.js#L750
            # For now, just use this number from a build with an earlier version where this didn't fail:
            selectminbits='32'
            alignbytes='4'


            ldflags="$ldflags -lm -O2 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -Wno-almost-asm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s WASM=1"

            # the following is needed for the "musl" libc provided by emscripten to provide all functions
            # from Makefile.emcc / Makefile.micro  -DSTANDARD_C -DPERL_USE_SAFE_PUTENV
            # disable this warning, I don't think we need it - TODO: how to append this after -Wall?
            ccflags="$ccflags -D_GNU_SOURCE -D_POSIX_C_SOURCE  -DNO_MATHOMS -Wno-null-pointer-arithmetic"

            # Configure apparently changes "-s ASSERTIONS=2 -s STACK_OVERFLOW_CHECK=2" to "-s -s" when converting ccflags to cppflags
            # this is the current hack/workaround: copy cppflags from config.sh and fix it (TODO Later: better way would be to patch Configure)
            cppflags='-lm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'

          EOF

      - name: Install Perl static wasm
        shell: bash
        run: |
          mkdir wasm && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=wasm
          cp hintfile_wasm.sh wasm/hints/emscripten.sh
          cd wasm

          emconfigure bash ./Configure -sde -Dinc_version_list=none -Dman1dir=none -Dman3dir=none -Dosname="emscripten" -Darchname="wasm" -Dosvers="2.0.5" -Dmyhostname='localhost' -Dmydomain='.local' -Dperladmin=root -Dcc=emcc -Dld=emcc -Dar=$(which emar) -Dranlib=$(which emranlib) -Doptimize="-O2" -Dlibs='-lm' -Dhintfile=emscripten -Dsysroot=$(dirname $(which emcc))/system -Dhostperl=$PWD/../native/miniperl -Dhostgenerate=$PWD/../native/generate_uudmap -Dprefix=$PWD/prefix -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode"

          sed -i 's/$(generated_pods)//' Makefile
          emmake make utilities PERL=$PWD/../native/miniperl
          emmake make
          node ./perl -e 'print("hello world\n");'

          chmod +x ./perl
          emmake make install

@vadimkantorov
Copy link
Author

vadimkantorov commented Dec 2, 2024

I added a few hacks for $(generated_pods).

The RUN_PERL workaround is needed for making pod/perltoc.pod which uses RUN_PERL variable which for some reason not uses host perl.

The symlinking READMEs hack is needed for making extra.pods which for some reason tries to access ../README.aix instead of ./README.aix.

It might be that necessity of these hacks reveal bugs in Configure in Makefile - would appreciate if you could take a look...

name: buildperlwasm

on: workflow_dispatch
env:
  URLPERL: https://www.cpan.org/src/5.0/perl-5.40.0.tar.gz
  EMSCRIPTEN_VERSION: 3.1.73

jobs:

  buildperlwasm:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4

      - name: Setup Emscripten
        uses: mymindstorm/setup-emsdk@v13
        with:
          version: ${{env.EMSCRIPTEN_VERSION}}

      - name: Install Perl static native
        shell: bash
        run: |
          mkdir native && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=native
          cd native && BUILD_ZLIB=0 sh +x ./Configure -sde -Dman1dir=none -Dman3dir=none -Dprefix="$PWD/prefix" -Dusedevel -Uversiononly -Dlibs="-lpthread -ldl -lm -lutil -lc -lz" -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode" && cd -
          make -C native
          make -C native install

      - name: Artifacts
        uses: actions/upload-artifact@v4
        with:
          path: native/Makefile

      - name: Heredoc
        run: |
          cat <<'EOF' > hintfile_wasm.sh
            #TODO: almost all of the known_extensions are still being built. we should probably exclude some of them! (see also nonxs_ext)
            #noextensions='IPC/SysV'
            # Here's a fun one: apparently, when building perlmini.c, emcc notices that it's a symlink to perl.c, and compiles to perl.o
            # (because there is no -o option), so the final perl ends up thinking it's miniperl (shown in "perl -v", @INC doesn't work, etc.).
            # Because of this and other issues I've had with symlinks, I'm switching to hard links instead.
            # (Another possible fix might be to fix the Makefile steps so that they use the -o option, but this solution works for now.)
            #TODO Later: In NODEFS, does Perl's -e test work correctly on symlinks? (./t/TEST was having issues detecting ./t/perl, a symlink to ./perl).

            usemymalloc="n"
            uselargefiles="n"
            usenm='undef'

            usemallocwrap="define"
            d_procselfexe='undef'
            d_dlopen='undef'

            dlsrc='none'
            d_getgrgid_r='define'
            d_getgrnam_r='define'
            d_libname_unique="define"
            d_getnameinfo='define'

            d_setrgid='undef'
            d_setruid='undef'
            d_setproctitle='undef'
            d_malloc_size='undef'
            d_malloc_good_size='undef'
            d_fdclose='undef'

            #d_prctl='define' # hm, it's present in the libc source, but Configure shows Emscripten error output? -> for now, assume it's not available

            # It *looks* like shm*, sem* and a few others exist in Emscripten's libc,
            # but I'm not sure why Configure isn't detecting them. But at the moment I'm not going
            # to worry about them, and just not build IPC-SysV.
            d_clearenv='undef'
            d_cuserid='undef'
            d_eaccess='undef'
            d_getspnam='undef'
            d_msgctl='undef'
            d_msgget='undef'
            d_msgrcv='undef'
            d_msgsnd='undef'
            d_semget='undef'
            d_semop='undef'
            d_shmat='undef'
            d_shmctl='undef'
            d_shmdt='undef'
            d_shmget='undef'
            d_syscall='undef'


            # Emscripten does not have signals support (documentation isn't 100% clear on this? but see "$EMSCRIPTEN/system/include/libc/setjmp.h")
            # but if you do: grep -r 'Calling stub instead of' "$EMSCRIPTEN"
            # you'll see the unsupported stuff (as of 1.37.35):
            # signal() sigaction() sigprocmask() __libc_current_sigrtmin __libc_current_sigrtmax kill() killpg() siginterrupt() raise() pause()
            # plus: "Calling longjmp() instead of siglongjmp()"
            #d_sigaction='undef'
            #d_sigprocmask='undef'
            d_killpg='undef'
            d_pause='undef'
            d_sigsetjmp='undef' # this also disables Perl's use of siglongjmp() (see config.h)
            # the others either aren't used by Perl (like siginterrupt) or can't be Configure'd (like kill)
            #TODO Later: currently I've disabled Perl's use of signal() by patching the source - maybe there's a better way?

            # Emscripten doesn't actually have these either (see "$EMSCRIPTEN/src/library.js")
            d_wait4='undef'
            d_waitpid='undef'
            d_fork='define' # BUT, perl needs this one to at least build
            d_vfork='undef'
            d_pseudofork='undef'

            i_pthread='undef'
            d_pthread_atfork='undef'
            d_pthread_attr_setscope='undef'
            d_pthread_yield='undef'

            #TODO Later: Why does Configure seem to ignore the following? (and do we care?)
            d_quad='undef'

            #TODO Later: The test for "selectminbits" seems to fail,
            # the error appears to be coming from this line (because apparently stream.stream_ops is undefined):
            # https://github.com/kripken/emscripten/blob/ddfc3e32f65/src/library_syscall.js#L750
            # For now, just use this number from a build with an earlier version where this didn't fail:
            selectminbits='32'
            alignbytes='4'


            ldflags="$ldflags -lm -O2 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -Wno-almost-asm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s WASM=1"

            # the following is needed for the "musl" libc provided by emscripten to provide all functions
            # from Makefile.emcc / Makefile.micro  -DSTANDARD_C -DPERL_USE_SAFE_PUTENV
            # disable this warning, I don't think we need it - TODO: how to append this after -Wall?
            ccflags="$ccflags -D_GNU_SOURCE -D_POSIX_C_SOURCE  -DNO_MATHOMS -Wno-null-pointer-arithmetic"

            # Configure apparently changes "-s ASSERTIONS=2 -s STACK_OVERFLOW_CHECK=2" to "-s -s" when converting ccflags to cppflags
            # this is the current hack/workaround: copy cppflags from config.sh and fix it (TODO Later: better way would be to patch Configure)
            cppflags='-lm -s ERROR_ON_UNDEFINED_SYMBOLS=0 -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -DNO_MATHOMS -Wno-null-pointer-arithmetic -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'

          EOF

      - name: Install Perl static wasm
        shell: bash
        run: |
          mkdir wasm && curl -L $URLPERL | tar -xzf - --strip-components=1 --directory=wasm
          cp hintfile_wasm.sh wasm/hints/emscripten.sh

          cd wasm
          emconfigure bash ./Configure -sde -Dinc_version_list=none -Dloclibpth='' -Dglibpth='' -Dlns='/bin/ln' -Dman1dir=none -Dman3dir=none -Dosname="emscripten" -Darchname="wasm" -Dosvers="2.0.5" -Dmyhostname='localhost' -Dmydomain='.local' -Dperladmin=root -Dcc=emcc -Dld=emcc -Dar=$(which emar) -Dranlib=$(which emranlib) -Doptimize="-O2" -Dlibs='-lm' -Dhintfile=emscripten -Dsysroot=$(dirname $(which emcc))/system -Dhostperl=$PWD/../native/miniperl -Dhostgenerate=$PWD/../native/generate_uudmap -Dprefix=$PWD/prefix -Dstatic_ext="mro Devel/Peek File/DosGlob File/Glob Sys/Syslog Sys/Hostname PerlIO/via PerlIO/mmap PerlIO/encoding B attributes Unicode/Normalize Unicode/Collate threads threads/shared IPC/SysV re Digest/MD5 Digest/SHA SDBM_File Math/BigInt/FastCalc Data/Dumper I18N/Langinfo Time/HiRes Time/Piece IO Socket Hash/Util/FieldHash Hash/Util Filter/Util/Call POSIX Encode/Unicode Encode Encode/JP Encode/KR Encode/EBCDIC Encode/CN Encode/Symbol Encode/Byte Encode/TW Compress/Raw/Zlib Compress/Raw/Bzip2 MIME/Base64 Cwd Storable List/Util Fcntl Opcode"

          ln -s $PWD/pod/perldelta.pod .; for f in README.* ; do ln $PWD/$f ..; done
          emmake make utilities PERL="$PWD/../native/miniperl"
          emmake make       RUN_PERL="$PWD/../native/miniperl -Ilib -I."
          chmod +x ./perl
          emmake make install
          cp ./perl.wasm ./prefix/bin
          node ./prefix/bin/perl -e 'print("hello world\n");'

khwilliamson added a commit that referenced this issue Dec 4, 2024
See #22793

This typo in a printf format causes some C compilations to fail; others
to just warn.  However stderr is redirected to /dev/null, so we weren't
aware of this issue.

When it fails, other issues cause perl to not be usable on the system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants