Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Road to native windows OCaml...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-10-14 (09:42)
From: Adrien <camaradetux@g...>
Subject: Re : [Caml-list] Road to native windows OCaml...
2008/10/14, Daniel Bünzli <>:
> Le 14 oct. 08 à 09:59, David Allsopp a écrit :
>> Can I ask what the motivation is for this (out of interest, not
>> criticism)?
> Maybe because if you want to distribute executables using cygwin you
> have to release your code under a GPL compatible license [1].
> Daniel
> [1]

I would give another explanation : cygwin is big and slow.
A base cygwin install is at least 1GB (when fully configured, after
carefully reviewing *each* package), a regular one is 2GB. XP itself
is not that big, I've not seen many applications that big, only CAD
Cygwin is also slow, though it will probably not impact a student use
(networking is slower due to the translation, I have mldonkey in
mind). ./configure are also painfully slow, the need to run several
small commands where startup time is more important than runtime gives
cygwin no chance [1].

On the other hand, mingw on its own is about 80MB. If you add a few
things, it will weight at most 200MB which is 10 times smaller than
the cygwin solution.

I forgot to mention that cygwin has some dead packages. Look at the
gtk package, it hasn't been updated in 6 ( six ) years !

But there's something that is worth being mentionned :
cross-compilation. Of course it won't help if you want to use the
toplevel under windows but it definitely helps when building for
A few months ago I got interested in webkit, especially webkit-gtk.
Webkit is one of the most advanced web content rendering engine
available, it is a big application which takes longer to compile than
ocaml, produces a library that is about 10MB (and 300MB with debug
enabled). It has a "native" windows version ("port" is the usual
terminology but would be misleading here) and a gtk one (and qt, wx,
java). I wanted to have webkit-gtk under windows but don't really like
COM and VS-specific things which the native version uses.
Msys/mingw has been a failure, autotools gave me headaches and I gave
up when it started asking me for perl. Cygwin has been about the same,
autotools hell and gtk problems. Then I tried cross-compilation, I had
to change about ten lines in the whole webkit sourcecode, specifiy a
few libraries to link with, nothing more. No autotools problems, no
pkg-config hell, no unbearable shell, fully-functionnal perl, most
recent versions of gcc/g++ and friends. This produced a well-working
webkit-gtk library the first time it compiled (there's a *gtk* bug on
xp though, vista unaffected). Sure it can be compiled while staying on
windows, it just takes months (I helped somebody who succeeded) and
does not even work correctly ! [2]

Please ocaml gods, give us a cross-compiler or at least tell us the
plans regarding cross-compilation. :)

[1] no article but I experimented and in time needed by configure, it
is linux < mac osx < msys/mingw < cygwin/mingw. ./configure runs take
about 10 to 20 more time under cygwin than under linux and only about
4 more time under msys. It gets quickly painful, 2 seconds per
configure line when there will be 300 lines is hard to stand.



Adrien Nader

> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports: