caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien Nader <adrien@notk.org>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: Bikal Gurung <bikal.gurung@lemaetech.co.uk>, caml-list@inria.fr
Subject: Re: [Caml-list] Ocaml on windows
Date: Wed, 26 Jun 2013 20:29:47 +0200	[thread overview]
Message-ID: <20130626182947.GC31557@notk.org> (raw)
In-Reply-To: <1372104978.3769.2@samsung>

On Mon, Jun 24, 2013, Gerd Stolpmann wrote:
> 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.

Yup, agreed, mixed is doable as WODI has proven.
The most annoying constraint is probably that it slows down builds a lot
and it makes frequent updates very painful (that makes source-based
package managers far less attractive on windows [ note that on linux, I
use and enjoy godi ]).

That said, I've used ocaml on pure windows (besides bash for
ocamlbuild). I was running everything from cmd.exe and it worked well.
I had also built libraries which rely on oasis and it had gone well too.
I believe that with a sufficiently full-featured build system, pure
windows is doable and that's something which is probably fairly close.

-- 
Adrien Nader

  reply	other threads:[~2013-06-26 18:29 UTC|newest]

Thread overview: 19+ 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   ` AW: " Gerd Stolpmann
2013-06-26 18:29     ` Adrien Nader [this message]
2013-06-26 18:46       ` Wojciech Meyer
     [not found] <20130626113838.0643281793@sympa.inria.fr>
2013-06-26 12:02 ` r.3
2013-06-26 17:45   ` Bikal Gurung
2013-06-26 17:55     ` David Allsopp
2013-06-26 18:07       ` Bikal Gurung
2013-06-26 18:28         ` Wojciech Meyer
2013-06-26 18:12       ` Adrien Nader
2013-06-26 19:54     ` Alain Frisch

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=20130626182947.GC31557@notk.org \
    --to=adrien@notk.org \
    --cc=bikal.gurung@lemaetech.co.uk \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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).