On Mon, 6 Apr 2009, Rob Arthan wrote:

I am trying to understand what level of binary compatibility I can expect if I use Poly/ML to create an executable by exporting a function which calls PolyML.rootFunction to give the users a Poly/ML interactive session. The users will then update the Poly/ML state, save it and reload it in later sessions using the functions in PolyML.SaveState. They will also load state files prebuilt for them.

If I build the executable on system A and create some saved state files there, how like A does some other system B have to be for the executable and the saved state files to work on B? I am concerned both about the compatibility for the saved state files and for the shared object files libpolyml.so and libpolymain.so. I understand QinetiQ have no problems moving between systems with Intel hardware and recent-ish slackware and Fedora operating systems. Would the same files work on my Intel Mac?

While David can probably explain better the true details, I can tell how we do it for Isabelle.

  * We have a portable shell script that invents platform identifiers for
    combinations of HW and OS, according to "known equivalences".  See
    
http://isabelle.in.tum.de/repos/isabelle/file/tip/lib/scripts/polyml-platform

  * We precompile Poly/ML for these equivalence classes of platforms as
    hinted in the README part of http://isabelle.in.tum.de/polyml-5.2.1/
    It is important to use a "typical" representative of each platform
    equivalence class, neither too old, nor too new (to escape DLL-hell).

  * We never "install" Poly/ML in a fixed place, but have a startup script
    that modifies LD_LIBRARY_PATH such that all libpoly* component are
    found again (on Mac OS this is DYLD_LIBRARY_PATH).  Thus everything
    can be kept within a single "Isabelle" distribution directory,
    although this is not mandatory.

  * Images produced by PolyML.SaveState are decorated by the same platform
    identifier.  Poly/ML appears to require exactly the same executable to
    reload such an image.

This homegrown variant of "fat binaries" works quite well across a broad range of platforms, e.g. see the 7 platforms available via http://isabelle.in.tum.de/download_x86-linux.html

Only in rare situations, some users with very old Linux installations ever had to compile themselves.


        Makarius
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to