Why do I get "version (5.12.2) doesn't match executable version" with Perl's PAR?

12,046

Solution 1

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.

Solution 2

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:

  1. Uninstall PAR-Packer from PPM.
  2. Open DOS command line.
  3. 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.

Solution 3

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 ...
Share:
12,046
Horace Debussy Jones
Author by

Horace Debussy Jones

Updated on June 17, 2022

Comments

  • Horace Debussy Jones
    Horace Debussy Jones about 2 years

    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
    
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    I just installed this version of Perl before running my "pp" example above. ActiveState Perl builds Config.pm during the installation process. I assume that there is an installation bug if this is happening.
  • Ether
    Ether over 13 years
    @Horace: the Perl executable you are running is only 5.12.0; are you sure you did a full clean install (not on top of an old installation)?
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    Yes. Is it possible that the Config.pm (that was generated when I installed Perl 5.12.2) is comparing the version string 5.12.2 to a version string of something else that is part of the PAR:Packer.pm and it's version string is 5.12.0?
  • Ether
    Ether over 13 years
    @Horace: yes, the pp binary. To be really sure, delete it and reinstall PAR::Packer.
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    I did and nothing has changed.
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    pp -V returns the following informaton: PAR Packager, version 1.006 (PAR version 1.002) So I am still wondering what "perl executable" is returning "5.12.0"
  • brian d foy
    brian d foy over 13 years
    Expand your question to show us exactly what you tried, what answers you got, etc. We can't help you with psychic powers.
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    brian - I have. At the top of this post I described exactly what I entered in at the command line and the exact results I got. No psychic powers are required.
  • brian d foy
    brian d foy over 13 years
    No, what you tried with my suggestions. You don't show the paths to pp, what it reports for a version, etc. Really, we can only help you to the extent that you give us enough information to help you. So far you haven't. Do what I suggest and post a full transcript of the results in your original question.
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    brian I have posted the results of what you requested.
  • user1316401
    user1316401 over 13 years
    Install PAR::Packer from sources. Use ppm to install MinGW and install PAR::Packer directly from CPAN.
  • user1316401
    user1316401 over 13 years
    Oh, and if the above doesn't help, then check whether you have some old perl512.dll (or similar) hanging about in your system, leftover from some previous installation. But I believe the install-from-sources suggestion will help you. Otherwise: Contact the PAR mailing list.
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    tsee - isn't MinGw for Windows? I am running Red Hat Enterprise Linux.
  • Horace Debussy Jones
    Horace Debussy Jones over 13 years
    @tsee I removed PAR::Packer from my installation using PPM. I then used cpanp to reinstall it. It work perfectly - THE PROBLEM IS RESOLVED. Thanks for your suggestions.
  • user1316401
    user1316401 over 13 years
    @Horace: Sorry, I have ActivePerl == win32 hardwired in my brain. Glad it worked out for you despite my confusing advice :)
  • Plaute
    Plaute over 5 years
    I couldn't install my own version of PAR::Packer, many unsolvable problems with MinGW (windres was not present). So, I decided to hack Config.pm temporarly and comment line which compare versions. It works fine for me. I am using the exe application without problem. It's awful, but It can help.