caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] User Report: Cygwin32 OPAM for MinGW OCaml 64
@ 2015-09-30 15:00 Jun Furuse
  0 siblings, 0 replies; only message in thread
From: Jun Furuse @ 2015-09-30 15:00 UTC (permalink / raw)
  To: caml-list

Hi List,

I have played a bit with Cygwin OPAM to install packages for MinGW
64bit OCaml system, and finally got succeeded to install core_kernel
by `opam install core_kernel`.  It required several fixes of
OCaml+OPAM configurations and patching to packages but now I think I
got enough know-how and share it with the community.

To use Cygwin32 OPAM smoothly for MinGW64 OCaml you need:

* /usr/bin/ar of Cygwin32 did not work for MinGW OCaml 64. I had to
use a special ar command for MinGW64.
* Many build scripts assume Unix commands.  You need to add Cygwin's
/bin directory to Windows PATH
* global-config.config and system.comp must be fixed so that directory
and paths can be understandable by MinGW OCaml, a Windows app

Many packages can be installed without any modification to them.
Therefore Cygwin OPAM is already very useful for MinGW OCaml package
installation.  However, some packages required fixes and here are some
tips:

* Use "mixed path" obtained by cygpath -m, so that the paths can be
understandable both for Cygwin and for MinGW
* Build systems like Oasis executes commands not using /bin/sh but
cmd.exe in MinGW.  _oasis or setup.ml contains lots of Unix shell
phrases like   mkdir $dir; build something  which are wrongly executed
by cmd.exe.  You need to fix them so that they can be interpreted by
sh, i.e.  sh -c "mkdir $dir; build something"
* In Unix, files in xxx.install are ignored by OPAM when they are
already installed by OPAM's install section.  However, in Cygwin, it
sometimes fails.  It is due to Cygwin's special handling of files with
.exe extension.  You need remove entries from xxx.install if they are
installed by the install section.

I hope this information helps you.  More details or work log can be
found here: https://bitbucket.org/camlspotter/opamingw

Enjoy OPAMinGW!
Jun Furuse

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-30 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30 15:00 [Caml-list] User Report: Cygwin32 OPAM for MinGW OCaml 64 Jun Furuse

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).