caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: whitequark <whitequark@whitequark.org>
To: "Soegtrop, Michael" <michael.soegtrop@intel.com>
Cc: caml-list@inria.fr
Subject: RE: [Caml-list] [ANN] opam-cross-windows
Date: Tue, 15 Mar 2016 11:36:11 +0300	[thread overview]
Message-ID: <921db39a51df11567295fcbbb1e6b394@whitequark.org> (raw)
In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CEA76CE@IRSMSX102.ger.corp.intel.com>

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

  reply	other threads:[~2016-03-15  8:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-13  9:02 whitequark
2016-03-14 19:55 ` Martin DeMello
2016-03-14 20:14   ` Adrien Nader
2016-03-14 20:26     ` Martin DeMello
2016-03-14 20:39       ` Adrien Nader
2016-03-14 21:10         ` Martin DeMello
2016-03-15  8:37       ` whitequark
2016-03-15  8:26 ` Soegtrop, Michael
2016-03-15  8:36   ` whitequark [this message]
2016-03-15  8:53     ` Soegtrop, Michael
2016-03-15  8:56       ` whitequark
2016-03-15 11:29         ` Soegtrop, Michael
2016-03-16 14:27       ` Andreas Hauptmann
2016-03-15  9:18     ` Adrien Nader
2016-03-15  9:12   ` David Allsopp
2016-05-20 18:38 ` Boutillier, Pierre
2016-05-20 18:45   ` whitequark
2016-05-23  8:24     ` Soegtrop, Michael
2016-05-24  6:57       ` whitequark
2016-05-24 12:35         ` Adrien Nader
2016-05-23  9:53   ` Mauricio Fernández

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=921db39a51df11567295fcbbb1e6b394@whitequark.org \
    --to=whitequark@whitequark.org \
    --cc=caml-list@inria.fr \
    --cc=michael.soegtrop@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).