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 4E3F77FFB6 for ; Tue, 15 Mar 2016 09:36:15 +0100 (CET) IronPort-PHdr: 9a23:9laF2xHGVdzrdzCdes3iOZ1GYnF86YWxBRYc798ds5kLTJ74ps6wAkXT6L1XgUPTWs2DsrQf27WQ4v+rADVdqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7/0qsKYOlwVzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9Er1dQuO/XsdVGpTswIAQ1OdtFCpFqv252HBsedyxDOdJYm+aLE/WT2v6+0jHBrpgycOOjp/62bahdBqi7pzoRS9qhg5yInRNtK7Lv17K7zdfM8XXHdIRMUZAzNBA5+xdpYGFekpIuZZs4TkulIUrl25Hwb6V7Cn8SNBmnKjhP5y6O8mCwyThlR4Eg== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=whitequark@whitequark.org; spf=Pass smtp.mailfrom=whitequark@whitequark.org; spf=None smtp.helo=postmaster@mail.whitequark.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of whitequark@whitequark.org) identity=pra; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of whitequark@whitequark.org designates 176.58.103.125 as permitted sender) identity=mailfrom; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; 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.whitequark.org) identity=helo; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="postmaster@mail.whitequark.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CjCADIyOdW/31nOrBdhBhtgm25YBmFdAKBbxABAQEBAQEBAWMngjKCDwEBAQMBOAIPMAULBAcJDy4sHQENBhuIFQy8GgEBCAIehhmDKoEZiHUFjiqJJYIRi2mPDI5/NyuCAxmBTDkuimMBAQE X-IPAS-Result: A0CjCADIyOdW/31nOrBdhBhtgm25YBmFdAKBbxABAQEBAQEBAWMngjKCDwEBAQMBOAIPMAULBAcJDy4sHQENBhuIFQy8GgEBCAIehhmDKoEZiHUFjiqJJYIRi2mPDI5/NyuCAxmBTDkuimMBAQE X-IronPort-AV: E=Sophos;i="5.24,338,1454972400"; d="scan'208";a="168687772" Received: from fehu.whitequark.org (HELO mail.whitequark.org) ([176.58.103.125]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 15 Mar 2016 09:36:14 +0100 Received: by mail.whitequark.org (Postfix, from userid 33) id 4FA3010C928; Tue, 15 Mar 2016 08:36:12 +0000 (UTC) To: "Soegtrop, Michael" X-PHP-Originating-Script: 1000:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 15 Mar 2016 11:36:11 +0300 From: whitequark Cc: caml-list@inria.fr In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CEA76CE@IRSMSX102.ger.corp.intel.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CEA76CE@IRSMSX102.ger.corp.intel.com> Message-ID: <921db39a51df11567295fcbbb1e6b394@whitequark.org> X-Sender: whitequark@whitequark.org User-Agent: Roundcube Webmail/1.1.4 Subject: RE: [Caml-list] [ANN] opam-cross-windows On 2016-03-15 11:26, Soegtrop, Michael wrote: > Dear Whitequark, > >> I've released opam-cross-windows[1], a 4.02.3 OCaml toolchain in the >> spirit >> of opam-cross-android[2] (ex opam-android). > > Do you think there are good chances that this also works for cross > compiling for MinGW on cygwin. > Or asked in another way: are there known reasons why this shouldn't > work? opam-cross-windows builds OCaml to run on top of bare Win32 i.e. it uses win32unix and otherwise embeds such assumptions in the compiler configuration. Since Cygwin is striving to present a Unix-like environment, those assumptions would not hold. So I don't think opam-cross-windows will work on Cygwin, sorry. > I made some scripts to compile things like GTK, pango, cairo, ocaml, > menhir, Coq, CoqIDE, ... for MinGW on cygwin and also to setup cygwin > with the required packages automatically in a reproducible way. A > MinGW cross Opam for cygwin would be the logical next step. Together > with my scripts this might be a reproducible and maintainable way to > compile and setup ocaml and required libraries on Windows. Perhaps. I find Cygwin annoying to deal with so I don't care for it much. Feel free to fork opam-cross-windows and reuse my technique to solve your problem. It can be adapted with minimal changes to almost any set of host and target systems, given that the OCaml buildsystem supports it. > One more question: on Windows there is (or was) a circular dependency > between flexdll and Ocaml. One of the two needs to be installed in > binary form. Did you also run into this issue? If so, how did you > solve it? Inherent deficiencies in the current OCaml buildsystem mean that any cross-compiler build requires an OCaml compiler targeting the build system, with exactly matching version and bitness. Similarly, since opam-cross-windows does not provide a compiler switch, an OCaml compiler is inherently present (and it is required anyway to compile packages which invoke build system components such as ppx, camlp4, cppo, etc). So, the need to build flexdll does not present a problem. > Btw: I also experimented with MSys, MSys2 instead of cygwin, but found > that cross compiling mayn packages for for MinGW under cygwin is > easier than under MSys, MSys2. Note that opam-cross-windows uses a toolchain that targets plain Win32 API without using any kind of POSIX emulation such as MSYS or Cygwin. > > 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, Christian Lamprechter > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 -- whitequark