Skip Menu |
 

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

Report information
The Basics
Id: 120131
Status: rejected
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: JRushworth [...] divestco.com
Cc:
AdminCc:

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



Subject: PAR::Packer DynaLoader Problem On Strawberry Perl 5.24.1
Date: Mon, 6 Feb 2017 15:51:42 -0700
To: <bug-PAR-Packer [...] rt.cpan.org>
From: "James P. Rushworth" <JRushworth [...] divestco.com>
Download (untitled) / with headers
text/plain 1.1k
The attached script when compiled with Strawberry Perl pp on 64bit Windows 10 creates an executable which will not run on a 64 bit Windows 10 machine which does not have Strawberry Perl installed, it won't run on a 64bit Windows 7 machine without Strawberry Perl installed either. The program will not run on a machine with ActiveState Perl installed giving the same error message. This is the error message: Can't load 'C:\Users\NTHOMP~1\AppData\Local\Temp\par-6e74686f6d70736f6e\cache-a689a490f84fa6e443fb002bba992a32a268b542\e88b1fb1.xs.dll' for module Tk::PNG: load_file:The specified module could not be found at C:/Perl64/perl/lib/DynaLoader.pm line 193. at C:/Perl64/perl/vendor/lib/PAR/Heavy.pm line 123. Compilation failed in require at script/module_test.pl line 39. BEGIN failed--compilation aborted at script/module_test.pl line 39. all of the modules after the DynaLoader comment cause a variation of this error message. This is the Perl version: C:\Users\james\perlapp>perl -v This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x64-multi-thread and this is the module version: C:\Users\james>perl -MPAR::Packer -le "print $PAR::Packer::VERSION" 1.036
Download module_test.pl
text/x-perl 863b

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

