Tue Mar 09 01:38:21 2010: Request 42986 was acted upon.
Transaction: Correspondence added by TJC
       Queue: PAR
     Subject: PAR-based modules use system XS modules over included modules (on
 Perl 5.10.0)
   Broken in: 0.984
    Severity: Important
       Owner: Nobody
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=42986 >


On Sun Feb 14 12:44:51 2010, RSCHUPP wrote:
> On Sat Feb 13 03:37:38 2010, TJC wrote:
> > > This is Perl 5.10.0, right?
> > 
> > Correct.
> 
> I finally remembered what's going on :(
> 
> PAR::Heavy interposes the loading of shared libraries
> by tricking DynaLoader into always calling DynaLoader::dl_expandspec
> (which PAR::Heavy has sneakily replaced by its own version).
> DynaLoader usually first tries to locate the shared library
> by explicity checking along @INC; only if this fails it
> will call dl_expandspec.)
> Unfortunately this trick (setting $DynaLoader::do_expand = 1)
> doesn't work in Perl 5.10.0 (look into DynaLoader.pm, $do_expand
> is defined, but nowhere used). It works in all versions before
> and after. 
> 
> So this explains what you see: the .pm part of a XS based module
> is correctly resolved from the packed executable, but the
> corresponding shared library is resolved from the target system.
> If the two happen to be of different versions, Perl aborts.
> 
> Looking at the versions of DynaLoader.pm in Perl 5.10.0 and
> 5.10.1 (on Linux) I think that you may savely replace the
> former with the latter. If you do that remember to rebuild PAR::Packer 
> afterwards so that packed executables will have the "fixed" 
> DynaLoader.pm embedded.


Thanks for your help on this.

Rather than backport Dynaloader to 5.10.0, I ended up making my own 
installation of 5.10.1 + modules; I was considering using it to build 
PARs but then decided to ship the entire tree with the application. It 
blows the size out quite a bit, but it's a lot simpler than trying to 
get Module::ScanDeps to locate everything.

Cheers,
Toby

Reply via email to