1

我正在使用 MS-Windows 7 PC - 64 位。我正在使用“DWIM Perl for Windows”(http://dwimperl.com/windows.html)——它是 Strawberry Perl 的衍生产品。

我正在尝试从 cpan 运行“安装 PAR::Packer”——但失败了。全文见下文。

我确实在这里看到了从 cpan“命令行”运行“look PAR::Packer”的建议。但是 - 这也失败了,并显示以下错误消息:

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'

这是“安装 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

这是从 cpan shell 运行“look PAR::Packer”后得到的结果:

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

在这里,我也尝试自己运行“DMAKE”:

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>
4

4 回答 4

1

我刚刚在 Strawberry Perl 5.16.2、Windows 7 64 位上测试安装了这个模块,它对我有用。

您拥有的 Perl 版本相当旧。从那时起,Strawberry 对编译器工具链进行了更新,而您遇到的故障发生在编译过程中(丢失或损坏了它需要的文件之一的路径)。

另外,我不知道 DWIM Perl 是否在做任何非标准的事情,可能会搞砸。

我建议升级到最新的 Perl,也可能切换到标准的 Strawberry Perl。除了一大堆预安装的模块之外,DWIM 并没有真正为您提供任何东西,安装您需要的模块应该是微不足道的。

于 2013-04-09T08:09:29.733 回答
0

我删除了我的 DWIM Perl。

我安装了 Strawberry Perl 5.16.3.1 - 现在我确实成功地在我的 Windows 7 64 位上安装了 PAR-Packer。

现在我在安装 Padre 时遇到问题……但那是另一回事了。

于 2013-04-10T09:10:16.467 回答
0

我有同样的问题。以下解决方法对我有用:转到外壳并输入:

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

保持外壳打开并遵循路径(可能会有所不同,具体取决于您的系统):

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

在那里你会找到一个名为“Makefile”的文件(没有 .pl 结尾的文件)。在文件中搜索字符串“C:./Program”(接近末尾)并删除此部分。终于跑了。

C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j> dmake -f Makefile install
于 2014-04-12T15:19:51.287 回答
0

当尝试在 64 位 Strawberry Perl 5.20 上使用 cpan 安装 PAR::Packer 时,我遇到了同样的问题,但发现修复 myldr 子目录中 Makefile 的第 1010 行以添加 $(NOOP) 如下允许 dmake 成功完成,然后我就可以测试和安装了。

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

之后,我发现 Tk 已安装,因此您可以拥有 tkpp,这非常好。这取决于 tkpod,这是一个在窗口中 perldoc 的非常好的实用程序。但它需要 Tk::Pod,它不会安装干净,因为 podtree.t 测试 GPF 之一。在强制安装看似安全的 Tk::Pod 之后,tkpod 和 tkpp 都运行良好。

于 2015-02-02T05:46:12.070 回答