From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Adrien Nader <adrien@notk.org>
Cc: Bikal Gurung <bikal.gurung@lemaetech.co.uk>, caml-list@inria.fr
Subject: AW: [Caml-list] Ocaml on windows
Date: Mon, 24 Jun 2013 22:16:18 +0200 [thread overview]
Message-ID: <1372104978.3769.2@samsung> (raw)
In-Reply-To: <20130624172105.GB32244@notk.org> (from adrien@notk.org on Mon Jun 24 19:21:05 2013)
Am 24.06.2013 19:21:05 schrieb(en) Adrien Nader:
> On Mon, Jun 24, 2013, Bikal Gurung wrote:
> > Hi,
> >
> > I am looking to use ocaml to implement a project for my employer.
> However, the
> > environment is Windows OS. I am using cygwin and so far it seems to
> work but
> > curious on experiences others have on using ocaml on windows - both
> as a
> > development and deployment platform. Also has anyone tried using
> opam on
> > windows? Does it work?
> >
>
> I believe opam on windows is pretty far away.
>
> The issues can be summarized in a few words: source-based package
> manager for ocaml on pure windows.
> For this to fully work, you need a perfect toolchain where everything
> works wonderfully.
I can quickly report what I did to get GODI working on Windows. It is
of course not "pure Windows": You need Cygwin for doing builds, but
that's "only" because almost all build utilities are Unix-ish, and it
would be very hard to build anything without having some shell and the
usual file utilities at hand. (AFAIK the only build utility that works
in a pure Windows environment is omake.)
So GODI assumes a mixed Windows environment, and this is in deed
doable. ocaml and all compiled code run on native Windows here, and for
executing build scripts there is Cygwin. This solves the utility
question, but you get in return some new problems, like the different
calling conventions. All GODI core utilities have e.g. built-in support
for translating Cygwin paths forth and back, so they can operate on
Cygwin paths although they are native Windows programs. Another problem
are the strange Windows rules for splitting a command-line into words.
As generic fallback when there are too many "bad characters" in the
command line I simply generate a temporary script that is then executed
with bash. There are probably more such tricks I currently do not
remember.
So this mixed mode is actually doable, and works so well that many GODI
packages can be built on Windows without any special porting effort. If
you look at WODI, the special adaption of GODI for Windows, you will
mostly find additional C libraries (because you cannot link against the
libraries coming with Cygwin).
We could go further and replace Cygwin completely only if we had a
substitute for the shell utilities. That's the core of the problem, and
it's a hard one, because many scripts assume 100% POSIX behavior, and
e.g. using Windows command-line conventions is out of question.
Gerd
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
next prev parent reply other threads:[~2013-06-24 20:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 9:07 Bikal Gurung
[not found] ` <E51C5B015DBD1348A1D85763337FB6D9CC8677FE@Remus.metastack.local>
2013-06-24 10:01 ` Bikal Gurung
2013-06-24 10:11 ` Jonathan Protzenko
2013-06-24 12:10 ` Malcolm Matalka
2013-06-24 17:18 ` Adrien Nader
2013-06-25 8:40 ` David Allsopp
2013-06-26 18:17 ` Adrien Nader
2013-06-26 19:55 ` David Allsopp
2013-06-24 17:21 ` Adrien Nader
2013-06-24 20:16 ` Gerd Stolpmann [this message]
2013-06-26 18:29 ` Adrien Nader
2013-06-26 18:46 ` Wojciech Meyer
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=1372104978.3769.2@samsung \
--to=info@gerd-stolpmann.de \
--cc=adrien@notk.org \
--cc=bikal.gurung@lemaetech.co.uk \
--cc=caml-list@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