Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

"Can't locate XSLoader.pm..." from .exe created with pp

by jprice (Novice)
on Sep 15, 2008 at 13:03 UTC ( [id://711450]=perlquestion: print w/replies, xml ) Need Help??

jprice has asked for the wisdom of the Perl Monks concerning the following question:

I found a few hits on this error, but nothing that clearly applied to my problem. If the answer is already out there, I apologize. Just point me there and I'll go away quietly... ;)

I'm creating a standalone .exe in windows 2000 using pp.
The resulting .exe file runs fine on the system where I created it. But if I copy it to a system where there is no perl installation I get the following error:
"Can't locate XSLoader.pm in @INC (@INC contains: CODE(0x9fb134) .) at -e line 345"

I've run pp with the -l switch and specified all of the perl lib directories. I've also specifically included the XSLoader.pm file with the -a switch. In the verbose output from pp I can see that XSLoader.pm has been included in the archive.
Here's the pp command I used:
pp -vvv -B -l C:\strawberry\perl\lib -l C:\strawberry\perl\site\lib -a C:\strawberry\perl\lib\XSLoader.pm -o crypttest.exe cryptpw.pl

What am I missing?

Replies are listed 'Best First'.
Re: "Can't locate XSLoader.pm..." from .exe created with pp
by jprice (Novice) on Sep 15, 2008 at 18:30 UTC
    I had a few perl installations (an older ActiveState, and Strawberry Perl), so for sanity's sake, I decided to uninstall them all, and reinstall the latest version from ActiveState. Added the necessary PAR and PAR Packager modules, but unfortunately still have issues.

    Similar issues to before with "missing" modules.
    Now I'm getting this:
    Can't locate loadable object for module IO in @INC (@INC contains: COD +E(0x7cdc24) .) at C:/Perl/site/lib/PAR/Heavy.pm line 87 Compilation failed in require at C:/Perl/lib/IO/Handle.pm line 263. BEGIN failed--compilation aborted at C:/Perl/lib/IO/Handle.pm line 263 +. Compilation failed in require at C:/Perl/lib/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at C:/Perl/lib/IO/Seekable.pm line 1 +01. Compilation failed in require at C:/Perl/lib/IO/File.pm line 133. BEGIN failed--compilation aborted at C:/Perl/lib/IO/File.pm line 133. Compilation failed in require at -e line 376.
    I found the par cache directory, and a bunch of cryptic named pm's therein, and when I run the .exe file from there, I get this:
    Can't locate Win32.pm in @INC (@INC contains: .) at -e line 778. BEGIN failed--compilation aborted at -e line 963.
    So it seems that it's finding more of the modules, just not all of them.
    I know that Win32.pm is in there, because I can see it being added when pp is run:
    Packing "Win32.pm"... Written as "Win32.pm"

    It seems to me that there's something messed up with the pathing in PAR. As far as I can tell, all the modules are there, it's just that it doesn't know where to look when running the .exe

    Is there some sort of "Include" environment var that can be set so it knows where to look for everything?
      Is there some sort of "Include" environment var that can be set so it knows where to look for everything?

      No. Most likely you have an old version of PAR/PAR::Packer... need to upgrade

Re: "Can't locate XSLoader.pm..." from .exe created with pp
by tsee (Curate) on Sep 17, 2008 at 09:35 UTC

    Please post the exact versions of perl, PAR, and PAR::Packer you're using as well as how and from where you installed them. That may help us figure out what's going wrong. If you installed PAR/PAR::Packer via PPM, try installing it from the bribes.org repository instead of the ActiveState one.

    Furthermore, you could unzip the generated executable (you should be able to open it like a zip file) and see what's in there. Are the files that are reported missing actually in the file?

    Cheers,
    Steffen

Re: "Can't locate XSLoader.pm..." from .exe created with pp
by Lrdtalon (Novice) on Jun 17, 2009 at 17:08 UTC
    I am having the same issue, when i unzip the resultant .exe i can see the file included.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://711450]
Approved by Corion
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-03-29 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found