Having the exact issue as described at: perl module Class::HPLOO v0.23 install issue, I have attempted to correct the defined(#array) problem by editing to just (#array) and trying to rebuild the module. However I continue to get the return of:
$ make clean
$ perl Makefile.PL
$ make
$ make test: *** No rule to
make target `clean:'. Stop. Manifying 2 pod documents
PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.26" "-Iblib/lib" "-Iblib/arch"
test.pl
1..42
# Running under perl version 5.026002 for darwin
# Current time local: Sun Aug 26 06:48:26 2018
# Current time GMT: Sat Aug 25 22:48:26 2018
# Using Test.pm version 1.26 not ok 1
# Failed test 1 in test.pl at line 9
# test.pl line 9 is: ok(!$#) ; Can't locate object method "new" via package "Foo" at test.pl line 11. make: *** [test_dynamic] Error 2
There are three issues with Class::HPLOO (which as I noted before, hasn't been updated since 2005) that make it fail with modern perls.
As discovered in the previous post,
the obsolete construct defined (#array) is used once in lib/Class/HPLOO.pm' and three times inlib/Class/HPLOO/Base.pm`. This construction has been prohibited since v5.22
The current directory (.) is no longer in #INC (as of v5.24, I think). So the lines in test.pl like
require "test/classtest.pm"
either all need to be rewritten as
require "./test/classtest.pm"
or an easier fix is to put
use lib '.';
at the top of the script.
There is a regular expression in lib/Class/HPLOO.pm, line 1077, with an "unescaped left brace"
$sub =~ s/(\S)( {) (\S)/$1$2\n$FIRST_SUB_IDENT $3/gs ;
{ is a regex metacharacter, and since v5.22 it has been illegal to use it in a context where it is not indicating a quantity. The fix, as the error message suggests, is to escape it.
$sub =~ s/(\S)( \{) (\S)/$1$2\n$FIRST_SUB_IDENT $3/gs ;
Make these three changes to the code you download from CPAN and the module should build on modern Perls. If you're feeling helpful, you can submit a bug report (linking to this post, if you want) or even a patch with an email to bug-Class-HPLOO#rt.cpan.org
come across this issue today, so I fixed it following the answer above. if anyone want to save some time.
I create a repo with the changes. https://github.com/swuecho/Class_HPLOO.git
Related
edit: worked with sudo cpanm Data::Match --force
I'm trying to install the "Data::Match" perl module with ubuntu 18.04.
I use:
perl Makefile.pl
make
make test
And I get the following error:
make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl
1..1
# Running under perl version 5.026001 for linux
# Current time local: Wed Jun 29 18:41:13 2022
# Current time GMT: Wed Jun 29 15:41:13 2022
# Using Test.pm version 1.30
Can't use an array as a reference at blib/lib/Data/Match.pm line 968.
Compilation failed in require at test.pl line 10.
BEGIN failed--compilation aborted at test.pl line 10.
Makefile:825: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
I installed many other modules and they all worked perfectly fine.
I also tried installing with
perl -MCPAN -e shell
and that didn't help.
What should I do?
The Data::Match module has some syntax that Perl v5.22 tightened up. That's why it fails. Note that force installing a module with an egregious problem like that means it will just fail when you run your program.
If you can, don't use this module. I have no idea what it does, so I don't have any suggestions for a replacement.
Let's suppose you need this module for whatever reason, even though it's 20 years old. Perhaps you're supporting a legacy app that you just need to get working.
There's this line (L968) which dereferences an array element that is itself an array reference:
$str .= $sep . '{' . join(',', #$ind->[0]) . '}';
That should be the circumfix notation to delimit the reference part:
$str .= $sep . '{' . join(',', #{$ind->[0]}) . '}';
If you make that change to Match.pm before you run perl Makefile.PL, the tests pass (but with a warning) and you can install the module.
If that's all you need, you can stop here.
Distroprefs
CPAN.pm has a way to handle these situations so you don't have to make the change every time that you want to install the module. Before CPAN.pm does its work, it can patch the problem distribution, suggest a replacement distro, or many other things. You do this with "distroprefs". There are many examples in the CPAN.pm repo.
There are a few things to set up. First, set up your distroprefs directory (o conf init prefs_dir). Second, configure a directory to hold you patches (o conf patches_dir). I choose patches under my .cpan directory, but it can be anything. Save your changes before you exit.
% cpan
% cpan[1]> o conf init prefs_dir
Directory where to store default options/environment/dialogs for
building modules that need some customization? [/Users/brian/.cpan/prefs]
% cpan[2]> o conf patches_dir /Users/brian/.cpan/patches
% cpan[3]> o conf commit
distroprefs have two parts. The first specifies what you want to happen. This can be a YAML, Storable, or Data::Dumper file. If YAML (which most people seem to use), then you need to install the YAML module first.
Here's a simple distroprefs file. It tells CPAN.pm how to match a distribution as you'd see it on CPAN (AUTHOR/FILE). In this example, it's action is patches, which is an array of patch files. Since you set up patches_dir, that's where it will look. The file name for the patch isn't special, and it can be compressed. I chose the distro name, my name as the person who patched it, then .patch.
---
match:
module: "Data::Match"
distribution: "^KSTEPHENS/Data-Match-0.06.tar.gz"
patches:
- Data-Match-0.06-BDFOY-01.patch
Here's your patch. Back up the original file, change the target file, then get the unified diff (or whatever your patch understands):
$ diff -u Match.pm.orig Match.pm
--- Match.pm.orig 2022-06-29 15:04:06.000000000 -0400
+++ Match.pm 2022-06-29 14:55:45.000000000 -0400
## -965,7 +965,7 ##
elsif ( $ref eq 'HASH' ) {
if ( ref($ind) eq 'ARRAY' ) {
# Not supported by DRef.
- $str .= $sep . '{' . join(',', #$ind->[0]) . '}';
+ $str .= $sep . '{' . join(',', #{$ind->[0]}) . '}';
} else {
$str .= $sep . $ind;
}
But you want this in your patches dir with the name that you specified, so redirect the output there:
$ diff -u Match.pm.orig Match.pm > /Users/brian/.cpan/patches/Data-Match-0.06-BDFOY-01.patch
If you want to get really fancy, you could put that patches directory in an environment variable in your profile so you don't have to remember it:
$ diff -u Match.pm.orig Match.pm > $CPAN_PATCHES_DIR/Data-Match-0.06-BDFOY-01.patch
Now when you try to install Data::Match with cpan, it knows that it's installing Data-Match-0.06, it matches that distro from a distroprefs file, and that distroprefs file tell CPAN.pm to perform an action. In this case, it needs to find the patch file and apply it. After the patch is applied, the tests pass and the installation succeeds:
% cpan Data::Match
Reading '/Users/brian/.cpan/Metadata'
Database was generated on Wed, 29 Jun 2022 05:56:00 GMT
Running install for module 'Data::Match'
______________________ D i s t r o P r e f s ______________________
Data-Match-0.06-BDFOY-01.yml[0]
Checksum for /Users/brian/.cpan/sources/authors/id/K/KS/KSTEPHENS/Data-Match-0.06.tar.gz ok
Applying 1 patch:
/Users/brian/.cpan/patches/Data-Match-0.06-BDFOY-01.patch
/usr/bin/patch -N --fuzz=3 -p0
patching file Match.pm
Configuring K/KS/KSTEPHENS/Data-Match-0.06.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Data::Match
Writing MYMETA.yml and MYMETA.json
KSTEPHENS/Data-Match-0.06.tar.gz
/usr/local/perls/perl-5.36.0/bin/perl Makefile.PL -- OK
Running make for K/KS/KSTEPHENS/Data-Match-0.06.tar.gz
cp Match.pm blib/lib/Data/Match.pm
cp lib/Sort/Topological.pm blib/lib/Sort/Topological.pm
Manifying 2 pod documents
KSTEPHENS/Data-Match-0.06.tar.gz
/usr/bin/make -- OK
Running make test for KSTEPHENS/Data-Match-0.06.tar.gz
PERL_DL_NONLAZY=1 "/usr/local/perls/perl-5.36.0/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl
1..1
# Running under perl version 5.036000 for darwin
# Current time local: Wed Jun 29 15:54:13 2022
# Current time GMT: Wed Jun 29 19:54:13 2022
# Using Test.pm version 1.31
ok 1
PERL_DL_NONLAZY=1 "/usr/local/perls/perl-5.36.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/t1.t .. ok
t/t2.t .. ok
t/t3.t .. 1/15 splice() offset past end of array at /Users/brian/.cpan/build/Data-Match-0.06-15/blib/lib/Data/Match.pm line 1941.
t/t3.t .. ok
t/t4.t .. ok
All tests successful.
Files=4, Tests=182, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.18 cusr 0.04 csys = 0.26 CPU)
Result: PASS
I am unable to build Net::MAC::Vendor on a Mac w/ High Sierra. I am relatively new to Perl but have built modules in the past. The error appears to be:
Failed fetching [https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MA-L&format=html&text=14-10-9F] HTTP status []
message [IO::Socket::SSL 2.009+ required for TLS support] at t/fetch_oui_from_custom.t line 21.
Could not fetch data from the IEEE! at t/fetch_oui_from_custom.t line 21.
# Failed test ''Got back array reference' isa 'ARRAY''
# at t/fetch_oui_from_custom.t line 23.
# 'Got back array reference' isn't defined
# Failed test 'Fetched Apple's OUI entry'
# at t/fetch_oui_from_custom.t line 25.
# ''
# doesn't match '(?^:Apple, Inc\.)'
# Looks like you failed 2 tests of 2.
t/fetch_oui_from_custom.t .. 2/?
# Failed test 'fetch'
# at t/fetch_oui_from_custom.t line 27.
Use of uninitialized value in concatenation (.) or string at /Users/johnprokopek/.cpan/build/Net-MAC-Vendor-1.265-13/blib/lib/Net/MAC/Vendor.pm line 320.
Failed fetching [http://standards.ieee.org/cgi-bin/ouisearch?14-10-9F] HTTP status []
Can someone help, thanks
I'm also still on High Sierra (10.13.6), on an ancient-but-still-running Mac Mini mid-2010. Using the built-in /usr/bin/perl (v5.18.2), running install Net::MAC::Vendor inside the CPAN shell gave me the same error. Running force install Net::MAC::Vendor worked, in that the module was installed.
A simple perl -MNet::MAC::Vendor -e "print 'hi'" works, so it looks like Perl can at least load that library, not really sure how to test that it works for real. But, at least this will let you install it and try it.
The system is Ubuntu. There is a perl in /usr/bin/, and is version is 5.18.2.
In this state, I tried to install many software by "sudo apt-get install **" and it was OK.
But a few days before, I installed a new perl in an other
directory(/share/Software/perl-5.26.0/bin/perl). And I remove the original perl then link the new perl to /use/bin/. The commands are:
sudo mv /usr/bin/perl /usr/bin/old/; (the old/ directory was make before)
sudo ln -s /share/Software/perl-5.26.0/bin/perl /usr/bin/perl
After that, I got the error informations when I install system software by apt-get. The error likes below:
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in #INC (you may need to install the Debconf::Log module) (#INC contains: /share/Software/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/site_perl/5.26.0 /share/Software/perl-5.26.0/lib/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/5.26.0) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
Setting up doc-base (0.10.5) ...
Can't locate Debian/DocBase/Common.pm in #INC (you may need to install the Debian::DocBase::Common module) (#INC contains: /share/Software/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/site_perl/5.26.0 /share/Software/perl-5.26.0/lib/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/5.26.0) at /usr/sbin/install-docs line 8.
BEGIN failed--compilation aborted at /usr/sbin/install-docs line 8.
Some software can be installed successfully, but some can not be.
If I put perl back to the previous, it is normal again. (That must be!)
Module "Debconf::Log" is located at /share/Software/perl-5.26.0/lib/perl5, but I can not find Debian/DocBase/Common.pm.
Path of /share/Software/perl-5.26.0/lib/perl5 is inside #INC of perl. Why it can not find it?
I even think that it is the problem when perl installed. I get below error when perl installed: ("make test")
Useless use of single ref constructor in void context at op/gv.t line 1191.
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
ExtTest.c: In function ‘XS_ExtTest_constant’:
../../../../embed.h:691:40: warning: ‘pv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c)
^
ExtTest.xs:420:14: note: ‘pv’ was declared here
const char *pv;
^
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
../../../../embed.h:691:40: warning: ‘iv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c)
^
ExtTest.xs:418:6: note: ‘iv’ was declared here
IV iv;
^
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
ExtTest.c: In function ‘XS_ExtTest_constant’:
../../../../embed.h:691:40: warning: ‘pv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c)
^
ExtTest.xs:194:14: note: ‘pv’ was declared here
const char *pv;
^
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
ExtTest.c: In function ‘XS_ExtTest_constant’:
../../../../embed.h:675:42: warning: ‘iv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setiv_mg(a,b) Perl_sv_setiv_mg(aTHX_ a,b)
^
ExtTest.xs:166:6: note: ‘iv’ was declared here
IV iv;
^
# Failed test 'cp updated mtime'
# at t/cp.t line 26.
# '38'
# <=
# '1'
# Looks like you failed 1 test of 1.
Request to remove file /share/Software/perl-5.26.0-src/cpan/File-Temp/suffixOEXZVr.dat could not be completed since it is not there!
at t/mktemp.t line 75.
# parser guessed wrong encoding expected 'CP1252' got 'UTF-8'
# Failed test 'File 1 atime set correctly'
# at t/utime.t line 113.
# '37.684463262558'
# <
# '0.1'
# Failed test 'File 1 mtime set correctly'
# at t/utime.t line 114.
# '37.684463262558'
# <
# '0.1'
# Failed test 'File 2 atime set correctly'
# at t/utime.t line 118.
# '37.684463262558'
# <
# '0.1'
# Failed test 'File 2 mtime set correctly'
# at t/utime.t line 119.
# '37.684463262558'
# <
# '0.1'
# Looks like you failed 4 tests of 18.
Can't open copy1-87150: Permission denied at ../lib/File/Copy.t line 326.
# Looks like your test exited with 13 just after 366.
Failed 3 tests out of 2449, 99.88% okay.
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
### ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
### You may have to set your dynamic library search path,
### LD_LIBRARY_PATH, to point to the build directory:
### setenv LD_LIBRARY_PATH `pwd`:$LD_LIBRARY_PATH; cd t; ./perl harness
### LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd t; ./perl harness
### export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
make: *** [test] Error 1
Each Perl is compiled with a few #INC directories where it will search for modules. The error message explains which directories are searched:
#INC contains:
/share/Software/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux
/share/Software/perl-5.26.0/lib/site_perl/5.26.0
/share/Software/perl-5.26.0/lib/5.26.0/x86_64-linux
/share/Software/perl-5.26.0/lib/5.26.0
This does not include the directories where APT has installed modules for Perl, e.g. under /usr/lib.
However, adding those directories will not help. Some modules are compiled for a specific Perl versions. You cannot upgrade Perl in-place, but would have to reinstall all modules. Since APT contains pre-built modules you cannot use modules installed via APT with a custom Perl.
Therefore: leave the system Perl because Ubuntu depends on its proper functioning. It is safe to install another Perl alongside, e.g. via perlbrew. It is safe to add a custom Perl to your PATH, e.g. via perlbrew switch. This will also fix a couple of additional environment variables that are required for a second Perl to work.
Context
Here is a perl test script, in which I wanted to see how you can use a specific event loop with AnyEvent :
# file test.pl :
#!/usr/bin/perl
use strict;
use warnings;
use AnyEvent;
use AnyEvent::Impl::EV;
my $cv = AnyEvent->condvar;
my $wait_one_and_a_half_seconds = AnyEvent->timer (
after => 0.5, # after how many seconds to invoke the cb?
cb => sub { # the callback to invoke
print ("Hello from callback\n");
$cv->send;
},
);
# now wait till our time has come
$cv->recv;
Problem
Here is the error I get when running the above code :
$ perl test.pl
Can't locate EV.pm in #INC (you may need to install the EV module) (#INC
contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18
/usr/local/lib/site_perl .) at /usr/local/lib/perl/5.18.2/AnyEvent/Impl/EV.pm
line 28.
BEGIN failed--compilation aborted at /usr/local/lib/perl/5.18.2/AnyEvent/Impl/EV.pm line 28.
Compilation failed in require at test.pl line 6.
BEGIN failed--compilation aborted at test.pl line 6.
Yet I installed the AnyEvent package using cpanm, and the AnyEvent/Impl/EV.pm file is present in one of the #INC path :
$ ls /usr/local/lib/perl/5.18.2/AnyEvent/Impl/
Cocoa.pm Event.pm FLTK.pm IOAsync.pm Perl.pm Qt.pm UV.pm
EventLib.pm EV.pm Glib.pm Irssi.pm POE.pm Tk.pm
Question
How do I fix this ?
Extra remark
The error message says it is looking for EV.pm, but I would have expected AnyEvent/Impl/EV.pm.
How come the use AnyEvent::Impl::EV; I wrote got turned into perl is looking for EV.pm at runtime ?
Just tried to reproduce this with cpan install AnyEvent and can confirm I get the same error.
Line 28 of 'EV.pm' is use EV 4.00;. Your use EV; is a bit of a red herring - that's not the source of the error. This module explicitly includes a 'use' line (which frankly is a bit wierd, it's 'using' itself it seems?)
I don't think that's ever going to work, unless the #INC path is changed - I can only assume that the loading of this module is handled elsewhere, without deconstructing source code.
Referencing the man page - this module gets loaded automatically as required. So you probably don't need to use it in the first place.
Edit: Just compared perl versions. Perl 5.8.5 shows the same behaviour. My 5.20.1 install doesn't.
I'm not sure upgrading perl is necessarily the right step, but it might be worth trying? I'll try and figure out why 5.20.1 works though. It's got to be something to do with handling of #INC.
Edit:
"The handling of return values of #INC filters (subroutines returned by subroutines in #INC) has been fixed in various ways. Previously tied variables were mishandled, and setting $_ to a reference or typeglob could result in crashes."
http://perldoc.perl.org/perl5200delta.html
I think that might be what the problem is.
You're certainly not alone in having this:
http://www.cpantesters.org/cpan/report/d5939816-a510-11e0-bd04-22322d9f2468
From:
http://cpansearch.perl.org/src/MLEHMANN/AnyEvent-7.08/Changes
5.29 Sun Dec 5 10:49:21 CET 2010
- convert EV backend to EV 4.00 API (so better upgrade EV too).
The error message was actually a very correct and forward pointer to what should be done : there is an EV package which needs to be installed separately :
$ sudo cpanm EV
--> Working on EV
Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/EV-4.18.tar.gz ... OK
Configuring EV-4.18 ... OK
Building and testing EV-4.18 ... OK
Successfully installed EV-4.18
1 distribution installed
After that, everything works :
$ cat test.pl
#!/usr/bin/perl
use strict;
use warnings;
use AnyEvent;
use EV;
my $wait_one_and_a_half_seconds = AnyEvent->timer (
after => 0.5, # after how many seconds to invoke the cb?
cb => sub { # the callback to invoke
print ("Hello from callback\n");
},
);
# now wait till our time has come
EV::run();
$ perl test.pl
Hello from callback
When I run the following to create an executable out of my Perl script:
pp -o process_target_mode_data Process_Target_Mode_Data.pl
I get the following error output:
Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation failed in require at -e line 459.
/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parleNrP2Xi' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172, <DATA> line 1.
Could someone explain to me what is going on and how I can resolve this problem?
Info brian d foy requested:
[bash-3.2][Neil#willy]$ which pp
/home/Neil/ActivePerl-5.12/site/bin/pp
[bash-3.2][Neil#willy]$ /home/Neil/ActivePerl-5.12/site/bin/pp -o process_target_mode_data Process_Target_Mode_Data.pl
Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation failed in require at -e line 459.
/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parludZfldz' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172, line 1.
[bash-3.2][Neil#willy]$
[bash-3.2][Neil#willy]$ /home/Neil/ActivePerl-5.12/bin/cpan -l | grep PAR
PAR 1.002
PAR::Dist 0.47
PAR::Heavy 0.12
PAR::Filter 0.03
PAR::SetupTemp 1.002
PAR::SetupProgname 1.002
PAR::Packer 1.006
PAR::StrippedPARL::Dynamic 0.958
PAR::StrippedPARL::Static 0.958
PAR::StrippedPARL::Base 0.975
PAR::Filter::Bytecode undef
PAR::Filter::Bleach undef
PAR::Filter::Obfuscate undef
PAR::Filter::PatchContent undef
PAR::Filter::PodStrip undef
App::Packer::PAR 0.91
Perl lib version (5.12.2) doesn't match executable version (v5.12.0)
Some parts of your Perl installation are at a different version than others. More specifically, if you look at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50, you will see that there is an explicit comparison of the version of Perl being executed (which is 5.12.0) to the version of the Config.pm library being used (5.12.2).
If you perform a new installation of ActivePerl 5.12.2 (to bring all components up to the same version), this error should go away.
I had same issue. I installed PAR::Packer from Activestate Perl Package Manager (PPM). As mentioned above in one of the replies, there is version mismatch between the perl and pp binaries. Here's how I fixed it:
Uninstall PAR-Packer from PPM.
Open DOS command line.
Run cpan install PAR::Packer
This will download, compile, and install the package from CPAN. MinGW compiler toolchain will be downloaded as well, if needed. The whole process may take a while on slower cpus.
Find the location of that pp, then figure out its version. I bet it's left over from an earlier installation. Ensure that you have PAR for your new version of Perl.
You can also try specifying the location of the particular pp you want to use so you know exactly what one you are using:
$ /full/path/to/5.12.2/pp ...
Go to the perl/lib/Config.pm and changed the condition in the lines:
die "$0: Perl lib version (5.32.0) doesn't match executable '$^X' version ($])" unless $^V;
to
die "$1: Perl lib version (5.32.1) doesn't match executable '$^X' version ($])" unless $^V;
and the next line
$^V eq 5.32.0 or die sprintf "%s: Perl lib version (5.32.0) doesn't match executable '$^X' version (%vd)", $0, $^V;
to
$^V eq 5.32.1 or die sprintf "%s: Perl lib version (5.32.1) doesn't match executable '$^X' version (%vd)", $0, $^V;
this worked for me, at least it won't complain... yes, i know, PERL and Python are f***d up.