From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7CD78gj006826 for ; Fri, 12 Aug 2011 15:07:08 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am0BAE8kRU7RVdeskGdsb2JhbABBp28IFAEBAQEJCQ0HFAQhgUABAQEBAxICLAEbHgMMBgULBwMDLiIBEQEFAQ4OBhMIEgiHUZ0FCow2glWEfzuIbQIDBoZBBIwmhmqMVzyDYA X-IronPort-AV: E=Sophos;i="4.67,362,1309730400"; d="scan'208";a="115675094" Received: from mail-ey0-f172.google.com ([209.85.215.172]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 12 Aug 2011 15:07:05 +0200 Received: by eye4 with SMTP id 4so3273935eye.3 for ; Fri, 12 Aug 2011 06:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=7oDrEJrzBeWfJkWll/SoiHWHqhOAGMOxrJXqpaxvhFU=; b=VKJAEPtqjYuCt6NwxTuur9uBs1x3l6mm4TCzkM6UZxtrLxXJJfb2ZEZ6iaAdUabNIw exqB5NLXwLQYQB0+pDXnGhzpT2B4lgrdbTmLagHG+cudTdBWXtldDVVOq6qme94cbBfu cBsfBKnpDadTHZyDj0m8NIp/qoNBxIgIO0mbE= MIME-Version: 1.0 Received: by 10.213.13.141 with SMTP id c13mr841003eba.113.1313154424684; Fri, 12 Aug 2011 06:07:04 -0700 (PDT) Received: by 10.213.21.199 with HTTP; Fri, 12 Aug 2011 06:07:04 -0700 (PDT) In-Reply-To: References: <4E3FF432.3000705@gmail.com> <4E42526F.8000200@gmail.com> Date: Fri, 12 Aug 2011 15:07:04 +0200 Message-ID: From: Adrien To: Caml Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Trying to setup mingw OCaml 3.12.1 + fresh cygwin On 12/08/2011, David Allsopp wrote: > Matthieu Dubuget wrote: >> From: David Allsopp wrote: >> > Good to know that 64-bit MinGW is working - that said, I thought the >> MinGW port was broken in 3.12.1 or is that not affected with the 64-bit >> compiler? Could you share details on how you configured OCaml? >> >> This is not 64 bits. i686-w64-mingw32 is 32 bits. > > Ah, my bad - I mistakenly thought the mingw32 was the project and w64 the > architecture! > > I'm probably being low, but is the main benefit of using mingw-w64-mingw32 > over the version shipped with Cygwin (-mno-cygwin) simply that the latter > isn't working with 3.12.1 or is there another reason for using it? Well, first and as far as I know, cygwin has had a package for the *-w64-mingw32 for some time now. They are maintained by someone active within the mingw-w64 project. The reason to use one or another is to know which tools you are going to use. Compiling from cygwin to windows without cygwin (what you call -mno-cygwin) is actually cross-compilation! Using mingw* from cmd.exe means you don't have a shell interpreter or most of the posix tools. Using it from msys (which is an ancient fork from cygwin which requires a fork from gcc-2.96) means you have a mutant environment which is trying to both please posix and windows. I'd call msys "mostly unreliable crap". It's pretty light, it looks and feels native but it's a weird mix and _you_ should absolutely never link against the msys dll. Cygwin simply lets you use more tools and have them working better usually. Cygwin is also way slower (I still remember simple ./configure scripts taking 15 minutes to run, and networking has a higher latency too). Of course, you can also cross-compile from linux or any other posixy OS. All of them have advantages and issues. One issue of msys is having even more headaches when doing stuff on windows by the way. As for -mno-cygwin, I saw mentions of it on IRC quite recently and found out that it was on its way out. Actually that it was already removed. See: "PING: Deprecation of -mno-cygwin" http://cygwin.com/ml/cygwin/2009-03/threads.html#00766 It has been deprecated since 2009 and your GCC documentation should actually reflect that. I think it was only removed very recently which means it won't disappear until the next release at least but it's probably already subbject to bitrot. As far as I know (haven't looked at that), the right way is simply to cross-compile. Instead of passing -mno-cygwin as a CFLAG, use --host=x86_64-w64-mingw32 when calling configure. -- Adrien Nader