Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[rt.cpan.org #130685] core module detection doesn't work with -Duserelocatableinc

4 views
Skip to first unread message

Frank Lichtenheld via RT

unread,
Oct 10, 2019, 4:45:03 AM10/10/19
to p...@perl.org
Thu Oct 10 04:37:24 2019: Request 130685 was acted upon.
Transaction: Ticket created by Frank.Li...@Sophos.com
Queue: PAR-Packer
Subject: core module detection doesn't work with -Duserelocatableinc
Broken in: 1.049
Severity: Important
Owner: Nobody
Requestors: Frank.Li...@Sophos.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=130685 >


Hi.

If perl was compiled with -Duserelocatableinc then privlib and archlib are relative paths starting with ... which is the directory of the Perl executable. This breaks the detection of core modules.

The following patch fixed the issue for me:

diff --git a/lib/PAR/Packer.pm b/lib/PAR/Packer.pm
index 74e1414..903d61e 100644
--- a/lib/PAR/Packer.pm
+++ b/lib/PAR/Packer.pm
@@ -823,6 +823,15 @@ sub pack_manifest_hash {

(my $privlib = $Config{privlib}) =~ s{\\}{/}g;
(my $archlib = $Config{archlib}) =~ s{\\}{/}g;
+ if($Config{userelocatableinc}){
+ my $perldir = dirname($^X);
+ $privlib =~ s/^\.\.\./$perldir/;
+ $privlib = abs_path($privlib);
+ $self->_vprint(2, "relocatable privlib at $privlib");
+ $archlib =~ s/^\.\.\./$perldir/;
+ $archlib = abs_path($archlib);
+ $self->_vprint(2, "relocatable archlib at $archlib");
+ }
foreach my $pfile (sort grep length $map{$_}, keys %map) {
next if !$opt->{B} and (
($map{$pfile} eq "$privlib/$pfile") or


Regards,
Frank

Roderich Schupp via RT

unread,
Oct 11, 2019, 6:00:03 PM10/11/19
to p...@perl.org
Fri Oct 11 17:51:58 2019: Request 130685 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: core module detection doesn't work with -Duserelocatableinc
Broken in: 1.049
Severity: Important
Owner: Nobody
Requestors: Frank.Li...@Sophos.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=130685 >


On 2019-10-10 04:37:24, Frank.Li...@Sophos.com wrote:
> The following patch fixed the issue for me:

Applied (after slight modification), thanx!

Cheers, Roderich
0 new messages