michaelg has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks

I compiled an application using the PAR/PP moudle well this aplication run great on SOLARIS 2.8 OS , the problem is I dont want to compile it on every OS clients use .
1. I'm to lazy
2. It takes to much space
3. It is a pain to maintain
Is there a way to compile it to fit several OS ( or at list compile some of the code in that manner )

Thank you Monks
live long and prosper

Replies are listed 'Best First'.
Re: compile one version for Several OS
by audreyt (Hermit) on Dec 07, 2003 at 15:37 UTC
    It is possible to pack a single .par file that runs on multiple platforms, which may then be used with "parl" or "perl -MPAR=somefile.par". See this slide for how.

    I agree that cross-packaging (just like cross-compiling) is a neat idea. How about dropping by The PAR Homepage and add it to FAQ, and/or submit an enhancement ticket to bug-par@rt.cpan.org?

      Hi,

      Thanks for the tip , but I'm not sure that all the machine that will run this applicaton will have installation of PAR . When I use pp , I get stand alone executable that work on every OS of the same type without the need of external tools, I would like to mainteain this ability

      Thanks in Advance
      michaelg
        Actually, with "pp --perlscript" (aka "pp -P"), you will not need PAR installed on those machines -- they just need to have the correct version of Perl installed.

        It is not possible to produce a .exe file runnable on Win32, while at same time being a valid Linux binary, as you suggests. At least, I don't know how -- suggestions welcome.

Re: compile one version for Several OS
by PodMaster (Abbot) on Dec 07, 2003 at 10:59 UTC
    No. PAR is a packer (packager?). It does not "compile". Now theoretically this could be accomplished, but ...

    update: Not a bad idea. I imagine PAR-1.00 might being smart enough to seek out ppm package repositories, download all the neccessary bits to pack executables for as many platforms as possible. Now if we only had more ppm repositories....

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.