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 00DFF81792 for ; Mon, 24 Jun 2013 12:11:08 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jonathan.protzenko@gmail.com) identity=pra; client-ip=209.85.212.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jonathan.protzenko@gmail.com"; x-sender="jonathan.protzenko@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jonathan.protzenko@gmail.com designates 209.85.212.172 as permitted sender) identity=mailfrom; client-ip=209.85.212.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jonathan.protzenko@gmail.com"; x-sender="jonathan.protzenko@gmail.com"; 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@mail-wi0-f172.google.com) identity=helo; client-ip=209.85.212.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jonathan.protzenko@gmail.com"; x-sender="postmaster@mail-wi0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQBABsayFHRVdSsjWdsb2JhbABbgzqDTrwxfRYOAQEBAQcLCwkSBiSCIwEBBSMdARscAQEDDAYFCw0CAgUWCAMCAgkDAgECARERAQUBCwMBDQYNAQUCAQEQBodhAQMPBAicHIt+T4J/g38KGScNWId0AQUMgRqOKQeCT4EUA5Nxg1KBKYR4iT4/hDg X-IPAS-Result: AsQBABsayFHRVdSsjWdsb2JhbABbgzqDTrwxfRYOAQEBAQcLCwkSBiSCIwEBBSMdARscAQEDDAYFCw0CAgUWCAMCAgkDAgECARERAQUBCwMBDQYNAQUCAQEQBodhAQMPBAicHIt+T4J/g38KGScNWId0AQUMgRqOKQeCT4EUA5Nxg1KBKYR4iT4/hDg X-IronPort-AV: E=Sophos;i="4.87,928,1363129200"; d="scan'208";a="18764087" Received: from mail-wi0-f172.google.com ([209.85.212.172]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Jun 2013 12:11:08 +0200 Received: by mail-wi0-f172.google.com with SMTP id c10so2378413wiw.11 for ; Mon, 24 Jun 2013 03:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=rj0r2dHzI/6uzDkpSxmRvJXnzO5x88Wg954iLq3Mppk=; b=hJNhJ+NAMqYkwYQb0+10TCkTR9iAig1udWrW25uVvZu6qTInOWOJIuPaZcQVSY82kL n6tOWCuh3U/b0j7ZKJ4xzR/Z/7N6chBcUFzsvW1vPx4inRkihvdTVkzw+708zVRAVA3V N99NAtVyTnHo3fVkYA73uL+UGNYSoRvwZSDh9xDrWM6vEEiTj2qoyZyh37fo2r4etFVC Z0Q50wL16e7c03Hl1JLfEM2R7F3CAJEoh8GJNkehKNMU01K9rvXeTNMKWx4tqRu4v7oo E/9WBsW0j19oaiHZnSyPUcWVSD+n/8s41Azlup5RdrMGmtdN6QgslNdLqxvctLiQce1+ 1xWA== X-Received: by 10.194.8.163 with SMTP id s3mr16344006wja.41.1372068668020; Mon, 24 Jun 2013 03:11:08 -0700 (PDT) Received: from [193.55.177.73] ([193.55.177.73]) by mx.google.com with ESMTPSA id fd3sm9255303wic.10.2013.06.24.03.11.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 03:11:07 -0700 (PDT) Message-ID: <51C81B39.8040400@gmail.com> Date: Mon, 24 Jun 2013 12:11:05 +0200 From: Jonathan Protzenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0a1 MIME-Version: 1.0 To: Bikal Gurung CC: caml-list@inria.fr, David Allsopp References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Ocaml on windows 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. - 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. - Finally, the quoting conventions, IIRC, are subtly different between mingw/msys and cygwin, and OCaml is tailored to cygwin. For all these reasons, cygwin sounds like a better choice for you working environment on windows. But I believe msys is still possible. If there's something that prevents you from having it work properly, I think we (the team) would be happy to know about it. Cheers, jonathan > > It seems ocamlbuild requires cygwin to work, has this been your > experience too? If I build the latest ocaml from trunk - 4.02dev+fp > will ocaml and other tools/utilities still work on pure MingWg/Msys > environment? > > With regards to ocaml libraries, have you tried the Jane Street > packages? Core, core_kernel ? > > Bikal Gurung > > > On 24 June 2013 10:27, David Allsopp > wrote: > > Bikal Gurung wrote: > > 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've used the MinGW Windows port of OCaml for nearly a decade. > Deployment of programs is the same as deploying anything else on > Windows - deploying using executables built with ocamlopt is of > course trivial as they have no dependencies beyond any libraries > you choose to use. > > Partly because of how long I've used OCaml, I still build it from > sources - but there are now several options including the packaged > Windows installer, GODI/WODI, etc. Although Windows OCaml users > are a minority, there are quite a few developers actively > contributing (the recent 64-bit MinGW port was > community-initiated, I think). > > Last time I looked, Windows support for opam appeared to be a todo > list item, but I haven't looked in a while (laziness... I already > have parallel build scripts of my own, so a package manager is > lower down my priority list) > > HTH, > > > David > >