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 993297FA80 for ; Sat, 24 Oct 2015 12:10:40 +0200 (CEST) IronPort-PHdr: 9a23:PIa/cBynGTMUbYPXCy+O+j09IxM/srCxBDY+r6Qd0OsWIJqq85mqBkHD//Il1AaPBtWGraocw8Pt8IneGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwudrmzQtaapv/0/t7x0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY+YtaRu+CVIuv8n69UIEeCjJ/x5HopjES8+PmspyMruvBjFBUvTtzpPGlkRx1BzBAXK8Av9RtO5lyrxtuNw3GPSacj3RrA9VDDk9KBmRwPyjz8vNjgl/WWRgct12vF1uhWk8jN2yZTVbYXdD/F+c7nQZ5tOSmNLRMdcU2paCYOxdYYVJ+UENOdc6YL6og1d/lOFGQCwCba3mXdzjXjs0Ph/jr0s Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-ig0-f179.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.213.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.213.179 as permitted sender) identity=mailfrom; client-ip=209.85.213.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@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-ig0-f179.google.com) identity=helo; client-ip=209.85.213.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ig0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CQAwDnVytWm7PVVdFdg1U1bwasboUrjCgjgTchhXwCgSUHORMBAQEBAQEBARABAQEBAQYLCwkhLoIrgggBAQQSER0BCBMSCwEDDAYFCwUCBgICCR0CAiIBEQEFAQoEAQ0GExIQh3gBAxINpSqBMT4xi0mBbIJ5iCYKGScDClaEAAEBAQEBBQEBAQEBAQEWAQUOgRSFVYN4gQaEOwEBHTMHgmmBRQWGCQyQIYUciAaBWUiWHoIkEiOBFyIBgkQNFgeBVzw0hViBQAEBAQ X-IPAS-Result: A0CQAwDnVytWm7PVVdFdg1U1bwasboUrjCgjgTchhXwCgSUHORMBAQEBAQEBARABAQEBAQYLCwkhLoIrgggBAQQSER0BCBMSCwEDDAYFCwUCBgICCR0CAiIBEQEFAQoEAQ0GExIQh3gBAxINpSqBMT4xi0mBbIJ5iCYKGScDClaEAAEBAQEBBQEBAQEBAQEWAQUOgRSFVYN4gQaEOwEBHTMHgmmBRQWGCQyQIYUciAaBWUiWHoIkEiOBFyIBgkQNFgeBVzw0hViBQAEBAQ X-IronPort-AV: E=Sophos;i="5.20,192,1444687200"; d="scan'208";a="151627182" Received: from mail-ig0-f179.google.com ([209.85.213.179]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 24 Oct 2015 12:10:39 +0200 Received: by igbkq10 with SMTP id kq10so31256233igb.0; Sat, 24 Oct 2015 03:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=KX5ksmtiYKIIOAHaVRnXoktvvKOgieqi100zO9nVsvQ=; b=PW/+2Kjxzi52E+2E1/KCG7RFNuNXZxeF5OdlhyhlDzY+WQWQWHGoxPgVKo+e3+wQvL TRHC6ahM3d3BuuU1sn3oi6zt+LuC596gvEtBpbiR2I5tgk/zn+tf0TTTBs/LSqpewydV pgx0B+Nlt4kplQJQQIQKXd4O9n6uOJOhjzV/TSYZavLeaGpN0nPlW0Se/AKt1Eqsh35Q W4olmKBVB4RZsiWR09w5EoTDzxRFWsiwoDMpF41KhE9SMytgVV80LnScr/Cq4VAxKbeq Gg1CKQr8W6O7alZsvXfFyAUguJPclPjUSVGqkIO5SLk4aH/HKobawqYfQjsb3c0g9UoE GkMA== X-Received: by 10.50.141.233 with SMTP id rr9mr9160016igb.37.1445681437834; Sat, 24 Oct 2015 03:10:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.33.6 with HTTP; Sat, 24 Oct 2015 03:09:58 -0700 (PDT) In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3315A@IRSMSX102.ger.corp.intel.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE32E38@IRSMSX102.ger.corp.intel.com> <562A5C92.50206@inria.fr> <0F7D3B1B3C4B894D824F5B822E3E5A172CE3315A@IRSMSX102.ger.corp.intel.com> From: Gabriel Scherer Date: Sat, 24 Oct 2015 12:09:58 +0200 Message-ID: To: "Soegtrop, Michael" Cc: Xavier Leroy , "caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Effect of Windows LLP64 architecture on 64 bit MingW OCaml It's not that the page is "outdated", rather that there is the information there that people decided to put there, on the basis of the use-cases that they tried personally and could get to work reliably. If nobody seriously tried to streamline mingw64 support before, nobody got to document it (which seems reasonable given the few hurdles you report). You should feel free to send patches to the website information (from any page on the website, the pen icon in the top-right corner will get you to the corresponding file in the version control system, ready to edit through github) or the compiler build system to improve your preferred corner of Windows support. On Sat, Oct 24, 2015 at 11:29 AM, Soegtrop, Michael wrote: > Dear Xavier, > > yes, it answers my question, thanks! Andreas Hauptmann gave a similar ans= wer before, but apparently as private mail. So let me post my reply here on= the list: > > Dear Andreas, > > thanks for the pointers and details! Because the web doc is way outdated = (https://ocaml.org/docs/install.html states there is just a 32 bit mingw bu= ild) I mistakenly tried to build mingw64 with configure and stumbled over a= few bad uses of long in auto-aux stuff. But I agree that the main part of = Ocaml looks clean in this respect. Just some libraries look a bit fishy, e.= g. > > CAMLprim value unix_write(value fd, value buf, value vofs, value vlen) { > long ofs, len, written; > int numbytes, ret; > char iobuf[UNIX_BUFFER_SIZE]; > > Begin_root (buf); > ofs =3D Long_val(vofs); > len =3D Long_val(vlen); > > This assignment of Long_val to a long doesn't seem to be correct. Or is t= his function just used for Linux? There are just 190 occurrences of \blong\= b in the whole sources. It might make sense to remove all such uses outside= of OS abstraction files. > > Btw.: The configure mechanism is not that bad for Mingw builds on Cygwin,= if host, target and prefix are set properly. The main problems are: > > - config/auto-aux/runtest and its users get confused by Mingw test apps r= eturning strings terminated with \r\n instead of \n. Piping the output thro= ugh tr -d '\r' fixes this. > - bad uses of long in auto-aux files, e.g. endian.c > - The flexlink handling needs some fixes > - It is way odd that there is no -build option to configure like with gcc= . A compiler build needs to be aware of 3 OSes: the one on which the compil= er is build, the one on which the built compiler runs and the one for which= it generates code. For gcc all 3 are configurable. Some configure/make thi= ngs are clearer and easier if all 3 OSes are known. E.g. pathes tend to be= different on the build and host OS when building a Mingw compiler on Cygwi= n. > > I think it might be not so much work to get rid of the separate make file= s and use configure for mingw and cygwin builds as well. > > Best regards, > > Michael > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul > Chairperson of the Supervisory Board: Tiffany Doon Silva > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs