简体   繁体   中英

Fail to install 'PAR::Packer' Perl module on Windows 7 - 64 bit - using DWIM Perl

I am working on MS-Windows 7 PC - 64 bit. I am using "DWIM Perl for Windows" ( http://dwimperl.com/windows.html ) - which is a Strawberry Perl derivative.

I am trying to run 'install PAR::Packer' from cpan - and this fails. See below the full text.

I did see suggestions here to run 'look PAR::Packer' from cpan "command line". But - this fails too, with the following error message:

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\pe rl514.dll C:\Dwimperl\perl\bin\libgcc_s_sjlj-1.dll C:./Program > 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:  Error code 255, while making 'subdirs'

Here is the fail of 'install PAR::Packer':

cpan>  install  PAR::Packer
Running install for module 'PAR::Packer'
Running make for R/RS/RSCHUPP/PAR-Packer-1.014.tar.gz
Checksum for C:\Dwimperl\cpan\sources\authors\id\R\RS\RSCHUPP\PAR-Packer-1.014.t
ar.gz ok
Scanning cache C:\Dwimperl\cpan\build for sizes
............................................................................DONE


  CPAN.pm: Building R/RS/RSCHUPP/PAR-Packer-1.014.tar.gz

Checking if your kit is complete...
Looks good
Prototype mismatch: sub main::prompt: none vs ($;$) at C:/Dwimperl/perl/lib/ExtU
tils/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
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_IMPLIC
IT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields  -I"C:\Dwimpe
rl\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
rem
windres -i winres\pp.rc -o ppresource.coff --input-format=rc --output-format=cof
f --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\li
b\libmoldname.a C:\Dwimperl\c\i686-w64-mingw32\lib\libkernel32.a C:\Dwimperl\c\i
686-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\li
b\libcomdlg32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libadvapi32.a C:\Dwimperl\c\i
686-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\l
ib\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:\Dwim
perl\c\i686-w64-mingw32\lib\libwinmm.a C:\Dwimperl\c\i686-w64-mingw32\lib\libver
sion.a C:\Dwimperl\c\i686-w64-mingw32\lib\libodbc32.a C:\Dwimperl\c\i686-w64-min
gw32\lib\libodbccp32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libcomctl32.a -o par.e
xe
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\pe
rl514.dll C:\Dwimperl\perl\bin\libgcc_s_sjlj-1.dll C:./Program > boot_embedded_f
iles.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'
  RSCHUPP/PAR-Packer-1.014.tar.gz
  C:\Dwimperl\c\bin\dmake.EXE -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Failed during this command:
 RSCHUPP/PAR-Packer-1.014.tar.gz              : make NO

Here is what I get after running 'look PAR::Packer' from cpan shell:

cpan>  look PAR::Packer
Running look for module 'PAR::Packer'

Trying to open a subshell in the build directory...
Working directory is C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j>perl Makefile.PL
Prototype mismatch: sub main::prompt: none vs ($;$) at C:/Dwimperl/perl/lib/ExtU
tils/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

Here I also try to run "DMAKE" myself:

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j>dmake -f Makefile install
Skip blib\lib\App\Packer\PAR.pm (unchanged)
Skip blib\lib\PAR\Packer.pm (unchanged)
Skip blib\lib\PAR\Filter\Obfuscate.pm (unchanged)
Skip blib\lib\PAR\Filter\PodStrip.pm (unchanged)
Skip blib\lib\PAR\StrippedPARL\Base.pm (unchanged)
Skip blib\lib\PAR\Filter.pm (unchanged)
Skip blib\lib\PAR\Filter\PatchContent.pm (unchanged)
Skip blib\lib\PAR\Filter\Bytecode.pm (unchanged)
Skip blib\lib\pp.pm (unchanged)
Skip blib\lib\PAR\Filter\Bleach.pm (unchanged)
gcc -c -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLIC
IT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields  -I"C:\Dwimpe
rl\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
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\li
b\libmoldname.a C:\Dwimperl\c\i686-w64-mingw32\lib\libkernel32.a C:\Dwimperl\c\i
686-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\li
b\libcomdlg32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libadvapi32.a C:\Dwimperl\c\i
686-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\l
ib\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:\Dwim
perl\c\i686-w64-mingw32\lib\libwinmm.a C:\Dwimperl\c\i686-w64-mingw32\lib\libver
sion.a C:\Dwimperl\c\i686-w64-mingw32\lib\libodbc32.a C:\Dwimperl\c\i686-w64-min
gw32\lib\libodbccp32.a C:\Dwimperl\c\i686-w64-mingw32\lib\libcomctl32.a -o par.e
xe
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\pe
rl514.dll C:\Dwimperl\perl\bin\libgcc_s_sjlj-1.dll C:./Program > boot_embedded_f
iles.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:  Error code 255, while making 'subdirs'

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j>
C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j>
C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j>gvim Makefile.PL
'gvim' is not recognized as an internal or external command,
operable program or batch file.

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j> Makefile.PL

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j>

I just test installed this module on Strawberry Perl 5.16.2, Windows 7 64 bit, and it worked for me.

The version of Perl you have is rather old. Strawberry has made updates to the compiler tool chain since then, and the failure you are experiencing is happening during compilation (missing or mangling the path of one of the files it needs).

Also, I don't know if DWIM Perl is doing anything non-standard that might be messing things up.

I suggest upgrading to the latest Perl, and also perhaps switching to standard Strawberry Perl. DWIM doesn't really give you anything except for a whole bunch of pre-installed modules , and it should be trivial to install the ones you need.

I removed my DWIM Perl.

I installed Strawberry Perl 5.16.3.1 - and now I did succeed to install PAR-Packer on my Windows 7 64 Bit.

Now I have problem installing Padre... But that's another story.

I had the same problem. Following workaround worked for me: Go tho the shell and type in:

C:\> cpan
cpan> look PAR::Packer
C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j> perl Makefile.pl
C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j> dmake -f Makefile install

Leave the shell open and follow the path (may vary, depending on your system):

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j\myldr

There you'll find a file named 'Makefile' (the one without the .pl ending). Search the file for the string 'C:./Program' (somewhere near the end) and delete this part. Finally run.

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j> dmake -f Makefile install

When trying to install PAR::Packer using cpan on 64-bit Strawberry Perl 5.20, I had the same problem, but discovered that fixing line 1010 of the Makefile in the myldr subdirectory to add $(NOOP) as below permitted dmake to finish successfully, then I was able test and install.

...
# dummy targets to satisfy ExtUtils::MakeMaker
dynamic::
   $(NOOP)
...

After that, I found that Tk was installed so you could have tkpp which is very nice. That depends on tkpod, a very nice utility to perldoc in a window. But it needs Tk::Pod, which would not install clean as one of the podtree.t tests GPFs out. After forcing install Tk::Pod which seemed safe, tkpod and tkpp both worked great.

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