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 587F881792 for ; Mon, 24 Jun 2013 19:18:31 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of adrien@notk.org designates 91.121.71.147 as permitted sender) identity=mailfrom; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjMFAPN9yFFbeUeT/2dsb2JhbABbgwkxgmVpvDOBBhZ0giMBAQUjQhQQCxgCAgUTDgICDwUYMYglCKkwkS6BJo4pB4JPM2EDk3GDUQGBKZAbgxI6 X-IPAS-Result: AjMFAPN9yFFbeUeT/2dsb2JhbABbgwkxgmVpvDOBBhZ0giMBAQUjQhQQCxgCAgUTDgICDwUYMYglCKkwkS6BJo4pB4JPM2EDk3GDUQGBKZAbgxI6 X-IronPort-AV: E=Sophos;i="4.87,929,1363129200"; d="scan'208";a="18820435" Received: from nautica.notk.org ([91.121.71.147]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2013 19:18:30 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 209A3C009; Mon, 24 Jun 2013 19:18:30 +0200 (CEST) Date: Mon, 24 Jun 2013 19:18:30 +0200 From: Adrien Nader To: Jonathan Protzenko Cc: Bikal Gurung , caml-list@inria.fr, David Allsopp Message-ID: <20130624171830.GA32244@notk.org> References: <51C81B39.8040400@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <51C81B39.8040400@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] Ocaml on windows Hi, On Mon, Jun 24, 2013, Jonathan Protzenko wrote: > On Mon 24 Jun 2013 12:01:06 PM CEST, Bikal Gurung wrote: > > Hi David, > > > > Thank you for your response. I have installed the official windows > > port of ocaml at http://protz.github.io/ocaml-installer/ . However, it > > mentions that MinGW/Msys is no longer supported. I rather use > > Mingw/Msys as well. > There are quite a few things that make working with msys painful, which > is the reason why I switched the installer to cygwin. The installer > still is a 32-bit native windows program, and still generates 32-bit > native windows programs. It's just that cygwin is an easy way to get a > toolchain and a unix-like development environment, which ocaml kind of > needs in order to work right (without it, you only get bytecode > compilation). > - The main problem is that OCaml is, by default, configured to search > executables from the toolchain with the i686-pc-mingw-whatever prefix, > that is, the one that the mingw-w64 compilers have, when installed > through cygwin. > - The second biggest problem is with flexdll which, IIRC, hardcodes the > use of the mingw-w64 compilers (32-bit compilers from the mingw-w64 > project). Msys, on the other hand, uses the mingw compilers (the > original mingw project), and the location of the libraries / > executables is slightly different, or maybe flexdll doesn't auto-detect > the right locations for crt2.o and friends, meaning it's painful as you > have to manually export FLEXLINKFLAGS. At some point, it became almost > impossible to have that combination working. I think flexdll started to > hardcode the i686-pc-mingw prefix at some point, and there's no > ready-made, easy to install mingw-w64/msys bundle available, as far as > I know. Well, msys doesn't really require one toolchain or another: you can have mingw-w64 (either i686-w64-mingw32 or x86_64-w64-mingw32) with msys afaik. However msys comes from mingw.org which is the "main" site for i686-pc-mingw32 so that doesn't make things very balanced. Note that there is a very recent "MSYS2" project which is updated in pretty much every respect (newer GCC, forked from a newer Cygwin which has 64b support, ...). It's very very recent and might become a variant of cygwin but so far there are differences in the behaviour wanted from it compared to cygwin which means that having the two of them merged will involve some work and discussions. > - OCamlbuild relies on bash being available in the path to run its > external commands ; an easy way to have this is to have a cygwin > development environment. This is a know issue that no one has stepped > up to fix on windows. Cygwin, or msys. However with msys you need bash and coreutils (ocamlbuild uses "cp" in a few places for instance, but that's trivial to fix) and all the deps (regex, termcap, and several others). An "easy" way to install msys would probably be mingw-get from mingw.org, which for its default repos would use the toolchain from mingw.org too (fun stuff). Btw, the issue is that windows' exec*() functions take an array of strings, then merges all these strings and had that new string to the process on startup. This means that in order to have the arguments split as you had hoped them to be, you need to apply some rules (which I don't have at hand right now). Generally speaking, I'd like to have some more code in mingw-w64 to alleviate the need for bash. > - Finally, the quoting conventions, IIRC, are subtly different between > mingw/msys and cygwin, and OCaml is tailored to cygwin. Can you elaborate on that? I've used msys for ocaml in the past and haven't had issues. -- Adrien Nader