Skip Menu |

This queue is for tickets about the Portable CPAN distribution.

Report information
The Basics
Id: 68937
Status: resolved
Priority: 0/
Queue: Portable

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

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



Subject: $Config{libpth} not correctly transformed (?)
With Strawberry Perl 5.12.3.0 Portable extracted in C:\cygwin\tmp\strawberry-perl-5.12.3.0-portable I get the following result when looking into the value of libpth: C:\>perl -V:libpth libpth='C:\cygwin\tmp\strawberry-perl-5.12.3.0-portable\c\lib'; Which seems to be missing the second entry in the original Config.pm C:\>perl -V:"libpth.*" libpth='C:\strawberry\c\lib C:\strawberry\c\i686-w64-mingw32\lib'; (using a regexp here is just a trick to circumvent the Portable.pm translations, it seems) Regards, Slaven
I found a workaround for my problem. It seems to be a combination of two issues: - portable.perl in the Strawberry Perl distribution specified only "c\lib", missing the 2nd entry - But Portable::Config cannot deal with multiple entries in libpth. See the attached patches for both issues. Note that I did not check whether there are other possible candidates which should be treated like libpth. Regards, Slaven
Subject: portable_perl.diff
--- portable.perl.orig 2011-06-19 22:47:22.375000000 +0200 +++ portable.perl 2011-06-19 22:50:17.281250000 +0200 @@ -59,7 +59,7 @@ lddlflags: '-mdll -s -L"$archlib\CORE" -L"$libpth"' ldflags: '-s -L"$archlib\CORE" -L"$libpth"' ldflags_nolargefiles: '-s -L"$archlib\CORE" -L"$libpth"' - libpth: c/lib + libpth: 'c/lib c/i686-w64-mingw32/lib' perlpath: perl/bin/perl.exe prefix: perl prefixexp: perl
Subject: Portable.diff
--- Portable/Config.pm.orig 2011-06-19 22:55:45.625000000 +0200 +++ Portable/Config.pm 2011-06-19 22:58:40.421875000 +0200 @@ -37,6 +37,16 @@ $self->{$key} = $conf->{$key}; next; } + if ($key eq 'libpth') { + my @paths = split / /, $conf->{$key}; + for my $path (@paths) { + $path = File::Spec->catdir( + $root, split /\//, $path, + ); + } + $self->{$key} = join ' ', @paths; + next; + } my $method = ($key eq 'perlpath') ? 'catfile' : 'catdir'; $self->{$key} = File::Spec->$method( $root, split /\//, $conf->{$key},
submitting a better (a little bit ugly) patch which seems to work

--
kmx

Subject: portable_libpth_ugly_hack.diff
diff -ru portable.orig\perl\vendor\lib\Portable\Config.pm portable.new\perl\vendor\lib\Portable\Config.pm --- portable.orig\perl\vendor\lib\Portable\Config.pm Wed Apr 13 02:20:12 2011 +++ portable.new\perl\vendor\lib\Portable\Config.pm Mon Oct 31 13:00:13 2011 @@ -32,7 +32,7 @@ and length $conf->{$key} and not - $key =~ /^ld/ + $key =~ /(^ld|^libpth$)/ ) { $self->{$key} = $conf->{$key}; next; @@ -42,7 +42,7 @@ $root, split /\//, $conf->{$key}, ); #join path to directory of portable perl with value from config file } - foreach my $key ( grep { /^ld/ } keys %$self ) { #linker config variables + foreach my $key ( grep { /(^ld|^libpth$)/ } keys %$self ) { #linker config variables next unless defined $self->{$key}; $self->{$key} =~ s/\$(\w+)/$self->{$1}/g; } diff -ru portable.orig\portable.perl portable.new\portable.perl --- portable.orig\portable.perl Sun Feb 06 21:19:30 2011 +++ portable.new\portable.perl Mon Oct 31 12:59:14 2011 @@ -56,10 +56,12 @@ installvendorman3dir: '' installvendorscript: 'perl/bin' ld: g++.exe - lddlflags: '-mdll -s -L"$archlib\CORE" -L"$libpth"' - ldflags: '-s -L"$archlib\CORE" -L"$libpth"' - ldflags_nolargefiles: '-s -L"$archlib\CORE" -L"$libpth"' - libpth: c/lib + lddlflags: '-mdll -s -L"$archlib\CORE" -L"$_workaround1"' + ldflags: '-s -L"$archlib\CORE" -L"$_workaround1"' + ldflags_nolargefiles: '-s -L"$archlib\CORE" -L"$_workaround1"' + _workaround1: c/lib + _workaround2: c/i686-w64-mingw32/lib + libpth: $_workaround1 $_workaround2 perlpath: perl/bin/perl.exe prefix: perl prefixexp: perl
Fix applied, released in Portable 1.15