From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pAO8Nwnt011660 for ; Thu, 24 Nov 2011 09:23:58 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjMCAJP+zU7RVdy2mGdsb2JhbABEFqdogmUIIgEBAQEBCAkNBxQlgXIBAQEEEgIeAQUIARsdAQMMBgULDQkNARcPAhIRAQUBDgENBg0BBwEBHodrl3kKi2OCZoUFPYhxAgUKhz8BgxgElEqFQIExhmc9g3c X-IronPort-AV: E=Sophos;i="4.69,564,1315173600"; d="scan'208";a="120667168" Received: from mail-vx0-f182.google.com ([209.85.220.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Nov 2011 09:23:52 +0100 Received: by vcbfk1 with SMTP id fk1so1144712vcb.27 for ; Thu, 24 Nov 2011 00:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=mXtXjAEVHV+Fld/3PH1aQ/oUtywk3aNwc5Dr06K83lE=; b=FvonN8mzeogs7Lpsbc9BJJCJeYjCwiR0JysBvMZygd+So6bkTuq3mEbAU14gIETfBZ bVJHhZ+XvpS5ucwosY85aDuyLzZLGiEalq2DKM5GrQcda/q0mWXVp4Tz6l1K9DJbYutV 7fEoh8M7GaiErEhhTaWAAxLQ+0hUwOGUXCDKg= Received: by 10.220.150.201 with SMTP id z9mr338063vcv.151.1322123031833; Thu, 24 Nov 2011 00:23:51 -0800 (PST) Received: from [128.93.11.91] (sauternes.inria.fr. [128.93.11.91]) by mx.google.com with ESMTPS id z3sm12662930vdg.16.2011.11.24.00.23.47 (version=SSLv3 cipher=OTHER); Thu, 24 Nov 2011 00:23:48 -0800 (PST) Message-ID: <4ECDFF0C.90004@gmail.com> Date: Thu, 24 Nov 2011 09:23:40 +0100 From: Jonathan Protzenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0a1) Gecko/20111109 Thunderbird/10.0a1 MIME-Version: 1.0 To: "Paul A. Steckler" CC: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Issues with OCaml on Windows, MinGW build Hi, On 11/24/2011 07:25 AM, Paul A. Steckler wrote: > For a long while, we've been building software for Windows using the > OCaml MinGW cross-compiler > on Fedora. That tack allows building the software pretty much the same > as it's built for native Linux. > But the OCaml MinGW packages for Linux haven't been updated in some > time, and that project > appears moribund. We're already on to 3.12 in Linux, and the > cross-compiler is stuck at 3.11 (and a > beta version at that). > > So I thought I'd try building the software directly on Windows using > the MinGW build. I downloaded > the self-installer from > http://gallium.inria.fr/~protzenk/caml-installer.html (am I the only > one that thinks that > blinking text in Web pages is passé?). I also downloaded MinGW/MSYS That was intended as a joke. Sorry if that's not obvious. > using the installer at > http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20111118/. > > Here are some issues I encountered when using this environment: > > - Many of the OCaml executables in the distribution, as well as > flexlib, invoke gcc with the flag > '-mno-cygwin', but the MinGW gcc I installed does not, in fact, accept > that flag. In emacs, I > replaced the offending argument with spaces in the binaries to allow > compilation to proceed (!). I tried native compilation before releasing the installer. Could you tell me precisely what kind of command results in gcc being called with -mno-cygwin? Basic native compilation tests (ocamlopt) seemed to work. Also, please create an issue at https://github.com/protz/ocaml-installer/issues so that I can fix it for the next version. Thanks! > > - You can't login to the MinGW shell to allow remote builds via ssh. > I can get most of the > required functionality by setting environment variables and calling > the MinGW's sh.exe > explicitly, but it would be useful to have instructions on how this should go. Isn't it more of a mingw issue? > > - When trying to build some standard OCaml packages, like cryptokit > and oUnit, the 'configure' > and 'make' steps fail badly. One reason is that 'configure' invokes an > OCaml program which calls > Sys.command, and on my computer, some of the arguments are filenames > with spaces in them. As Sylvain said, there's the issue of c:/foo/bar vs /c/foo/bar vs c:\foo\bar. One of them always work, it's just hard to know which one :). > > I managed to build a few packages, but it was difficult enough that > I'm discouraged from proceeding > further. > > Has anyone had success building standard packages using the MinGW distribution? I haven't tried this, as I merely tried to provide a bare ocaml. If you have suggestions as to how I could make that easier for you *in the installer*, I'm all ears :). Thanks for the feedback, jonathan > > -- Paul > >