wilsond has asked for the wisdom of the Perl Monks concerning the following question:
Edited Goal, again: I want to have what Strawberry Perl's portable install does, but for Linux. And after that, for Mac OS X.
Edited Goal: I want to package a portable perl with my app without needing to have a seperate build for every Linux distro.
Goal: I want to provide a portable perl binary for Linux.
I know 99.99999% of all distros have perl pre-installed, but I need a specific version (not due to the perl code itself) and need to specifically not rely (and specifically not use) any local installed perl, modules, shared libraries, etc (or at least as much as possible).
I built a custom C app that embeds perl and adjusts some important details (sets @INC, loads/runs a bootstrap perl module, etc). This will then run separate perl files stored in specific locations on the local system.
If I can get away with not embedding perl into a custom C wrapper (that's what the C code really is) at all and just using the perl binary as supplied by Debian or otherwise, I'd be happy with it.
This app will run for the entire time the machine is on. It will only be restarted on upgrade of the app and when the machine is rebooted. I will take care of the startup separately on a per-distro-method basis. It will also run on Windows >= 2000 and Mac OS X >= 10.4, but I don't need to worry about them with this.
I really wanted a statically linked perl, but it seems to be a bad idea (XS, etc problems). I'm okay with distributing some .so files as needed (and stored in a dir along with the app itself).
Example problem I'm having going the "usual" way: I compile my C + embedded perl on a Debian Lenny x86-64 box. I copy it over to my Fedora 11 x86-64 box. It fails to load libperl.so.5.10. I would like to supply this .so so it will succeed.
I really don't want to compile this on every Linux distro and version. I'm already prepared to compile once for each separate architecture (x86 and x86-64 right now, probably PPC and ARM later).
I've heard about the LD_LIBRARY_PATH ENV variable, which I assume I will have to use for this to work correctly. I can not make system-wide modifications to any config files or install any .so files (or anything else). It is important that this app is as stand-alone as possible, does not rely on the local system, does not use the libraries, modules, etc of the local system, and does not modify the local system.
Environment Embedding Executable seems that it would be great for the packaging part.
I need wisdom. Thanks in advance for whatever you can offer.
I'm a Linux user. You wouldn't know it since I mostly ask Windows questions. Whee. |
If you want to do evil, science provides the most powerful weapons to do evil; but equally, if you want to do good, science puts into your hands the most powerful tools to do so. |
- Richard Dawkins |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Portable Perl?
by eyepopslikeamosquito (Archbishop) on May 24, 2009 at 10:18 UTC | |
by Anonymous Monk on May 24, 2009 at 11:03 UTC | |
Re: Portable Perl?
by CountZero (Bishop) on May 24, 2009 at 11:25 UTC | |
by wilsond (Scribe) on May 24, 2009 at 15:13 UTC | |
Re: Portable Perl?
by revdiablo (Prior) on May 24, 2009 at 17:12 UTC | |
by wilsond (Scribe) on May 24, 2009 at 21:00 UTC |