in reply to Re: Pre-position musing on "standalone executables"
in thread Pre-position musing on "standalone executables"

I agree, being able to capture and store the compiled bytecode would only be a part of the solution. Providing for run-time fix-up of calls to dynamic library routines is another. I can see how this could be done efficiently under Win32 (sorry to pollute your eye-space with that dirty word:), but my knowledge of unix-like systems is insufficient to contribute a solution for them. In the absence of that knowledge, I withheld my ideas.

Perhaps if you could provide some possibilities for runtime fixup for the Unix systems, and we could find someone with expertise of Mac systems, we could between us offer a complete solution to that part of the puzzle?


Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

Replies are listed 'Best First'.
Re: Pre-position musing on "standalone executables"
by Abigail-II (Bishop) on Nov 19, 2002 at 16:08 UTC
    There are more than a dozen Unix and Unix like systems, not counting the various versions between them. For each or them, Perl can be build in many different ways (a "smoke" is trying out more than 25 variations, and that's far from all the possibilities). Some builds are binary compatible, but most aren't.

    This is the reason why CPAN doesn't have a binary archive. It will just take too much space. It's a problem that doesn't have a realistic solution, other than the one we already have.

    Abigail

      I understand that making the Dynlibs themselves binary compatible would be unsolvable given the fragmentation of the targets, but I wonder if there isn't the possibility of an intermediary solution.

      Assuming that the required libraries existed on the target system, the information needed for the perl runtime to invoke them could be embedded in a system specific library. 'scuse me if the following descriptions are somewhat clumsy or dumbed down, but I found it difficult to describe in generic terms.

      For a stand-alone Perl app to invoke a DynLib routine it needs, and has available to it, essentially 4 pieces of information.

      • The name of the library
      • The name of the routines
      • The order, types and values of the parameters to pass.
      • The order and types of values to be returned.

      The information missing at this level are

      • The locations of the libraries
      • The calling conventions of the library routines (C, Fortran, other).
      • The byte ordering of the parameters and return values.

      It seems to me that you could have a piece of interface code that accepted the information that the interpreter knows in the (a) standard format and massaged them in a locally specific manner in order to call the DynLib and then retrieve the return(s) and pass them back to the interpreter. This piece of code could be pretty small and made available and a public library of binary versions for most systems could then be added to cpan or elsewhere and wouldn't take a lot of space. This would be a part of the same archive as the binary runtime interpreters.

      This would still require local libraries to be built for any given target system by the owner/operators of that system, but should give enough isolation from local specifics to allow genericity of distributable binary applications?


      Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
      Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
      Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
      Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

        Now you confuse me. If the local libraries can be assume to be there, what is the problem you are trying to solve?

        Abigail