Hello,
I am running Windows XP, perl 5.8.8, PAR-Packer-0.970
The -c seems to be broken, but the error message is misleading. In the
final analysis, Zip.pm is being handed a $name string with
"C:/perl/site/lib/sitecustomize.pl" errantly tacked onto the end of it,
for sub extractMember in Zip.pm, as I think I will show. I do not know
where pp is doing it.
I will take a guess here that if we can find out what is tacking
C:/perl/site/lib/sitecustomize.pl onto the said $name string and simply
remove it, the problem might be solved. At least, it is something that
can be looked at.
If you want to just take my word for it and skip reading the rest of
this, $name is getting
:C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/C:/perl/site/lib/:
instead of just
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/:
The colons are my own delimiters.
I am stuck here.
Help!
I will now go through the steps leading up to this conclusion.
C:\aaa>type hello.pl
print "hello";
C:\aaa>pp -c hello.pl
Set up gcc environment - 3.4.2 (mingw-special)
C:\aaa>a
mkdir
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-eb409523ffee57039b643a7075c659df97250efc/inc/lib/C:/
: Invalid argument at C:/perl/lib/Archive/Zip.pm line 659
C:\aaa>a
hello
When I tried to execute the "a.exe" the first time above I get the error
you saw. As you could also see, it works the second time I tried it.
We have seen the "Zip.pm line 659" before, wherein it was identified as
a c:\perl\site\lib\sitecustomize.pl problem. I ended it in a "1;" as
you can see below. It did not help.
C:\aaa>type c:\perl\site\lib\sitecustomize.pl
# empty sitecustomize.pl file
1;
See the end of the "mkdir" above?. It is trying to create a directory
that ends in a C:/. I think Zip.pm is getting an errant name. Here are
the pertinent lines of Zip.pm
---------------------paste pertinent lines Zip.pm
sub extractMember # Archive::Zip::Archive
{
my $self = shift;
my $member = shift;
$member = $self->memberNamed($member) unless ref($member);
return _error('member not found') unless $member;
my $originalSize = $member->compressedSize();
my $name = shift; # local FS name if given
my ( $volumeName, $dirName, $fileName );
if ( defined($name) )
{
( $volumeName, $dirName, $fileName ) = File::Spec->splitpath($name);
$dirName = File::Spec->catpath( $volumeName, $dirName, '' );
}
else
{
$name = $member->fileName();
( $dirName = $name ) =~ s{[^/]*$}{};
$dirName = Archive::Zip::_asLocalName($dirName);
$name = Archive::Zip::_asLocalName($name);
}
if ( $dirName && !-d $dirName )
{
mkpath($dirName);
return _ioError("can't create dir $dirName") if ( !-d $dirName );
}
---------------------end paste pertinent lines Zip.pm
I put in the print statements you see in the next paste
------------------- with prints
sub extractMember # Archive::Zip::Archive
{
my $self = shift;
my $member = shift;
$member = $self->memberNamed($member) unless ref($member);
return _error('member not found') unless $member;
my $originalSize = $member->compressedSize();
my $name = shift; # local FS name if given
my ( $volumeName, $dirName, $fileName );
if ( defined($name) )
{
( $volumeName, $dirName, $fileName ) = File::Spec->splitpath($name);
print "xxxxx 10: $name\n";
print "\t volumeName :$volumeName:\n";
print "\t dirName :$dirName:\n";
print "\t filename :$fileName:\n";
$dirName = File::Spec->catpath( $volumeName, $dirName, '' );
print "xxxxx 20 NEW dirName :$dirName:\n";
}
else
{
$name = $member->fileName();
( $dirName = $name ) =~ s{[^/]*$}{};
$dirName = Archive::Zip::_asLocalName($dirName);
$name = Archive::Zip::_asLocalName($name);
}
if ( $dirName && !-d $dirName )
{
mkpath($dirName);
return _ioError("can't create dir $dirName") if ( !-d $dirName );
}
------------------end with prints
The results are pasted below. pp seems to be handing Zip.pm the wrong
$name.
-------------paste results
C:\aaa>type hello.pl
print "hello";
C:\aaa>pp -c hello.pl
Set up gcc environment - 3.4.2 (mingw-special)
C:\aaa>a
xxxxx 10:
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/
volumeName :C::
dirName
:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/:
filename ::
xxxxx 20 NEW dirName
:C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/:
xxxxx 10:
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/script/
volumeName :C::
dirName
:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/script/:
filename ::
xxxxx 20 NEW dirName
:C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/script/:
xxxxx 10:
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/MANIFEST
volumeName :C::
dirName
:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/:
filename :MANIFEST:
xxxxx 20 NEW dirName
:C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/:
xxxxx 10:
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/META.yml
volumeName :C::
dirName
:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/:
filename :META.yml:
xxxxx 20 NEW dirName
:C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/:
xxxxx 10:
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/C:/perl/site/lib/sitecustomize.pl
volumeName :C::
dirName
:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/C:/perl/site/lib/:
filename :sitecustomize.pl:
xxxxx 20 NEW dirName
:C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/C:/perl/site/lib/:
mkdir
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-20cdca3b1fe0fc74b67b03c64a8fa85e3278ad89/inc/lib/C:/:
Invalid argument at C:/perl/lib/Archive/Zip.pm line 665
C:\aaa>
---------------end paste results
BTW: The mkdir errror reporting must be character length limited, as it
is stopping at "C:/" instead of "C:/perl/site/lib/".
I am stuck here.
Anyone?
Thanks