简体   繁体   中英

Perl. Install PAR::Packer under Windows (w/ Strawberry Perl)

I am trying to install PAR::Packer on a Windows system. I tried "cpanm -n PAR::Packer --force" but got the following dump. I don't even understand what it is trying to do in my GnuPgp directory, but apparently there is a problem with blank spaces in its path? Thanks!

Configuring PAR-Packer-1.019
Running Makefile.PL
Checking if your kit is complete...
Looks good
Prototype mismatch: sub main::prompt: none vs ($;$) at C:/Dwimperl/perl/lib/ExtUtils/MakeMaker.pm line 219
Writing Makefile for par.exe
Writing MYMETA.yml and MYMETA.json
Writing Makefile for PAR::Packer
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Compress::Zlib 1.16 ... Yes (2.042)
Checking if you have Archive::Zip 1 ... Yes (1.30)
Checking if you have ExtUtils::MakeMaker 6.59 ... Yes (6.62)
Checking if you have Getopt::ArgvFile 1.07 ... Yes (1.11)
Checking if you have IO::Compress::Gzip 0 ... Yes (2.042)
Checking if you have PAR 1.005 ... Yes (1.007)
Checking if you have PAR::Dist 0.22 ... Yes (0.48)
Checking if you have ExtUtils::Embed 0 ... Yes (1.30)
Checking if you have File::Temp 0.05 ... Yes (0.22)
Checking if you have Win32::Process 0 ... Yes (0.14)
Checking if you have Parse::Binary 0.04 ... Yes (0.11)
Checking if you have Module::ScanDeps 1.09 ... Yes (1.13)
Checking if you have Win32::Exe 0.17 ... Yes (0.17)
Building PAR-Packer-1.019
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/Obfuscate.pm blib\lib\PAR\Filter\Obfuscate.pm
cp lib/PAR/Filter/PodStrip.pm blib\lib\PAR\Filter\PodStrip.pm
cp lib/PAR/StrippedPARL/Base.pm blib\lib\PAR\StrippedPARL\Base.pm
cp lib/PAR/Filter.pm blib\lib\PAR\Filter.pm
cp lib/PAR/Filter/PatchContent.pm blib\lib\PAR\Filter\PatchContent.pm
cp lib/PAR/Filter/Bytecode.pm blib\lib\PAR\Filter\Bytecode.pm
cp lib/pp.pm blib\lib\pp.pm
cp lib/PAR/Filter/Bleach.pm blib\lib\PAR\Filter\Bleach.pm
C:\Dwimperl\perl\bin\perl.exe par_pl2c.pl my_par_pl < ..\script\par.pl > my_par_pl.c 
C:\Dwimperl\perl\bin\perl.exe sha1.c.PL
gcc -c -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields  -I"C:\Dwimperl\perl\lib\CORE"  -DPARL_EXE=\"parl.exe\" -s -O2 main.c
main.c: In function 'main':
main.c:121: warning: assignment discards qualifiers from pointer target type
windres -i winres/pp.rc -o ppresource.coff --input-format=rc --output-format=coff --target=pe-i386
g++ main.o ppresource.coff -s   -s -L"C:\Dwimperl\perl\lib\CORE" -L"C:\Dwimperl\c\lib"  C:\Dwimperl\perl\lib\CORE\libperl514.a C:\Dwimperl\c\i686-w64-mingw32\lib\libmoldname.a C:\Dwimperl\c\i686-w64-mingw32\lib\libkernel32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libuser32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libgdi32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libwinspool.a C:\Dwimperl\c\i686-w64-mingw32\lib\libcomdlg32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libadvapi32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libshell32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libole32.a C:\Dwimperl\c\i686-w64-mingw32\lib\liboleaut32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libnetapi32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libuuid.a C:\Dwimperl\c\i686-w64-mingw32\lib\libws2_32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libmpr.a C:\Dwimperl\c\i686-w64-mingw32\lib\libwinmm.a C:\Dwimperl\c\i686-w64-mingw32\lib\libversion.a C:\Dwimperl\c\i686-w64-mingw32\lib\libodbc32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libodbccp32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libcomctl32.a -o par.exe
rem
C:\Dwimperl\perl\bin\perl.exe encode_append.pl Dynamic.in par.exe Dynamic.pm
C:\Dwimperl\perl\bin\perl.exe file2c.pl -c 30000 par.exe C:\Dwimperl\perl\bin\perl514.dll C:\Dwimperl\perl\bin\libgcc_s_sjlj-1.dll C:\Program Files (x86)\GNU\GnuPG\pub\libstdc++-6.dll > boot_embedded_files.c
open input file 'C:\Program': No such file or directory at file2c.pl line 43.
dmake:  Error code 130, while making 'boot_embedded_files.c'
dmake:  'boot_embedded_files.c' removed.
dmake.exe:  Error code 255, while making 'subdirs'
-> FAIL Installing PAR::Packer failed. See C:\Users\user\.cpanm\work\1406015074.8672\build.log for details. Retry with --force to force install it.

From your output, you can see the commands which the Makefile is executing. This one:

C:\Dwimperl\perl\bin\perl.exe file2c.pl -c 30000 par.exe C:\Dwimperl\perl\bin\perl514.dll C:\Dwimperl\perl\bin\libgcc_s_sjlj-1.dll C:\Program Files (x86)\GNU\GnuPG\pub\libstdc++-6.dll > boot_embedded_files.c

appears to attempt to pass this filename:

C:\Program Files (x86)\GNU\GnuPG\pub\libstdc++-6.dll

as a command-line argument, but does not quote it. The called program therefore attempts to open file C:\\Program and fails. The fault probably lies somewhere within the build process, where a value should have been quoted, but wasn't. You might be able to work round it by executing the command correctly quoted:

C:\Dwimperl\perl\bin\perl.exe file2c.pl -c 30000 par.exe C:\Dwimperl\perl\bin\perl514.dll C:\Dwimperl\perl\bin\libgcc_s_sjlj-1.dll "C:\Program Files (x86)\GNU\GnuPG\pub\libstdc++-6.dll" > boot_embedded_files.c

and then rerunning make to allow it to build the rest. But this approach is not guaranteed to work.

However, the package seems to be being maintained, with the changelog for the most recent version here:

and evidence from the bug tracker that some issues are being resolved:

I suggest you report this bug there, and see whether the maintainers are able to provide a fix.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM