Skip Menu |

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

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

People
Owner: RSCHUPP [...] cpan.org
Requestors: mjaix [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.024
Fixed in: 1.025



Subject: Fix for PAR-Packer 1.024 with a nonstandard libperl.so name
Having Perl built with a shared library named differently, PAR ceased to work properly. For some time, my resulting executable had not been static regarding libperl, and with PAR-Packer 1.024 (no test done with 1.023), even compilation did not work anymore. The root cause is that in myldr/Makefile.PL, in one place /\s+-lperl\s+/ gets blindly stripped off from ldflags, although some lines apart the libperl name is obeyed. Detected in 1.024 (present in earlier releases). Fixed in 1.025 almost at light speed :-); this entry is for record completeness. Successfully tested 1.025 on Linux and Solaris 10. [src/PAR-Packer-1.024/myldr] -> diff -c Makefile.PL* *** Makefile.PL Fri Nov 7 09:23:43 2014 --- Makefile.PL.mja_dynperlfix Fri Jan 23 11:12:46 2015 *************** *** 142,150 **** my $ldflags = "$lddebug$pldflags $perl58lib"; my $static_ldflags = $ldflags; - $static_ldflags =~ s/\s+-lperl\s+/ /g; - $boot_ldflags .= $static_ldflags; - my $libperl; if ($dynperl and $^O eq 'os2') { --- 142,147 ---- *************** *** 169,174 **** --- 166,182 ---- undef $dynperl if !-e $libperl; } + my $perllibshortname = 'perl'; + if ($dynperl) { + $perllibshortname = basename($libperl); + my $so = $Config{so} || 'so'; + $perllibshortname =~ s/^lib//; + $perllibshortname =~ s/\Q.$so\E$//; + } + $static_ldflags =~ s/\s+-l$perllibshortname\s+/ /g; + $boot_ldflags .= $static_ldflags; + + # In the $dynperl case, we've already found the $libperl DSO. # The only problem is: when the linker links $par_exe against $libperl # we don't know what name is used to refer to $libperl in the executable Show quoted text
---------------------------- end of context diff ---------------------------
Fixed in 1.025. Cheers, Roderich