Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Packaged binary fails on perlless systems [win32]

by nikosv (Hermit)
on Jun 14, 2011 at 10:31 UTC ( #909577=note: print w/ replies, xml ) Need Help??


in reply to Packaged binary fails on perlless systems [win32]

I've just hit the same issue,and that is the workaround I've found which I also filed as a bug and I am awaiting a reply.

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: C +ODE(0xa1d31c ) C:\strawberry\perl\vendor\lib .) at C:/strawberry/perl/site/lib/PAR/ +Heavy.pm line 103</p> Compilation failed in require at C:/strawberry/perl/lib/IO/Handle.pm l +ine 266.

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 (https://rt.cpan.org/Public/Bug/Display.html?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

Try it out and let me know if it was successfull


Comment on Re: Packaged binary fails on perlless systems [win32]
Select or Download Code
Re^2: Packaged binary fails on perlless systems [win32]
by Anonymous Monk on Jun 14, 2011 at 11:07 UTC
    I've just hit the same issue,and that is the workaround I've found which I also filed as a bug and I am awaiting a reply.

    Hi. This is not the same issue at all. The is using ActivePerl, and did not have packed IO.pm and auto/IO/IO.dll. The OP gets the message on a different computer, not the one used for packing. See Re: Packaged binary fails on perlless systems [win32]

      Hi
      The is using ActivePerl

      ok but the error is the same

      The OP gets the message on a different computer, not the one used for packing

      renaming the perl directory of the pc used for unpacking makes it the same case;it also did not run on pcs' that had never perl installed

      anyway maybe he could use some of that info and try out, regardless if it is strawberry or active

        ok but the error is the same

        Yeah, I noticed, but context matters.

        anyway maybe he could use some of that info and try out, regardless if it is strawberry or active

        Sorry, but the info isn't clear enough to try out, in any case, that bug is closed

        Just noticed your answer. Thank you very much for your research. I'm using Citrus Perl now. It works perfectly and the resulting binaries are smaller too... :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://909577]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2014-09-16 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (156 votes), past polls