Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: Jo.Kilian [...] gmx.de
Cc:
AdminCc:

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



Subject: Unpacking exe: File exists
Date: Mon, 21 Dec 2015 11:02:22 +0100
To: bug-PAR-Packer [...] rt.cpan.org
From: "Johannes Kilian" <Jo.Kilian [...] gmx.de>
Hi
 
I'm currently running Strawberry-Perl 5.20. on Win7.
 
Module Versions:
pp.pm 0.992
par.pm 1.010
par/packer.pm 1.028
module/scandeps 1.20
 
I created an executable file via pp. Starting the generated exe, extraction process fails due to following error:
----
mkdir C:\Users\xxx\AppData\Local\Temp\par-6a6f6b\cache-aeb8a68d1c04faef43fa99b77761cb02d7ebc0df\inc\lib\version\: File exists; Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist at D:/Usr/programme/Strawberry/perl/site/lib/Archive/Zip/Archive.pm line 198.
 
Roughly translated: A file cannot be created if it already exists.
----
 
Looking into the cache-folder shows that there is a file named "version". Probably a folder named "version" should be created by extraction process - but fails due to existance of identical named file.
 
How to overcome this problem?
 
Cheers and merry christmas
Johannes
On 2015-12-21 05:02:32, Jo.Kilian@gmx.de wrote: Show quoted text
> 198. Roughly translated: A file cannot be created if it already > exists.---- > Looking into the cache-folder shows that there is a file named > "version". > Probably a folder named "version" should be created by extraction > process - but > fails due to existance of identical named file. How to overcome this > problem?
Probably caused by a file and a directory with the same name ignoring case differences. Please post the table of contents of your packed executable, i.e. the output of unzip -l your.exe Cheers, Roderich
Subject: [rt.cpan.org #110480]
Date: Mon, 21 Dec 2015 13:38:20 +0100
To: bug-PAR-Packer [...] rt.cpan.org
From: "Johannes Kilian" <Jo.Kilian [...] gmx.de>
Hi Roderich,
 
you are probably correct: duplicate usage of a name (in my case file named "version" and a folder named "version") - I have no idea where this comes from and how to avoid it ...
 
---- Output: -----
$ unzip -l MyExe.exe | grep version     35840      0      0  21.02.15 18:45   lib/auto/version/vxs/vxs.xs.dll         6      0      0  27.12.14 11:49   lib/unicore/version         6      0      0  27.12.14 11:49   lib/version      3213      0      0  21.12.15 10:41   lib/version.pm      4127      0      0  21.12.15 10:41   lib/version/regex.pm     22853      0      0  21.12.15 10:41   lib/version/vpp.pm       527      0      0  21.12.15 10:41   lib/version/vxs.pm
 
Subject: [rt.cpan.org #110480].
Date: Mon, 21 Dec 2015 13:40:13 +0100
To: bug-PAR-Packer [...] rt.cpan.org
From: "Johannes Kilian" <Jo.Kilian [...] gmx.de>
Sorry for mis-format: - here it comes again $ unzip -l MyExe.exe | grep version 35840 0 0 21.02.15 18:45 lib/auto/version/vxs/vxs.xs.dll 6 0 0 27.12.14 11:49 lib/unicore/version 6 0 0 27.12.14 11:49 lib/version 3213 0 0 21.12.15 10:41 lib/version.pm 4127 0 0 21.12.15 10:41 lib/version/regex.pm 22853 0 0 21.12.15 10:41 lib/version/vpp.pm 527 0 0 21.12.15 10:41 lib/version/vxs.pm
On 2015-12-21 07:40:26, Jo.Kilian@gmx.de wrote: Show quoted text
> 6 0 0 27.12.14 11:49 lib/version
That's the culprit. Packing your executable with "pp -vv ..." might give a clue where it is coming from. Did you use any -a or -A options for pp? Since lib/version has the same timestamp and size as lib/unicore/version, my guess is that it's a stray copy of the latter, i.e do you have a file <Strawberry install path>/perl/lib/version? Cheers, Roderich
Subject: [rt.cpan.org #110480]
Date: Wed, 23 Dec 2015 07:33:18 +0100
To: bug-PAR-Packer [...] rt.cpan.org
From: "Johannes Kilian" <Jo.Kilian [...] gmx.de>
Hi Roderich, indeed you are right: I used the following -a option: ---- -a Unicode::UCD ---- Omitting this entry, pp packs everything as expected. I added this to overcome the following problem when starting the generated exe: ---- Can't locate utf8_heavy.pl in @INC ... ---- Any hint how to include utf8_heavy.pl? Cheers and Merry Christmas Johannes
On 2015-12-23 01:33:29, Jo.Kilian@gmx.de wrote: Show quoted text
> indeed you are right: I used the following -a option: > ---- > -a Unicode::UCD > ---- > > Omitting this entry, pp packs everything as expected. I added this to > overcome the following problem when starting the generated exe: > ---- > Can't locate utf8_heavy.pl in @INC ... > ---- > > Any hint how to include utf8_heavy.pl?
There will be an option -u (or --unicode) to pp in the next release of PAR::Packer that essentially will do just that. Or you could try to pack with "pp -x ...". BTW, what's the full pp command line that you used? But I don't see why "-a Unicode::UCD" would pack a file "lib/version" into your executable. Please try to pack with "pp -vv ..." and check its output where it gets lib/version from. Cheers, Roderich
Subject: [rt.cpan.org #110480]
Date: Thu, 7 Jan 2016 10:44:05 +0100
To: bug-PAR-Packer [...] rt.cpan.org
From: "Johannes Kilian" <Jo.Kilian [...] gmx.de>
Hi Roderick,
Best wishes for the new year. Sorry for the delay - was on vacation ;-)
I used the following command line:
---- pp --add=Win32::AbsPath --add=Params::Validate::XS --add=Log::Log4perl::Filter::LevelRange --add=Log::Log4perl::Appender::File --add=Log::Dispatch::Screen --add=Time::Localtime --add=XML::Twig --add=Tie::IxHash --add=deprecate --add=Class::Load::XS --add=Socket --add=Pod::Text --add=List::MoreUtils::PP --add=XML::Xpath --lib=..\..\lib --link=libexpat-1_.dll --link=libxml2-2_.dll --link=libiconv-2_.dll --link=libz_.dll --link=libmysql_.dll --link=C:\Perl\Perl\lib\auto\socket\Socket.dll --output=ProvideRequests.exe -vv ProvideRequests.pl ----
 
This leads to an exe with the 'Can't locate utf8_heavy.pl' when executing.
 
I introduced '--add=Unicode::UCD' to compilation, hoping to overcome the problem above. But this led to the described problem with packing a file "lib/version" into the executable. I also have no guess, why this happens ...
I filtered the output after using -vv option for "lib/version": ------ # Use of runtime loader module Module::Implementation detected.  Results of static scanning may be incomplete. # Use of runtime loader module Module::Runtime detected.  Results of static scanning may be incomplete. D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/utf8_heavy.pl as lib/utf8_heavy.pl D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/unicore/version as lib/version D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version.pm as lib/version.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version/regex.pm as lib/version/regex.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version/vpp.pm as lib/version/vpp.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version/vxs.pm as lib/version/vxs.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/unicore/version as lib/version D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version/regex.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version/vpp.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version/vxs.pm ------
Adding the '-x' option (without '--add=Unicode::UCD'), shows that the compilation process misses some of my modules during compilation - so the exe was incomplete. Those modules have been missing indeed.
Providing those modules and recompiling again, the compilation was successful and the generated exe worked fine.
 
So everything is fine for me now! Thank you very much for your patience and your helpful hints!
 
BTW: When will -u Option be available? (Since the missing utf8_heavy.pl seems to hide the real problem of my missing modules, the -u option might have been useful to locate the problems more easily)
 
Cheers
Johannes
 
 
 
Subject: [rt.cpan.org #110480]
Date: Thu, 7 Jan 2016 10:49:30 +0100
To: bug-PAR-Packer [...] rt.cpan.org
From: "Johannes Kilian" <Jo.Kilian [...] gmx.de>
Sorry for sending in HTML again .. ---------------------------   Hi Roderick, Best wishes for the new year. Sorry for the delay - was on vacation ;-) I used the following command line: ---- pp --add=Win32::AbsPath --add=Params::Validate::XS --add=Log::Log4perl::Filter::LevelRange --add=Log::Log4perl::Appender::File --add=Log::Dispatch::Screen --add=Time::Localtime --add=XML::Twig --add=Tie::IxHash --add=deprecate --add=Class::Load::XS --add=Socket --add=Pod::Text --add=List::MoreUtils::PP --add=XML::Xpath --lib=..\..\lib --link=libexpat-1_.dll --link=libxml2-2_.dll --link=libiconv-2_.dll --link=libz_.dll --link=libmysql_.dll --link=C:\Perl\Perl\lib\auto\socket\Socket.dll --output=ProvideRequests.exe -vv ProvideRequests.pl ----   This leads to an exe with the 'Can't locate utf8_heavy.pl' when executing.   I introduced '--add=Unicode::UCD' to compilation, hoping to overcome the problem above. But this led to the described problem with packing a file "lib/version" into the executable. I also have no guess, why this happens ... I filtered the output after using -vv option for "lib/version": ------ # Use of runtime loader module Module::Implementation detected.  Results of static scanning may be incomplete. # Use of runtime loader module Module::Runtime detected.  Results of static scanning may be incomplete. D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/utf8_heavy.pl as lib/utf8_heavy.pl D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/unicore/version as lib/version D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version.pm as lib/version.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version/regex.pm as lib/version/regex.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version/vpp.pm as lib/version/vpp.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/version/vxs.pm as lib/version/vxs.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding D:/Usr/programme/Strawberry/perl/lib/unicore/version as lib/version D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version/regex.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version/vpp.pm D:\Usr\programme\Strawberry\perl\site\bin/pp: ... adding <string> as lib/version/vxs.pm ------ Adding the '-x' option (without '--add=Unicode::UCD'), shows that the compilation process misses some of my modules during compilation - so the exe was incomplete. Those modules have been missing indeed. Providing those modules and recompiling again, the compilation was successful and the generated exe worked fine.   So everything is fine for me now! Thank you very much for your patience and your helpful hints!   BTW: When will -u Option be available? (Since the missing utf8_heavy.pl seems to hide the real problem of my missing modules, the -u option might have been useful to locate the problems more easily)   Cheers Johannes      
On 2016-01-07 04:49:47, Jo.Kilian@gmx.de wrote: Show quoted text
> Best wishes for the new year. Sorry for the delay - was on vacation ;-
Best wishes to you, too. Show quoted text
> I filtered the output after using -vv option for "lib/version": > ------ > D:/Usr/programme/Strawberry/perl/lib/unicore/version as lib/version
As I suspected: lib/version is a copy of lib/unicore/version, though I still have no clue why it is packed. This file is not Perl code, hence it can't have been "require"d or "use"d. Neither is a file "version" explicitly added via a rule in Module::ScanDeps. The only reason why it is packed at all is a rule that says "include all files below .../unicore (where the latter is located via @INC)". But that can only account for files named "lib/unicore/..." in the exe... Are there any other unicore files duplicated in the exe, e.g. lib/unicore/NamedSequences.txt is also packed as lib/NamedSequences.txt? Anyway, some remarks about your command line: Show quoted text
> I used the following command line: > ---- > pp --add=Win32::AbsPath > --add=Params::Validate::XS
Shouldn't be necessary, "use Params::Valdidate;" includes that automatically. Show quoted text
> --add=Log::Log4perl::Filter::LevelRange > --add=Log::Log4perl::Appender::File > --add=Log::Dispatch::Screen
Shouldn't be necessary, "use Log::Log4perl;" includes them automatically. Show quoted text
> --add=List::MoreUtils::PP
Arggh, another one of those stupid "we have both PP _and_ XS modules". I'll add a rule to Module::ScanDeps. Show quoted text
> --link=C:\Perl\Perl\lib\auto\socket\Socket.dll
That seems totally wrong for several reasons: - it's not in you Perl installation path (as shown in other messages) - it has the wrong name, "glue" DLLs on Strawberry Perl for Windows are named *.xs.dll not just plain *.dll Show quoted text
> Adding the '-x' option (without '--add=Unicode::UCD'), shows that the > compilation process misses some of my modules during compilation - so > the exe was incomplete. Those modules have been missing indeed. > Providing those modules and recompiling again, the compilation was > successful and the generated exe worked fine.
If -x works for you, there's not need to go back and add stuff manually. Show quoted text
> BTW: When will -u Option be available?
Will be in the next release of PAR::Packer. Cheers, Roderich
Subject: [rt.cpan.org #110480]
Date: Fri, 8 Jan 2016 07:01:18 +0100
To: bug-PAR-Packer [...] rt.cpan.org
From: "Johannes Kilian" <Jo.Kilian [...] gmx.de>
Hi Roderick, There are no more unicore files duplicated at the wrong location:   ... adding D:/Usr/programme/Strawberry/perl/lib/unicore/NamedSequences.txt as lib/unicore/NamedSequences.txt  (and not as lib/NamedSequences.txt) adding D:/Usr/programme/Strawberry/perl/lib/unicore/SpecialCasing.txt as lib/unicore/SpecialCasing.txt ....   ------------- about your suggestions:   * ommitting "--add=Win32::AbsPath": you're correct. Executable works without explicitly adding this * ommitting "--add=Params::Validate::XS": you're correct. Executable works without explicitly adding this * ommitting "--link=C:\Perl\Perl\lib\auto\socket\Socket.dll": you're correct. Executable works without explicitly adding this (this file doesn't even exist anymore - as you suspected) * omitting "--add Log::Log4perl::Filter::LevelRange > --add=Log::Log4perl::Appender::File > --add=Log::Dispatch::Screen": you're correct. Executable works without explicitly adding this   All those things I added a long time ago - and never checked it again, as the produced exe always worked fine ... ;-) Thanks for your hints   Cheers Johannes
I finally found an explanation for the strange "lib/version" file in your packed executable - you probably packed with "-M utf8_heavy.pl". See #111455 (unable to use -x and -u with pp) for details, will be fixed in the next release. Cheers, Roderich