From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id F084081792 for ; Mon, 24 Jun 2013 22:16:20 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.17.9; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.17.9; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.17.9 as permitted sender) identity=helo; client-ip=212.227.17.9; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkEBAF2oyFHU4xEJk2dsb2JhbABagzqra5QhgQoWDgEBAQEHCwsJFAMlgiMBAQU6PzNqDQENBhMJiAkIumYWiRqFeSYHg2MDjliKFJMtgWYk X-IPAS-Result: AkEBAF2oyFHU4xEJk2dsb2JhbABagzqra5QhgQoWDgEBAQEHCwsJFAMlgiMBAQU6PzNqDQENBhMJiAkIumYWiRqFeSYHg2MDjliKFJMtgWYk X-IronPort-AV: E=Sophos;i="4.87,930,1363129200"; d="scan'208";a="18831588" Received: from moutng.kundenserver.de ([212.227.17.9]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Jun 2013 22:16:20 +0200 Received: from office1.lan.sumadev.de (dslb-094-219-210-223.pools.arcor-ip.net [94.219.210.223]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0LyObS-1UFBYr0xT4-015twD; Mon, 24 Jun 2013 22:16:19 +0200 Received: from samsung (546BF816.cm-12-4d.dynamic.ziggo.nl [84.107.248.22]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id BD630C00CF; Mon, 24 Jun 2013 22:16:18 +0200 (CEST) Date: Mon, 24 Jun 2013 22:16:18 +0200 From: Gerd Stolpmann To: Adrien Nader Cc: Bikal Gurung , caml-list@inria.fr In-Reply-To: <20130624172105.GB32244@notk.org> (from adrien@notk.org on Mon Jun 24 19:21:05 2013) X-Mailer: Balsa 2.4.11 Message-Id: <1372104978.3769.2@samsung> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Provags-ID: V02:K0:g3ucuXNoBZBLFVm34i1IIXArHqeHcYVpkEzR3o87jid n2RpfgL0TUDiXntA5MvS8FzddmAyhFS/aT34q1vHMgMU5QlER8 Y3tNJ6HwTdhXzINJpCnSdmluph9WHOI6hyslrPpC2Xyz10hASd 9shxVolFvTJEPtkyapoytffnUFzpxvZH60nKPAaC6PRKenU2c5 /bkw4NDmKlWaTit3o+sQh7cjG3DCa8kIQp/TCfGCuTV4DGu7uW 4uLlmriQCoQvAqj/OBNA0aKiJvEtrgS1Z0lbrHWGic8+pC7HMB jJNjihxAo9+7imseQz7w4BaDL2v6Fne6AqzKbckIoaZR4WUJ9d DC5K/hhvKINdD524UmUc= Subject: AW: [Caml-list] Ocaml on windows 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.=20=20 > However, the > > environment is Windows OS. I am using cygwin and so far it seems to=20= =20 > work but > > curious on experiences others have on using ocaml on windows - both=20= =20 > as a > > development and deployment platform. Also has anyone tried using=20=20 > opam on > > windows? Does it work? > > >=20 > I believe opam on windows is pretty far away. >=20 > 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=20=20 of course not "pure Windows": You need Cygwin for doing builds, but=20=20 that's "only" because almost all build utilities are Unix-ish, and it=20=20 would be very hard to build anything without having some shell and the=20= =20 usual file utilities at hand. (AFAIK the only build utility that works=20= =20 in a pure Windows environment is omake.) So GODI assumes a mixed Windows environment, and this is in deed=20=20 doable. ocaml and all compiled code run on native Windows here, and for=20= =20 executing build scripts there is Cygwin. This solves the utility=20=20 question, but you get in return some new problems, like the different=20=20 calling conventions. All GODI core utilities have e.g. built-in support=20= =20 for translating Cygwin paths forth and back, so they can operate on=20=20 Cygwin paths although they are native Windows programs. Another problem=20= =20 are the strange Windows rules for splitting a command-line into words.=20= =20 As generic fallback when there are too many "bad characters" in the=20=20 command line I simply generate a temporary script that is then executed=20= =20 with bash. There are probably more such tricks I currently do not=20=20 remember. So this mixed mode is actually doable, and works so well that many GODI=20= =20 packages can be built on Windows without any special porting effort. If=20= =20 you look at WODI, the special adaption of GODI for Windows, you will=20=20 mostly find additional C libraries (because you cannot link against the=20= =20 libraries coming with Cygwin). We could go further and replace Cygwin completely only if we had a=20=20 substitute for the shell utilities. That's the core of the problem, and=20= =20 it's a hard one, because many scripts assume 100% POSIX behavior, and=20=20 e.g. using Windows command-line conventions is out of question. Gerd --=20 ------------------------------------------------------------ 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 ------------------------------------------------------------=