Skip Menu |

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

Report information
The Basics
Id: 102690
Status: open
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: ZDM [...] cpan.org
Cc:
AdminCc:

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



Subject: Error with packing Check.xs.dll
Hi. Environment - strawberry perl 5.20.2 x64 on windows 8.1 x64. I try to pack this small example: #!/usr/bin/env perl package main v0.1.0; no multidimensional; 1; __END__ using following command: pp -o 1.exe 1.pl When I execute 1.exe I get following error: Can't load 'D:\tmp\par-7a646d\cache-1426079581\b61437bc.xs.dll' for module multidimensional: load_file:The specified module could not be found at d:/devel/p erl/perl/lib/DynaLoader.pm line 193. at d:/devel/perl/perl/site/lib/PAR/Heavy.pm line 120. Compilation failed in require at script/1.pl line 5. BEGIN failed--compilation aborted at script/1.pl line 5. b61437bc.xs.dll is the alias for auto/B/Hooks/OP/Check/Check.xs.dll But in PAR this is completely different file, than original. I don't know why, maybe you compress dlls or do something else, but this didn't work with this dll.
Am 2015-03-11 09:17:58, ZDM schrieb: Show quoted text
> Can't load 'D:\tmp\par-7a646d\cache-1426079581\b61437bc.xs.dll' for > module multidimensional: load_file:The specified module could not be > found at d:/devel/p > erl/perl/lib/DynaLoader.pm line 193. > at d:/devel/perl/perl/site/lib/PAR/Heavy.pm line 120. > Compilation failed in require at script/1.pl line 5. > BEGIN failed--compilation aborted at script/1.pl line 5. > > b61437bc.xs.dll is the alias for auto/B/Hooks/OP/Check/Check.xs.dll
How did you determine this? Show quoted text
> But in PAR this is completely different file, than original. I don't > know why, maybe you compress dlls or do something else, but this > didn't work with this dll.
The only thing PAR::Packer does with DLLs (and most other files): - it stores them into a zip file (using Archive::Zip) - at runtime it extracts them under the mangled name, actually it uses the zip's crc32 checksum of the file as the mangled basename Extract auto/B/Hooks/OP/Check/Check.xs.dll from your exe manually, unzip 1.exe and compare with the above cache file. If there different, it's an Archive::Zip problem. If there identical, my guess is that it's Check.xs.dll compiled for a different Perl version (do you have several Perl versions installed on your machine?). BTW, have you checked that 1.pl works in unpacked form? Cheers, Roderich
Subject: Re: [rt.cpan.org #102690] Error with packing Check.xs.dll
Date: Wed, 11 Mar 2015 16:28:36 +0200
To: bug-PAR-Packer [...] rt.cpan.org
From: "dzagashev [...] gmail.com" <dzagashev [...] gmail.com>
On 11.03.2015 16:08, Roderich Schupp via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=102690 > > > Am 2015-03-11 09:17:58, ZDM schrieb:
>> Can't load 'D:\tmp\par-7a646d\cache-1426079581\b61437bc.xs.dll' for >> module multidimensional: load_file:The specified module could not be >> found at d:/devel/p >> erl/perl/lib/DynaLoader.pm line 193. >> at d:/devel/perl/perl/site/lib/PAR/Heavy.pm line 120. >> Compilation failed in require at script/1.pl line 5. >> BEGIN failed--compilation aborted at script/1.pl line 5. >> >> b61437bc.xs.dll is the alias for auto/B/Hooks/OP/Check/Check.xs.dll
> How did you determine this? >
>> But in PAR this is completely different file, than original. I don't >> know why, maybe you compress dlls or do something else, but this >> didn't work with this dll.
> The only thing PAR::Packer does with DLLs (and most other files): > - it stores them into a zip file (using Archive::Zip) > - at runtime it extracts them under the mangled name, actually it uses > the zip's crc32 checksum of the file as the mangled basename > > Extract auto/B/Hooks/OP/Check/Check.xs.dll from your exe manually, > unzip 1.exe > > and compare with the above cache file. If there different, it's > an Archive::Zip problem. If there identical, my guess is that it's > Check.xs.dll compiled for a different Perl version (do you have > several Perl versions installed on your machine?). BTW, have you > checked that 1.pl works in unpacked form?
I have only single perl version installed. auto/B/Hooks/OP/Check/Check.xs.dll in PAR and in perl are identical. Additionally to error in console I get windows system error message: "The program can't start because Check.xs.dll is missing from your computer." Also, if I manually copy Check.xs.dll to the directory with 1.exe - all works. 1.pl works without errors. Show quoted text
> > Cheers, Roderich > > > >
Am 2015-03-11 10:28:51, dzagashev@gmail.com schrieb: Show quoted text
> Additionally to error in console I get windows system error message: > "The program can't start because Check.xs.dll is missing from your > computer."
Hm, how can Windows know the name Check.xs.dll if PAR tries (unsuccessfully) to load it using its mangled name... Uh-oh, found it: multidimensional.xs.dll _directly_ links against Check-xs.dll! That's rogue behaviour. Only a handfull of modules do something like this and the all have problems with PAR::Packer (known offenders: Windows versions of Glib/Gtk+ and WxWidgets). Try the following workaround: explicitly add Check.xs.dll using "pp --link ...". This will pack 2 copies of it - one under the usual .../auto/... hierarchy and another directly under /shlib (or similar). The former will be extracted on demand using the mangled name, but the latter will always be extracted to cache-dir/shlib using the original name. Moreover the PATH for the execution of the packed exe will contain cache-dir/shlib, hence Windows will be able to locate the latter copy. Cheers, Roderich
Am 2015-03-11 12:04:13, RSCHUPP schrieb: Show quoted text
> Uh-oh, found it: multidimensional.xs.dll _directly_ links against Check.xs.dll!
Just for the record, one way to find the DLLs that foo.dll links against is objdump -ax foo.dl and look (or grep) for lines matching "DLL Name:". Cheers, Roderich
Subject: Re: [rt.cpan.org #102690] Error with packing Check.xs.dll
Date: Wed, 11 Mar 2015 18:08:33 +0200
To: bug-PAR-Packer [...] rt.cpan.org
From: "dzagashev [...] gmail.com" <dzagashev [...] gmail.com>
Thanks. Will do. On 11.03.2015 18:04, Roderich Schupp via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=102690 > > > Am 2015-03-11 10:28:51, dzagashev@gmail.com schrieb:
>> Additionally to error in console I get windows system error message: >> "The program can't start because Check.xs.dll is missing from your >> computer."
> Hm, how can Windows know the name Check.xs.dll if PAR tries > (unsuccessfully) to load it using its mangled name... > > Uh-oh, found it: multidimensional.xs.dll _directly_ links against Check-xs.dll! That's rogue behaviour. Only a handfull of modules do something like this and the all have problems with PAR::Packer (known offenders: Windows versions of Glib/Gtk+ and WxWidgets). > > Try the following workaround: explicitly add Check.xs.dll > using "pp --link ...". This will pack 2 copies of it - > one under the usual .../auto/... hierarchy and another directly under > /shlib (or similar). The former will be extracted on demand using the > mangled name, but the latter will always be extracted to cache-dir/shlib > using the original name. Moreover the PATH for the execution of the > packed exe will contain cache-dir/shlib, hence Windows will be able > to locate the latter copy. > > Cheers, Roderich