Skip Menu |
 

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

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

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

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



Subject: Archive::Zip and dlls not found on target system
Download (untitled) / with headers
text/plain 759b
I compiled an exe w/pp on Windows 95 with strawberry perl. It runs fine on the system I compiled it on, but when I run it on other systems without strawberry perl (a Windows Vista and another XP system), it says "can't locate Archive/Zip.pm in @INC (@INC contains C:/strawberry/perl/vendor/lib .)". I tried adding --module=Archive::Zip to pp but get the same error. If I copy just the Archive/* directory structure to c:/strawberry/perl/vendor/lib, then I get that zlib1.dll is not found, then if I add --link=zlib1.dll to the pp command, the program (almost) works. The program uses Tk::PNG (from Tk) and libpng3.dll is also not found, after adding --link=libpng3.dll, the program runs. Not sure if this part is a bug or maybe it should be a separate bug.
Download (untitled) / with headers
text/plain 305b
On Fri Apr 16 03:32:28 2010, DOUGW wrote: Show quoted text
> I compiled an exe w/pp on Windows 95 with strawberry perl. It runs fine > on the system I compiled it on, but when I run it on other systems > without strawberry perl (a Windows Vista and another XP system), it says
Why did I say Windows 95? It was Windows XP.
Subject: Re: [rt.cpan.org #56654] Archive::Zip and dlls not found on target system
Date: Fri, 16 Apr 2010 11:23:48 +0200
To: bug-PAR-Packer [...] rt.cpan.org
From: Roderich Schupp <schupp [...] argumentum.de>
Download (untitled) / with headers
text/plain 1.6k
On Fri, Apr 16, 2010 at 9:32 AM, Douglas Wilson via RT <bug-PAR-Packer@rt.cpan.org> wrote: Show quoted text
> I compiled an exe w/pp on Windows 95 with strawberry perl. It runs fine > on the system I compiled it on, but when I run it on other systems > without strawberry perl (a Windows Vista and another XP system), it says > "can't locate Archive/Zip.pm in @INC (@INC contains > C:/strawberry/perl/vendor/lib .)". I tried adding --module=Archive::Zip > to pp but get the same error.
Might be related to http://rt.cpan.org/Public/Bug/Display.html?id=52794 A pp-packed executable contains two parts: (1) a special purpose Perl interpreter and a set of "built-in" modules (2) a .par archive (actually a zip archive) with your script and all modules used by it (directly and indirectly) that are not already present in part (1). Part (1) is the same for every pp-packed executable. It's created when you build PAR::Packer. Archive::Zip must be in part (1), because it's needed to get to the stuff in part (2). Looks like it's AWOL in your case (see below). Adding it with --module=Archive::Zip only adds it to part (2), so that won't work. To check what's actually in part (1) of your exe, please run the attached script perl extract-embedded.pl your.exe temp-direcory-to-extract-into and post its output. Show quoted text
> The program uses Tk::PNG (from Tk) and libpng3.dll is also not found, > after adding --link=libpng3.dll, the program runs. Not sure if this part > is a bug or maybe it should be a separate bug.
That's definitely a separate bug. The dependency on libpng3.dll should have been detected (actually by Module::ScanDeps) and hence it should get packed into part (2). Cheers, Roderich
Download extract-embedded.pl
text/x-perl 1.2k

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 1.1k
On Fri Apr 16 05:24:02 2010, schupp@argumentum.de wrote: Show quoted text
Ah, thanks. I remember I was getting similar errors during make test, and I force installed. I applied this patch and reinstalled PAR-Packer: http://rt.cpan.org/Public/Bug/Display.html?id=52794#txn-723440 All tests passed (or skipped), and there was no Archive/Zip.pm error on the target systems. Though I still had to include --link=libpng3.dll and --link=zlib1.dll (which I guess is a separate error). Even after I included --link=libpng3.dll, the error about zlib1.dll was while loading Tk::PNG, so I guess Module::ScanDeps is not working for Tk::PNG. Show quoted text
> > To check what's actually in part (1) of your exe, please run the > attached script > > perl extract-embedded.pl your.exe temp-direcory-to-extract-into > > and post its output.
I can still post the output before and/or after I applied the patch if you still want, but the problem appears to be fixed now. Archive/Zip* files were not in the pre-patch output, and now there are Archive/Zip* files/directories there. Thanks for your help.
Subject: Re: [rt.cpan.org #56654] Archive::Zip and dlls not found on target system
Date: Mon, 19 Apr 2010 14:23:22 +0200
To: bug-PAR-Packer [...] rt.cpan.org
From: Roderich Schupp <schupp [...] argumentum.de>
Download (untitled) / with headers
text/plain 1.7k
On Sat, Apr 17, 2010 at 6:31 AM, Douglas Wilson via RT <bug-PAR-Packer@rt.cpan.org> wrote: Show quoted text
> I applied this patch and reinstalled PAR-Packer: > http://rt.cpan.org/Public/Bug/Display.html?id=52794#txn-723440 > > All tests passed (or skipped), and there was no Archive/Zip.pm error on > the target systems. > I can still post the output before and/or after I applied the patch if > you still want, but the problem appears to be fixed now. Archive/Zip* > files were not in the pre-patch output, and now there are Archive/Zip* > files/directories there.
Thanks, not necessary - that just proves that this the same problem as in #52794. I commited the above patch to PAR::Packer. Show quoted text
> Though I still had to include --link=libpng3.dll and > --link=zlib1.dll (which I guess is a separate error). Even after I > included --link=libpng3.dll, the error about zlib1.dll was while loading > Tk::PNG, so I guess Module::ScanDeps is not working for Tk::PNG.
That depends on the defintion of "working" :) The problem here is: (1) Tk::PNG is an XS module, i.e. actually consists of a Perl file, Tk/PNG.pm, and a correspondig "glue" DLL PNG.dll (2) PNG.dll references (via the OS-specific shared library mechanism) the actual libpng3.dll (3) libpng3.dll in turn references zlib1.dll Module::ScanDeps only accounts for dependency (1). If you also want (2) and (3) you would have to implement highly OS-specific code that (a) detects shared library references from one shared library to another (b) mimicks the search for the file a shared library actually lives in (which is usually referenced only by name, not by path), so that we may pack it in Of course, patches welcome :) But seriously, if you know of a Perl module that does the heavy lifting described above, let me know... Cheers, Roderich


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.