Download (untitled) / with headers
text/plain 1.3k
On 2017-02-06 22:26:13, JRushworth@divestco.com wrote: Show quoted text
> This is the error message: > > Can't load > 'C:\Users\NTHOMP~1\AppData\Local\Temp\par-6e74686f6d70736f6e\cache- > a689a490f84fa6e443fb002bba992a32a268b542\e88b1fb1.xs.dll' > for module Tk::PNG: load_file:The specified module could not be found > at > C:/Perl64/perl/lib/DynaLoader.pm line 193.
Most likely the Perl "glue" library for Tk::PNG (probably called .../TK/PNG/PNG.xs.dll) is linked with the png library (included in Strawberry Perl as c/bin/libpng16-16__.dl), but this libpng isn't included in the executable generated by pp. PAR::Packer doesn't know about dependencies like this and never packs non-Perl libraries unless explicitly told to do so. In this case pp --link libpng16-16__.dll ... should do the trick. You may verify that libpng gets packed by looking at the output of unzip -l your.exe In general, if module Foo::Bar shows this problem, locate its "glue" library .../Foo/Bar/Bar.xs.dll, then run objdump -ax ../Foo/Bar/Bar.xs.dll | perl -ne 'print if /DLL Name/' to show the libraries it is linked with, e.g. DLL Name: msvcrt.dll DLL Name: libpng16-16__.dll DLL Name: KERNEL32.dll DLL Name: perl524.dll Ignore Windows system libraries like msvcrt.dll and KERNEL32.dll, also the Perl shared library perl*.dll. The rest should be specified as --link's on the pp command line. Cheers, Roderich
Subject: Re: [rt.cpan.org #120131] PAR::Packer DynaLoader Problem On Strawberry Perl 5.24.1
Date: Tue, 7 Feb 2017 09:33:29 -0700
To: <bug-PAR-Packer [...] rt.cpan.org>
From: "James P. Rushworth" <JRushworth [...] divestco.com>
Download (untitled) / with headers
text/plain 2.4k
Roderich, I tried the pp command with the --link libpng16-16__.dll option and found libpng16-16__.dll included with the executable (it definitely wasn't without the --link option) but running the executable on a Windows 10 machine with no Perl installed produced exactly the same error. It seems to me that e88b1fb1.xs.dll is some kind of dynamic file which gets created if Perl is installed but not if there is no Perl. ttfn jr Roderich Schupp via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=120131 > > > On 2017-02-06 22:26:13, JRushworth@divestco.com wrote:
>> This is the error message: >> >> Can't load >> 'C:\Users\NTHOMP~1\AppData\Local\Temp\par-6e74686f6d70736f6e\cache- >> a689a490f84fa6e443fb002bba992a32a268b542\e88b1fb1.xs.dll' >> for module Tk::PNG: load_file:The specified module could not be found >> at >> C:/Perl64/perl/lib/DynaLoader.pm line 193.
> > Most likely the Perl "glue" library for Tk::PNG (probably called .../TK/PNG/PNG.xs.dll) > is linked with the png library (included in Strawberry Perl as c/bin/libpng16-16__.dl), > but this libpng isn't included in the executable generated by pp. > > PAR::Packer doesn't know about dependencies like this and never packs non-Perl > libraries unless explicitly told to do so. In this case > > pp --link libpng16-16__.dll ... > > should do the trick. You may verify that libpng gets packed by looking at the > output of > > unzip -l your.exe > > In general, if module Foo::Bar shows this problem, locate its "glue" library > .../Foo/Bar/Bar.xs.dll, then run > > objdump -ax ../Foo/Bar/Bar.xs.dll | perl -ne 'print if /DLL Name/' > > to show the libraries it is linked with, e.g. > > DLL Name: msvcrt.dll > DLL Name: libpng16-16__.dll > DLL Name: KERNEL32.dll > DLL Name: perl524.dll > > Ignore Windows system libraries like msvcrt.dll and KERNEL32.dll, also the > Perl shared library perl*.dll. The rest should be specified as --link's > on the pp command line. > > Cheers, Roderich > > > > > >
-- James P. Rushworth Senior Support Analyst Divestco Geomatics P: 587-952-8168 www.divestco.com C: 403-370-0519 300, 520 - 3 Avenue SW F: 587-952-8372 Calgary, AB T2P 0R3 This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential or privileged information. Any use of this e-mail by any other person is prohibited. If you have received this e-mail in error, please contact the sender. We honour similar requests relating to the privacy of email communications.
Download (untitled) / with headers
text/plain 1.1k
On 2017-02-07 11:34:00, JRushworth@divestco.com wrote: Show quoted text
> I tried the pp command with the --link libpng16-16__.dll option and > found libpng16-16__.dll included with the executable (it definitely > wasn't without the --link option) but running the executable on a > Windows 10 machine with no Perl installed produced exactly the same > error. > > It seems to me that e88b1fb1.xs.dll is some kind of dynamic file which > gets created if Perl is installed but not if there is no Perl.
No, it's not a dynamic file, it's actually one of the files that you see with unzip -l your.exe but extracted into the cache area with a different name (it's the CRC32 checksum of the original file's contents). My guess would be .../Tk/PNG/PNG.xs.dll (verify by comparing the output of md5sum or sha1sum for the two files). Anyway, look up the DLLs that this file is actually linked with, e.g. objdump -ax C:\Users\NTHOMP~1\AppData\Local\Temp\par-6e74686f6d70736f6e\cache-a689a490f84fa6e443fb002bba992a32a268b542\e88b1fb1.xs.dll | perl -ne 'print if /DLL Name/' Most likely it's not only linked with some libpng*, but also some libz*. Add another --link option for that, rinse and repeat. Cheers, Roderich
Subject: Re: [rt.cpan.org #120131] PAR::Packer DynaLoader Problem On Strawberry Perl 5.24.1
Date: Tue, 7 Feb 2017 10:56:32 -0700
To: <bug-PAR-Packer [...] rt.cpan.org>
From: "James P. Rushworth" <JRushworth [...] divestco.com>
Download (untitled) / with headers
text/plain 2.8k
Roderich, You are correct e88b1fb1.xs.dll is identical to PNG.xs.dll but what that means is: [james.r@jrushworth PNG]$ objdump -ax PNG.xs.dll | perl -ne 'print if /DLL Name/' DLL Name: msvcrt.dll DLL Name: libpng16-16__.dll DLL Name: KERNEL32.dll DLL Name: perl524.dll C:\Users\james\AppData\Local\Temp\par-6a616d6573\cache-c1546264452e74db829440ed61c603745f7769ed>objdump -ax e88b1fb1.xs.dll | perl -ne "print if /DLL Name/" DLL Name: msvcrt.dll DLL Name: libpng16-16__.dll DLL Name: KERNEL32.dll DLL Name: perl524.dll objdump for both files shows exactly the same links. The original error message tells us that it can't find e88b1fb1.xs.dll but the same file is in the executable called PNG.xs.dll. Why is it able to find the file if Strawberry Perl is installed on the machine but not if it isn't. One of the things I tried is installing Strawberry Perl on the machine immediately after getting the error message and starting a new command prompt with Strawberry Perl in the path and having the executable run with no error. ttfn jr Roderich Schupp via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=120131 > > > On 2017-02-07 11:34:00, JRushworth@divestco.com wrote:
>> I tried the pp command with the --link libpng16-16__.dll option and >> found libpng16-16__.dll included with the executable (it definitely >> wasn't without the --link option) but running the executable on a >> Windows 10 machine with no Perl installed produced exactly the same >> error. >> >> It seems to me that e88b1fb1.xs.dll is some kind of dynamic file which >> gets created if Perl is installed but not if there is no Perl.
> > No, it's not a dynamic file, it's actually one of the files that you see with > > unzip -l your.exe > > but extracted into the cache area with a different name (it's the CRC32 checksum > of the original file's contents). My guess would be .../Tk/PNG/PNG.xs.dll > (verify by comparing the output of md5sum or sha1sum for the two files). > > Anyway, look up the DLLs that this file is actually linked with, e.g. > > objdump -ax C:\Users\NTHOMP~1\AppData\Local\Temp\par-6e74686f6d70736f6e\cache-a689a490f84fa6e443fb002bba992a32a268b542\e88b1fb1.xs.dll | perl -ne 'print if /DLL > Name/' > > Most likely it's not only linked with some libpng*, but also some libz*. > Add another --link option for that, rinse and repeat. > > Cheers, Roderich > > > > > > > > >
-- James P. Rushworth Senior Support Analyst Divestco Geomatics P: 587-952-8168 www.divestco.com C: 403-370-0519 300, 520 - 3 Avenue SW F: 587-952-8372 Calgary, AB T2P 0R3 This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential or privileged information. Any use of this e-mail by any other person is prohibited. If you have received this e-mail in error, please contact the sender. We honour similar requests relating to the privacy of email communications.
Download (untitled) / with headers
text/plain 1.5k
On 2017-02-07 12:57:02, JRushworth@divestco.com wrote: Show quoted text
> C:\Users\james\AppData\Local\Temp\par-6a616d6573\cache-
> c1546264452e74db829440ed61c603745f7769ed>objdump
> -ax e88b1fb1.xs.dll | perl -ne "print if /DLL Name/" > DLL Name: msvcrt.dll > DLL Name: libpng16-16__.dll > DLL Name: KERNEL32.dll > DLL Name: perl524.dll
OK, so PNG.xs.dll only links with libpng16-16__.dll, but try the same command on libpng16-16__.dll and you'll see that it's linked with some libz*.dll (which should be added by a --link option). Show quoted text
> The original error message tells us that it can't find e88b1fb1.xs.dll > but the same file is in the executable called PNG.xs.dll. Why is it > able > to find the file if Strawberry Perl is installed on the machine but > not > if it isn't. One of the things I tried is installing Strawberry Perl > on > the machine immediately after getting the error message and starting a > new command prompt with Strawberry Perl in the path and having the > executable run with no error.
The actual error message from Perl is rather misleading. Perl's DynaLoader wants to load the "glue" DLL for Tk::PNG, but it fails because the Windows DLL loader can't find a library that it is directly or indirectly linked with. If the machine you run the executbale on has Strawberry installed, then it *has* the libraries (and the Strawberry installation makes sure that their location is added to the PATH environment variable). If Strawberry isn't installed and the libraries haven't been packed in either, then you'll see the error message. Cheers, Roderich
Subject: Re: [rt.cpan.org #120131] PAR::Packer DynaLoader Problem On Strawberry Perl 5.24.1
Date: Tue, 7 Feb 2017 12:17:51 -0700
To: <bug-PAR-Packer [...] rt.cpan.org>
From: "James P. Rushworth" <JRushworth [...] divestco.com>
Download (untitled) / with headers
text/plain 2.4k
Roderich, That worked. I also linked zlib1__.dll and the program ran with no errors. Now I just need to track down the required link commands for the other three modules I need for my program to run and I'll be good to go. You really know your stuff. Thanks. ttfn jr Roderich Schupp via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=120131 > > > On 2017-02-07 12:57:02, JRushworth@divestco.com wrote: >
>> C:\Users\james\AppData\Local\Temp\par-6a616d6573\cache-
>> c1546264452e74db829440ed61c603745f7769ed>objdump
>> -ax e88b1fb1.xs.dll | perl -ne "print if /DLL Name/" >> DLL Name: msvcrt.dll >> DLL Name: libpng16-16__.dll >> DLL Name: KERNEL32.dll >> DLL Name: perl524.dll
> > OK, so PNG.xs.dll only links with libpng16-16__.dll, but try the same > command on libpng16-16__.dll and you'll see that it's linked with some libz*.dll > (which should be added by a --link option). >
>> The original error message tells us that it can't find e88b1fb1.xs.dll >> but the same file is in the executable called PNG.xs.dll. Why is it >> able >> to find the file if Strawberry Perl is installed on the machine but >> not >> if it isn't. One of the things I tried is installing Strawberry Perl >> on >> the machine immediately after getting the error message and starting a >> new command prompt with Strawberry Perl in the path and having the >> executable run with no error.
> > The actual error message from Perl is rather misleading. Perl's DynaLoader > wants to load the "glue" DLL for Tk::PNG, but it fails because the > Windows DLL loader can't find a library that it is directly or indirectly > linked with. If the machine you run the executbale on has Strawberry installed, > then it *has* the libraries (and the Strawberry installation makes sure that > their location is added to the PATH environment variable). If Strawberry isn't > installed and the libraries haven't been packed in either, then you'll > see the error message. > > Cheers, Roderich >
-- James P. Rushworth Senior Support Analyst Divestco Geomatics P: 587-952-8168 www.divestco.com C: 403-370-0519 300, 520 - 3 Avenue SW F: 587-952-8372 Calgary, AB T2P 0R3 This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential or privileged information. Any use of this e-mail by any other person is prohibited. If you have received this e-mail in error, please contact the sender. We honour similar requests relating to the privacy of email communications.
Download (untitled) / with headers
text/plain 2.3k
Dependency Walker is an alternate means of finding the required dlls. It lists the full tree, so is particularly when there are large numbers of them. http://www.dependencywalker.com/ Shawn. On Tue Feb 07 14:18:13 2017, JRushworth@divestco.com wrote: Show quoted text
> Roderich, > > That worked. I also linked zlib1__.dll and the program ran with no > errors. Now I just need to track down the required link commands for > the > other three modules I need for my program to run and I'll be good to > go. > > You really know your stuff. > > Thanks. > > ttfn > > jr > > Roderich Schupp via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=120131 > > > > > On 2017-02-07 12:57:02, JRushworth@divestco.com wrote: > >
> >> C:\Users\james\AppData\Local\Temp\par-6a616d6573\cache-
> >> c1546264452e74db829440ed61c603745f7769ed> objdump
> >> -ax e88b1fb1.xs.dll | perl -ne "print if /DLL Name/" > >> DLL Name: msvcrt.dll > >> DLL Name: libpng16-16__.dll > >> DLL Name: KERNEL32.dll > >> DLL Name: perl524.dll
> > > > OK, so PNG.xs.dll only links with libpng16-16__.dll, but try the same > > command on libpng16-16__.dll and you'll see that it's linked with > > some libz*.dll > > (which should be added by a --link option). > >
> >> The original error message tells us that it can't find > >> e88b1fb1.xs.dll > >> but the same file is in the executable called PNG.xs.dll. Why is it > >> able > >> to find the file if Strawberry Perl is installed on the machine but > >> not > >> if it isn't. One of the things I tried is installing Strawberry Perl > >> on > >> the machine immediately after getting the error message and starting > >> a > >> new command prompt with Strawberry Perl in the path and having the > >> executable run with no error.
> > > > The actual error message from Perl is rather misleading. Perl's > > DynaLoader > > wants to load the "glue" DLL for Tk::PNG, but it fails because the > > Windows DLL loader can't find a library that it is directly or > > indirectly > > linked with. If the machine you run the executbale on has Strawberry > > installed, > > then it *has* the libraries (and the Strawberry installation makes > > sure that > > their location is added to the PATH environment variable). If > > Strawberry isn't > > installed and the libraries haven't been packed in either, then > > you'll > > see the error message. > > > > Cheers, Roderich > >
Subject: Re: [rt.cpan.org #120131] PAR::Packer DynaLoader Problem On Strawberry Perl 5.24.1
Date: Tue, 7 Feb 2017 13:49:50 -0700
To: <bug-PAR-Packer [...] rt.cpan.org>
From: "James P. Rushworth" <JRushworth [...] divestco.com>
Download (untitled) / with headers
text/plain 3.1k
Shawn, So far I've been able to get by test script to compile with only four --link options which is not bad. Once I get my real program running I'll give your suggestion a try. Thanks. ttfn jr Shawn Laffan via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=120131 > > > Dependency Walker is an alternate means of finding the required dlls. It lists the full tree, so is particularly when there are large numbers of them. > > http://www.dependencywalker.com/ > > Shawn. > > > > On Tue Feb 07 14:18:13 2017, JRushworth@divestco.com wrote:
>> Roderich, >> >> That worked. I also linked zlib1__.dll and the program ran with no >> errors. Now I just need to track down the required link commands for >> the >> other three modules I need for my program to run and I'll be good to >> go. >> >> You really know your stuff. >> >> Thanks. >> >> ttfn >> >> jr >> >> Roderich Schupp via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=120131 > >>> >>> On 2017-02-07 12:57:02, JRushworth@divestco.com wrote: >>>
>>>> C:\Users\james\AppData\Local\Temp\par-6a616d6573\cache-
>>>> c1546264452e74db829440ed61c603745f7769ed> objdump
>>>> -ax e88b1fb1.xs.dll | perl -ne "print if /DLL Name/" >>>> DLL Name: msvcrt.dll >>>> DLL Name: libpng16-16__.dll >>>> DLL Name: KERNEL32.dll >>>> DLL Name: perl524.dll
>>> >>> OK, so PNG.xs.dll only links with libpng16-16__.dll, but try the same >>> command on libpng16-16__.dll and you'll see that it's linked with >>> some libz*.dll >>> (which should be added by a --link option). >>>
>>>> The original error message tells us that it can't find >>>> e88b1fb1.xs.dll >>>> but the same file is in the executable called PNG.xs.dll. Why is it >>>> able >>>> to find the file if Strawberry Perl is installed on the machine but >>>> not >>>> if it isn't. One of the things I tried is installing Strawberry Perl >>>> on >>>> the machine immediately after getting the error message and starting >>>> a >>>> new command prompt with Strawberry Perl in the path and having the >>>> executable run with no error.
>>> >>> The actual error message from Perl is rather misleading. Perl's >>> DynaLoader >>> wants to load the "glue" DLL for Tk::PNG, but it fails because the >>> Windows DLL loader can't find a library that it is directly or >>> indirectly >>> linked with. If the machine you run the executbale on has Strawberry >>> installed, >>> then it *has* the libraries (and the Strawberry installation makes >>> sure that >>> their location is added to the PATH environment variable). If >>> Strawberry isn't >>> installed and the libraries haven't been packed in either, then >>> you'll >>> see the error message. >>> >>> Cheers, Roderich >>>
> > > >
-- James P. Rushworth Senior Support Analyst Divestco Geomatics P: 587-952-8168 www.divestco.com C: 403-370-0519 300, 520 - 3 Avenue SW F: 587-952-8372 Calgary, AB T2P 0R3 This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential or privileged information. Any use of this e-mail by any other person is prohibited. If you have received this e-mail in error, please contact the sender. We honour similar requests relating to the privacy of email communications.


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.