Hi list,
after some discussion with Roderich, I dove into the PAR::Packer sources
and changed some rather integral parts. Here's what happened:
- We had lots of bugs due to XS modules being built into 'parl' being
insufficient for the packaged code (Scalar::Util::refaddr()) or
incompatible with the packaged XS modules.
Note: Distinguish between the a) system PAR was built on, b) system pp
is used on and c) system the resulting binary is used on.
- A possible solution is to use the modules found on the packaging
system (b) instead of what was built into parl on system a).
- That either requires rebuilding parl for every call to pp on b) (bad
because b) might lack the required tools) or using a stripped down parl.
- A stripped down parl wouldn't work as a standalone PAR loader. ==>
parl can't be modified.
- Solution:
--> Leave parl as it is and embed a stripped down version into a pure
data module (PAR::StrippedPAR::Static and PAR::StrippedPAR::Dynamic
respectively) which is created at PAR build time.
--> Extract that parl-without-embedded-modules for each pp call and use
it for packaging binary executables.
The reason I chose to embed the stripped parl into a module over adding
another (two: static & dynamic) executable files to scripts/ was that
the latter approach might have caused confusion when "strippedparl" or
so wouldn't work as advertised.
I'm going to commit these changes to SVN now. I strongly urge all of you
to test these changes thoroughly. They're somewhat extensive and I would
hate if the blew up in my face when I make the 0.958 release.
You can get the latest SVN with this command:
svn checkout http://svn.openfoundry.org/par/trunk
Cheers,
Steffen