caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Don Syme <dsyme@microsoft.com>
To: "'caml-list@pauillac.inria.fr'" <caml-list@pauillac.inria.fr>
Subject: RE: Portability of applications written in OCAML
Date: Mon, 21 Feb 2000 11:02:22 -0800	[thread overview]
Message-ID: <39ADCF833E74D111A2D700805F1951EF1801447F@RED-MSG-06> (raw)


Under Windows, I would ideally I'd like to package up binary distributions
in the same way I would any other kind of application, e.g. using a "do it
all for you" packager like InstallShield.  Has anyone had experience of
doing this with Caml applications?  

Thanks,
Don


-----Original Message-----
From: Xavier Leroy [mailto:Xavier.Leroy@inria.fr]
Sent: 21 February 2000 17:04
To: caml-redistribution@pauillac.inria.fr
Subject: Re: Portability of applications written in OCAML


Claude Marche asks:

>One idea could be distributing bytecode: is it true the any bytecode
>can be executed on any architecture and OS as soon as the right
>ocamlrun is used? (Even under non unix OSs like Microsoft-Windows or
>Mac-OS?) 

For MacOS, there are some problems with end-of-line being represented
by different control characters in MacOS and in Unix and Windows.  So,
newlines in program output are broken.

For MacOS and Windows, there is also the fact that file path names are
represented differently.  So, if your program manipulates file names,
even though the Filename module, the bytecode may not work well under
a different OS.

I think the easiest way to distribute an OCaml application is as
sources, plus binaries for a couple of popular architectures
(typically, Linux/Intel and Windows).  Novice users can pick the
binaries, and experienced users should have no problems installing
OCaml for compiling your application.

Gerd Stolpmann wrote:
> My suggestion: Every modern operating system can link libraries
dynamically.
> This is also possible for the parts of the OCaml libraries written in C
> which need to be available in the runtime system.

Right, I have been considering dynamic loading of C libraries as an
alternative to -custom.  This would allow, among other benefits,
dynamic loading of Caml libraries that contain some C code.

There are some portability issues with old or exotic versions of Unix,
but I think it can be made to work under, say, Linux, Solaris,
Digital/Tru64 Unix, and Windows.  There are some issues still to be
resolved, however, such as how to build shared C libraries in a
portable fashion, perhaps by using the GNU libtool package.

> - Only libraries needed for the application are loaded into memory;
>   the memory footprints become much smaller

Yes and no, because static linking under C is able to remove members
of the .a archive that are not referenced, while dynamic loading
typically loads everything.  But memory footprint of code is not much
of an issue these days.

- Xavier Leroy



             reply	other threads:[~2000-02-24 17:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-21 19:02 Don Syme [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-15 13:01 Claude Marche
2000-02-16 13:09 ` Jean-Francois Monin
2000-02-16 14:08   ` Claude Marche
2000-02-16 14:28     ` Jean-Francois Monin
2000-02-18  9:18     ` Patrick Goldbronn - SYSCO
2000-02-16 22:49 ` Gerd Stolpmann
2000-02-18  9:36   ` Xavier Leroy
2000-02-21 20:45     ` skaller
2000-02-22  8:13     ` Sven LUTHER
2000-02-22  9:21       ` Xavier Leroy
2000-02-17  8:05 ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39ADCF833E74D111A2D700805F1951EF1801447F@RED-MSG-06 \
    --to=dsyme@microsoft.com \
    --cc=caml-list@pauillac.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).