Re: [rt.cpan.org #119224] Issue about Can't locate loadable object for module

"Andrey via RT" <[email protected]>
Newsgroups gmane.comp.lang.perl.par
Message-ID <[email protected]>
Wed Dec 14 12:43:49 2016: Request 119224 was acted upon.
Transaction: Correspondence added by [email protected]
       Queue: PAR
     Subject: Re: [rt.cpan.org #119224] Issue about Can't locate loadable object for module
   Broken in: 1.013
    Severity: (no value)
       Owner: RSCHUPP
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119224 >


> Thank you both for testing the fix!

No problem.
The fix came right in time!
I was really desperate and looking for other packagers for perl.


> I'm going to release a fixed PAR over the weekend.

Great news, thank you so much!


> But I'm still puzzled about the fact that PAR::Packer's self test passes
> (which packs and runs a variety of simple scripts), but the "hello world"
> example bombs out for you (but not on my test systems).
> So that we're all on the same page here:
> Did you *run* the "hello world" executable on the *same* machine
> where you generated it (with pp)?

No, I ran it on a different clean machine.
I guess, it worked fine on the build machine because it loaded everything from system-wide perl.

The simplest way to get a clean environment for me is to setup a minimalistic chroot:
mkdir -p chroot/{dev,tmp,lib64}
mount --rbind /dev chroot/dev
mount --bind /lib64 chroot/lib64
mount --bind -o ro,remount /lib64 chroot/lib64 # yes, a separate remount is needed with util-linux < 2.27
cp hello.exe chroot/
chroot ./chroot /hello.exe

It has a downside of running hello.exe as root though.

Not sure, how to plug this in Packer's self-tests though.
An LD_PRELOAD library that hides system-wide perl might work.

-- 
Andrey.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.