Skip to main content

Solving PAR::Packer "Can't locate loadable object for module IO in @INC"

Building an executable with Strawberry Perl is successful but when actually running it (after we have renamed the c:/strawberry to c:/strawberryX so it cannot find the dependencies from the path), fails with the following errors :

" Can't locate loadable object for module IO in @INC (@INC contains: CODE(0xa1d31c
) C:\strawberry\perl\vendor\lib .) at C:/strawberry/perl/site/lib/PAR/Heavy.pm l
ine 103
Compilation failed in require at C:/strawberry/perl/lib/IO/Handle.pm line 266.
BEGIN failed--compilation aborted at C:/strawberry/perl/lib/IO/Handle.pm line 26
6.
Compilation failed in require at C:/strawberry/perl/lib/IO/Seekable.pm line 101.
BEGIN failed--compilation aborted at C:/strawberry/perl/lib/IO/Seekable.pm line
101.
Compilation failed in require at C:/strawberry/perl/lib/IO/File.pm line 133.
BEGIN failed--compilation aborted at C:/strawberry/perl/lib/IO/File.pm line 133.
Compilation failed in require at -e line 351. "

I am on WinXP SP3 ,PAR 1.002,PAR::Packer 1.009, and have tried Strawberry Perl versions 5.12.3.0,5.10.1.5,5.10.1.1 and the problem persists in all of them

perl -V reveals something strange with the backslashes:

%ENV:
   PERL_JSON_BACKEND="JSON::XS"
   PERL_YAML_BACKEND="YAML"
 @INC:
   C:/strawberry/perl/lib
   C:/strawberry/perl/site/lib
   C:\strawberry\perl\vendor\lib
   .

"C:\strawberry\perl\vendor\lib" is not consistent with the other entries

I've found id 52794 which is related to the issue although it refers to version PAR::Packer 1.001;
nevertheless I got the following line :
"if ($Config{_delim} eq '\\') { s{\\}{/}g for @inc }"
from the patch (the patch actually REMOVES this line!!) and added it to par.pl after line 540.


I also corrected Strawberry's @INC by prepending the path  "C:/strawberry/perl/vendor/lib" by setting the PERL5LIB env variable, rebuilt it and everything works fine and even tried it in machines that have no Perl installation whatsoever

It looks like Strawberry has the path messed up and needs the correct one.

Furthemore "if ($Config{_delim} eq '\\') { s{\\}{/}g for @inc }" satisfies Heavy.pm

Comments

Popular posts from this blog

The Advent of SQL 2024 Has Commenced

  It's Advent - the time of year when we countdown the days to Christmas - and if your are a programmer complete daily coding challenges with the Advent of Code, the Advent of Perl, the Advent of Java, Javascriptmas, etc. Now we have the Advent of SQL too with 24 SQL challenges to complete before Christmas! https://www.i-programmer.info/news/204-challenges/17678-the-advent-of-sql-2024-has-commenced.html

Greenplum's Cloudberry Fork Enters Apache Incubator

  Cloudberry is the open source equivalent of Greenplum. Now it is fostered by the Apache Foundation as it acquires incubating status. It all began about six months ago. Greenplum's Github repositories was archived and went dark. This meant no more free new releases or security and bug fixes for its users. Why? Because in May 2024, Tanzu made the decision to close-source the project. https://www.i-programmer.info/news/84-database/17694-greenplums-cloudberry-fork-enters-apache-incubator-.html