Version française
Home     About     Download     Resources     Contact us    
Browse thread
Caml on intel-OSX
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sven Luther <sven.luther@w...>
Subject: Re: [Caml-list] Caml on intel-OSX
On Fri, Jun 10, 2005 at 09:41:51AM +0900, Jacques Garrigue wrote:
> From: John Skaller <skaller@users.sourceforge.net>
> > On Thu, 2005-06-09 at 18:20 +0200, padiolea@irisa.fr wrote:
> > 
> > > > Lol! no, it is a simple question. Can I make a bytecode program
> > > > and just ship it an expect it to run? No. So what else is required?
> > > 
> > > I guess that if your bytecode program require some external libraries,
> > > such as for instance if you do a "open Dbm"  then you must
> > > have too this library.
> > > I think that ocamlrun only include code to handle the Pervasive
> > > library.
> > 
> > The code uses only (a) the standard library (Hashtbl and so on),
> > (b) the Unix library, and (c) Bignums. Therefore the bytecode
> > only requires support to be found in the standard distribution.
> > 
> > I have a suspicion that one needs to '-custom' link somehow,
> > to make a suitable single bytecode interpreter. The desire
> > here is to *avoid* building Ocaml from source on the
> > target platform, instead to use pre-built binaries,
> > or, at worst, build these binaries from source,
> > excluding the full Ocaml toolkit -- the compiler isn't
> > required since the program is already compiled
> > to bytecode.
> 
> In theory, it should be enough to have ocamlrun, and the dlls in
> stublibs.
> The an ocaml bytecode executable, linked _without_ -custom, could be
> executed as:
>   $ setenv CAML_LD_LIBRARY_PATH /path/to/stublibs
>   $ ocamlrun myprogram
> (Of course you need everything to be compiled from the same ocaml
> distribution.)
> 
> The problem is that there is no support to compile only bits and
> pieces of the ocaml distribution. And there is little point to do

Works fine with a binary distribution like debian though, we ship the ocamlrun
and sublibs separatedly, and only those packages are needed to run a bytecode
package using them.

Friendly,

Sven Luther