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 p7AAtbu9008483 for ; Wed, 10 Aug 2011 12:55:37 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgCAJNiQk7RVdeskGdsb2JhbABBmC2PEwgUAQEBAQkJDQcUBCGBQAEBAQEDEgIsARsdAQMMBgULCQEDLiEBAREBBQEcGRoIh1ChEQqMNYJVhGI7iG0CAwaGQASTCYlxgmI8g2A X-IronPort-AV: E=Sophos;i="4.67,350,1309730400"; d="scan'208";a="115482002" Received: from mail-ey0-f172.google.com ([209.85.215.172]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Aug 2011 12:55:32 +0200 Received: by eye4 with SMTP id 4so1131410eye.3 for ; Wed, 10 Aug 2011 03:55:32 -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 :cc:content-type; bh=6jIdpoPMrPoqYzust/WOLweTa9EOjmLpl3L59f1idWY=; b=kjoORcD+v905yjJRKXv/yRP2x2wN9NNQuaPSMvNeLrBRbHJz7jnQxa/oEdJSes2UQV EtOvAJkUS1j/9njYYciWOx6KE1DW81k2g1TLkRe8bRVcOoYVtIuBcgUtCjXZX9+1HPoO TuJZUBdS0+G4oQv0N7SWIwFDICsqxLKYrnunk= MIME-Version: 1.0 Received: by 10.213.13.141 with SMTP id c13mr105171eba.113.1312973731853; Wed, 10 Aug 2011 03:55:31 -0700 (PDT) Received: by 10.213.5.13 with HTTP; Wed, 10 Aug 2011 03:55:31 -0700 (PDT) In-Reply-To: <4E42526F.8000200@gmail.com> References: <4E3FF432.3000705@gmail.com> <4E42526F.8000200@gmail.com> Date: Wed, 10 Aug 2011 12:55:31 +0200 Message-ID: From: Adrien To: matthieu.dubuget@gmail.com Cc: Caml Mailing List , David Allsopp Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Trying to setup mingw OCaml 3.12.1 + fresh cygwin On 10/08/2011, Matthieu Dubuget wrote: > > Date: 10/08/2011 10:25 > 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. But for this, I > adapted some patches borrowed from bug #5179, that may interest you. To clarify the situation a bit, in the triplet, "w64" refers to the mingw-w64 project. mingw.org uses "pc" instead (and you can configure any build to use that one too, but the behaviour of your toolchain will change). It could also be McDonalds were McDonald's doing anything with GCC. For "mingw32", the issue is that many configure scripts (and other elements) check for "mingw32" when they should actually check for "mingw*". Noone is to blame, it used to be perfectly acceptable but it'll take some time to change (it's hopefully improving). By the way, ocaml's configure scripts have at least one problem: windows uses the LLP64 model while linux and many others use the LP64 model [1]. The endianess test uses a variable of type long and assumes it is the same size as a pointer which is not the case on windows 64. On C99, you can use (u)intptr_t and types from stddef.h (size_t, ptrdiff_t, ...) instead. These types can also be used with GCC and probably others even when in non-C99 mode. [1] http://en.wikipedia.org/wiki/LLP64#Specific_C-language_data_models If I remember correctly, you're still supposed to use the Makefile.nt (make -f Makefile.nt) files with minor changes instead of calling configure when using mingw and you're outside of cygwin which means the issue won't always pop up but it's quite important to have this in mind when porting to windows 64 (it's a common issue). -- Adrien Nader