Skip Menu |
 

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 65535
Status: resolved
Priority: 0/
Queue: PAR-Packer

People
Owner: RSCHUPP [...] cpan.org
Requestors: ocheyette [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.012
Fixed in: 1.013



Subject: Unable to run perl script packaged with pp under cygwin on another Windows XP installation
Date: Mon, 7 Feb 2011 08:25:08 -0800 (PST)
To: bug-PAR [...] rt.cpan.org
From: Oren Cheyette <ocheyette [...] gmail.com>
Download (untitled) / with headers
text/plain 1.8k
I created a perl script parseDealerFiles.exe with pp: pp -o parseDealerFiles.exe -c read_agency.pl The resulting package runs fine on the build system. On other platforms, however, it fails. On a clean XP box (no cygwin or perl installed), it fails with Show quoted text
> parseDealerFiles.exe
/cygdrive/c/DOCUME~1/OCHEYE~1/LOCALS~1/Temp/par-OCheyette/cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801/parseDealerFiles: error while loading shared libraries: cygperl5_10.dll: cannot open shared object file: No such file or directory This failure happens even though the dll does in fact exist in the cache: Show quoted text
>dir "C:\Documents and Settings\OCheyette\Local >Settings\Temp\par-OCheyette\cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801\cygperl5_10.dll" >
Directory of C:\Documents and Settings\OCheyette\Local Settings\Temp\par-OCheyette\cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801 02/07/2011 07:43 AM 1,665,958 cygperl5_10.dll 1 File(s) 1,665,958 bytes 0 Dir(s) 65,451,020,288 bytes free I attempted to fix this problem by installing a minimal version of cygwin+perl on the clean system. That didn't work either - I hit some problem with the POSIX module: Can't locate ./C:/TEMP/par-OCheyette/cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801/inc/lib/auto/POSIX/load_import.al in @INC (@INC contains: CODE(0x10a8a680) C:/TEMP/par-OCheyette/cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801/inc/lib C:/TEMP/par-OCheyette/cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801/inc CODE(0x108034a0) CODE(0x108039b0) /sfcore/Portfolio/Scripts) at POSIX.pm line 25 Version information: Show quoted text
> perl --version
This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int (with 13 registered patches, see perl -V for more detail) ... Show quoted text
> pp --version
PAR Packager, version 1.008 (PAR version 1.002) Copyright 2002-2009 by Audrey Tang <cpan@audreyt.org> ...
Subject: Re: [rt.cpan.org #65535] AutoReply: Unable to run perl script packaged with pp under cygwin on another Windows XP installation
Date: Mon, 7 Feb 2011 08:33:28 -0800 (PST)
To: bug-PAR [...] rt.cpan.org
From: Oren Cheyette <ocheyette [...] gmail.com>
Also, uname returns CYGWIN_NT-5.1
Download (untitled) / with headers
text/plain 1.9k
On 2011-02-07 11:25:16, ocheyette@gmail.com wrote: Show quoted text
> I created a perl script parseDealerFiles.exe with pp: > pp -o parseDealerFiles.exe -c read_agency.pl > > The resulting package runs fine on the build system. On other > platforms, however, it fails.
That's to be expected. The resulting executable still "lives" in the Cygwin universe, hence needs a minimal Cygwin runtime. If you want a real standalone executable, I suggest you use a "native" Perl distribution, e.g. ActiveState or Strawberry. Back to Cygwin: I just tried a minimal example (note that I have gcc-4 installed and built my PAR::Packer with it). $ pp -o hello.exe -e 'print "hello cygwin\n"' The resulting hello.exe is linked with (in addition to the Windows kernel32.dll) DLL contained in Cygwin package cygwin1.dll cygwin-1.7.7-1 cyggcc_s-1.dll cyggcc_s-1.dll cygssp-0.dll libssp0-4.3.4-3 If you look into the cache area, C:/temp/par-USER/SHA1CHECKSUM or similar, you'll see an executable called "hello" (it's different from hello.exe - it's actually a special purpose Perl interpreter). "hello" is also linked against the above DLLs plus cygperl5_10.dll (which can also be found in the cache area). The latter is in turn linked with cygcrypt-0.dll (contained in crypt-1.1-1) cygwin1.dll cyggcc_s-1.dll cygssp-0.dll So all Cygwin packages mentioned above need to be installed whereever you want to run the executable. (Package "perl" should NOT be needed, as cygperl5_10.dll has been packed in.) Show quoted text
> I attempted to fix this problem by installing a minimal version of > cygwin+perl on the clean system. That didn't work either - I hit > some problem with the POSIX module: > Can't locate
./C:/TEMP/par-OCheyette/cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801/inc/lib/auto/POSIX/load_import.al Different problem. Strange path name: - note ".C/:" at the beginning - the file is actually called load_imports.al (note the "s") Cheers, Roderich
Subject: Re: [rt.cpan.org #65535] Unable to run perl script packaged with pp under cygwin on another Windows XP installation
Date: Tue, 8 Feb 2011 06:50:16 -0800 (PST)
To: bug-PAR [...] rt.cpan.org
From: Oren Cheyette <ocheyette [...] gmail.com>
Download (untitled) / with headers
text/plain 2.6k
I actually did the cygwin install. Hence the mention in the bug report of doing a minimal install of cygwin and perl to try to fix the issue. Any thoughts on what's causing the POSIX load_import error? The error message is EXACTLY what appeared on the screen - no "s" at the end of load_import. And it was PAR (pp) that did all the relocation and renaming, so I have no idea what caused the screwy ./C: at the beginning. Thanks for the help. Show quoted text
________________________________ From: Roderich Schupp via RT <bug-PAR@rt.cpan.org> To: ocheyette@gmail.com Sent: Tue, February 8, 2011 2:46:39 AM Subject: [rt.cpan.org #65535] Unable to run perl script packaged with pp under cygwin on another Windows XP installation <URL: https://rt.cpan.org/Ticket/Display.html?id=65535 > On 2011-02-07 11:25:16, ocheyette@gmail.com wrote:
> I created a perl script parseDealerFiles.exe with pp: > pp -o parseDealerFiles.exe -c read_agency.pl > > The resulting package runs fine on the build system. On other > platforms, however, it fails.
That's to be expected. The resulting executable still "lives" in the Cygwin universe, hence needs a minimal Cygwin runtime. If you want a real standalone executable, I suggest you use a "native" Perl distribution, e.g. ActiveState or Strawberry. Back to Cygwin: I just tried a minimal example (note that I have gcc-4 installed and built my PAR::Packer with it). $ pp -o hello.exe -e 'print "hello cygwin\n"' The resulting hello.exe is linked with (in addition to the Windows kernel32.dll) DLL contained in Cygwin package cygwin1.dll cygwin-1.7.7-1 cyggcc_s-1.dll cyggcc_s-1.dll cygssp-0.dll libssp0-4.3.4-3 If you look into the cache area, C:/temp/par-USER/SHA1CHECKSUM or similar, you'll see an executable called "hello" (it's different from hello.exe - it's actually a special purpose Perl interpreter). "hello" is also linked against the above DLLs plus cygperl5_10.dll (which can also be found in the cache area). The latter is in turn linked with cygcrypt-0.dll (contained in crypt-1.1-1) cygwin1.dll cyggcc_s-1.dll cygssp-0.dll So all Cygwin packages mentioned above need to be installed whereever you want to run the executable. (Package "perl" should NOT be needed, as cygperl5_10.dll has been packed in.)
> I attempted to fix this problem by installing a minimal version of > cygwin+perl on the clean system. That didn't work either - I hit > some problem with the POSIX module: > Can't locate
./C:/TEMP/par-OCheyette/cache-f3bb3a3b5cf33a95f9828a5031438146c41d2801/inc/lib/auto/POSIX/load_import.al Different problem. Strange path name: - note ".C/:" at the beginning - the file is actually called load_imports.al (note the "s") Cheers, Roderich
Download (untitled) / with headers
text/plain 1007b
On 2011-02-08 09:50:28, ocheyette@gmail.com wrote: Show quoted text
> I actually did the cygwin install. Hence the mention in the bug report > of doing > a minimal install of cygwin and perl to try to fix the issue.
Please try my previous hello example on the machine with the minimal Cygwin install. Does it work? If not: you can find out about the DLLs needed with $ objdump -ax hello.exe | grep 'DLL Name' DLL Name: cygwin1.dll DLL Name: cyggcc_s-1.dll DLL Name: cygssp-0.dll DLL Name: KERNEL32.dll and then $ cygcheck -f /usr/bin/cygwin1.dll cygwin-1.7.7-1 etc to find the Cygwin package that contains these DLLs. Repeat for the executable named "hello" in the cache area and cygperl5_10.dll. Show quoted text
> Any thoughts on what's causing the POSIX load_import error? The error > message is > EXACTLY what appeared on the screen - no "s" at the end of > load_import.
Yeah, I can reproduce that here with a minimal $ pp -o posix.exe -e 'use POSIX; print "OK"' Stay tuned. Cheers, Roderich
Download (untitled) / with headers
text/plain 999b
On 2011-02-08 10:35:14, RSCHUPP wrote: Show quoted text
> Stay tuned.
OK, nailed it. Some weird heuristic in AutoBuilder.pm (a Perl core module) got the wrong idea when presented "C:\TEMP\...". So don't do that (at least for Cygwin). Can you please apply the following patch to PAR::Packer, then rebuild and re-install PAR::Packer. Finally re-pack your script and try it out. Cheers, Roderich Index: myldr/mktmpdir.c =================================================================== --- myldr/mktmpdir.c (revision 1233) +++ myldr/mktmpdir.c (working copy) @@ -58,7 +58,12 @@ char *c; const char *tmpdir = NULL; const char *key = NULL , *val = NULL; - const char *temp_dirs[4] = { "C:\\TEMP", P_tmpdir, ".", "" }; + const char *temp_dirs[4] = { + P_tmpdir, +#ifdef WIN32 + "C:\\TEMP", +#endif + ".", "" }; const char *temp_keys[6] = { "PAR_TMPDIR", "TMPDIR", "TEMPDIR", "TEMP", "TMP", "" }; const char *user_keys[3] = { "USER", "USERNAME", "" };
Subject: Re: [rt.cpan.org #65535] Unable to run perl script packaged with pp under cygwin on another Windows XP installation
Date: Tue, 8 Feb 2011 15:45:20 -0800 (PST)
To: bug-PAR [...] rt.cpan.org
From: Oren Cheyette <ocheyette [...] gmail.com>
Download (untitled) / with headers
text/plain 1.4k
Seems to work, though it surfaced some other cygwin related problem, but it doesn't seem to have anything to do with PAR. Thanks. Show quoted text
________________________________ From: Roderich Schupp via RT <bug-PAR@rt.cpan.org> To: ocheyette@gmail.com Sent: Tue, February 8, 2011 1:15:26 PM Subject: [rt.cpan.org #65535] Unable to run perl script packaged with pp under cygwin on another Windows XP installation <URL: https://rt.cpan.org/Ticket/Display.html?id=65535 > On 2011-02-08 10:35:14, RSCHUPP wrote:
> Stay tuned.
OK, nailed it. Some weird heuristic in AutoBuilder.pm (a Perl core module) got the wrong idea when presented "C:\TEMP\...". So don't do that (at least for Cygwin). Can you please apply the following patch to PAR::Packer, then rebuild and re-install PAR::Packer. Finally re-pack your script and try it out. Cheers, Roderich Index: myldr/mktmpdir.c =================================================================== --- myldr/mktmpdir.c (revision 1233) +++ myldr/mktmpdir.c (working copy) @@ -58,7 +58,12 @@ char *c; const char *tmpdir = NULL; const char *key = NULL , *val = NULL; - const char *temp_dirs[4] = { "C:\\TEMP", P_tmpdir, ".", "" }; + const char *temp_dirs[4] = { + P_tmpdir, +#ifdef WIN32 + "C:\\TEMP", +#endif + ".", "" }; const char *temp_keys[6] = { "PAR_TMPDIR", "TMPDIR", "TEMPDIR", "TEMP", "TMP", "" }; const char *user_keys[3] = { "USER", "USERNAME", "" };
Download (untitled) / with headers
text/plain 442b
BTW, the attached fix only solves the problem in a special case. I've just comitted a more general fix, will be in the next release. On 2011-02-08 18:45:29, ocheyette@gmail.com wrote: Show quoted text
> Seems to work, though it surfaced some other cygwin related problem, > but it > doesn't seem to have anything to do with PAR.
Closing this bug now. Feel free to open a new one if you encounter other problems with PAR::Packer on Cygwin. Cheers, Roderich
Fixed in 1.013


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.