rschupp / PAR-Packer

(perl) Generate stand-alone executables, perl scripts and PAR files https://metacpan.org/pod/PAR::Packer
Other
48 stars 13 forks source link

tests under strawberry perl are not passed #6

Closed zdm closed 6 years ago

zdm commented 6 years ago

t/20-pp.t ................ skipped: 'perl' not found

Unrelated to the real bug in t/85-crt-glob.t, but I'm curious: can you check what the value of $Config{startperl} of your perl is and why main->can_run($Config{startperl}) (in t/20-ppt) fails?

shawnlaffan commented 6 years ago

The currently available cpan testers result for strawberry perl does not show the full build log, but this warning from the gmake call on my machine (strawberry perl 5.26.1) looks like it might be relevant:

boot.c:123:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     char *p = src;
               ^~~

Full gmake log is below.

Shawn.

cp lib/App/Packer/PAR.pm blib\lib\App\Packer\PAR.pm
cp lib/PAR/Packer.pm blib\lib\PAR\Packer.pm
cp lib/PAR/Filter/PatchContent.pm blib\lib\PAR\Filter\PatchContent.pm
cp lib/PAR/Filter/Obfuscate.pm blib\lib\PAR\Filter\Obfuscate.pm
cp lib/PAR/Filter.pm blib\lib\PAR\Filter.pm
cp lib/PAR/Filter/Bleach.pm blib\lib\PAR\Filter\Bleach.pm
cp lib/PAR/Filter/Bytecode.pm blib\lib\PAR\Filter\Bytecode.pm
cp lib/pp.pm blib\lib\pp.pm
cp lib/PAR/StrippedPARL/Base.pm blib\lib\PAR\StrippedPARL\Base.pm
cp lib/PAR/Filter/PodStrip.pm blib\lib\PAR\Filter\PodStrip.pm
gmake[1]: Entering directory 'C:/Users/user/.cpanm/work/1522747211.16756/PAR-Packer-1.042/myldr'
Makefile:861: warning: overriding recipe for target '.c.o'
Makefile:335: warning: ignoring old recipe for target '.c.o'
"C:\Strawberry\perl\bin\perl.exe" par_pl2c.pl my_par_pl < ..\script\par.pl > my_par_pl.c
"C:\Strawberry\perl\bin\perl.exe" sha1.c.PL
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields  -I"C:\STRAWB~1\perl\lib\CORE"  -DLDLIBPTHNAME=\"\" -DPARL_EXE=\"parl.exe\" -DPAR_PACKER_VERSION=\"1.042\" -s -O2 main.c
windres -i winres/pp.rc -o ppresource.coff --input-format=rc --output-format=coff --target=pe-x86-64
g++ main.o ppresource.coff -s   -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"  "C:\STRAWB~1\perl\lib\CORE\libperl526.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libole32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libversion.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomctl32.a"  -o par.exe
rem
"C:\Strawberry\perl\bin\perl.exe" encode_append.pl Dynamic.in par.exe Dynamic.pm
"C:\Strawberry\perl\bin\perl.exe" embed_files.pl -c 32768 par.exe recursive_objdump "C:\STRAWB~1\perl\bin\perl526.dll" > boot_embedded_files.c
# using method recursive_objdump to find files to embed
# embedding "par.exe" as "par.exe"
# embedding "C:\Strawberry\perl\bin/perl526.dll" as "perl526.dll"
# embedding "C:\Strawberry\perl\bin/libstdc++-6.dll" as "libstdc++-6.dll"
# embedding "C:\Strawberry\perl\bin/libwinpthread-1.dll" as "libwinpthread-1.dll"
# embedding "C:\Strawberry\perl\bin/libgcc_s_seh-1.dll" as "libgcc_s_seh-1.dll"
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields  -I"C:\STRAWB~1\perl\lib\CORE"  -DLDLIBPTHNAME=\"\" -DPARL_EXE=\"parl.exe\" -DPAR_PACKER_VERSION=\"1.042\" -s -O2 boot.c
In file included from mktmpdir.h:87:0,
                 from mktmpdir.c:1,
                 from boot.c:10:
sha1.c: In function 'sha_transform':
sha1.c:146:4: warning: right shift count >= width of type [-Wshift-count-overflow]
  T >>= 32;
    ^~~
boot.c: In function 'shell_quote':
boot.c:123:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     char *p = src;
               ^~~
g++ boot.o  -static-libgcc -s   -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"  "C:\STRAWB~1\perl\lib\CORE\libperl526.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libole32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libversion.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomctl32.a"  ppresource.coff -o boot.exe
rem
"C:\Strawberry\perl\bin\perl.exe" encode_append.pl Static.in boot.exe Static.pm
"C:\Strawberry\perl\bin\perl.exe" -Mblib=.. run_with_inc.pl boot.exe -q -B -Oparl.exe
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e cp -- parl.exe ..\blib\script\parl.exe
rem ..\blib\script\parl.exe
"C:\Strawberry\perl\bin\perl.exe" -Mblib=.. run_with_inc.pl par.exe -q -B -Oparldyn.exe
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e cp -- parldyn.exe ..\blib\script\parldyn.exe
rem ..\blib\script\parldyn.exe
gmake[1]: Leaving directory 'C:/Users/user/.cpanm/work/1522747211.16756/PAR-Packer-1.042/myldr'
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e cp -- script/par.pl blib\script\par.pl
pl2bat.bat blib\script\par.pl
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e cp -- script/pp blib\script\pp
pl2bat.bat blib\script\pp
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e cp -- script/tkpp blib\script\tkpp
pl2bat.bat blib\script\tkpp
rschupp commented 6 years ago

Thanks for the build log, but the real problem is: system(LIST) sucks on Windows - it doesn't get the quoting right if some element of LIST contains double quotes, e.g. for

system($cmd, q[foo "b a r"]);

$cmd will be passed 4 arguments ("foo", "b", "a", "r"), instead of 1.
Me bad, should have used Win32::ShellQuote. Anyway, fixed in 1.043