Romain Bardou wrote:
> Hi list,
> 
> 
> There has been some discussion during the last few months were some
> argued that there was not enough Windows users to test libraries. Well it
> happens that I need to compile Cryptokit for Windows. Here are my first
> results, which failed miserably. I'm using OCaml 3.12.
> 
> 
> 1) With Cryptokit 1.5.
> 
> INSTALL.txt states that I need findlib. I installed OCaml from:
>       http://protz.github.com/ocaml-installer/
> And it seems that ocamlfind is not installed by this tool. After more
> search I read here:
>       http://www.camlcity.org/archive/programming/findlib.html
> that "Volunteers are still wanted who port findlib to Windows and
> Macintosh."

findlib is perfectly ported, and has been for years (see Gerd's email) - you 
simply need to compile it.

All that's required is a recent Cygwin with the make, mingw64-i686-gcc-core and 
m4 packages (patch is a good idea as well).

Assuming a working OCaml environment (OCAMLLIB set with a correct *Windows* 
PATH etc). For findlib 1.2.7, you need to patch the configure script - find the 
line camlp4_dir=`camlp4 -where` and change it camlp4_dir=`camlp4 -where | tr -d 
'\015'` or you'll get a corrupt META file for camlp4.

It's built using ./configure && make all opt install

To compile Cryptokit with ZLIB support requires a patch (happy to send it - 
it's because of a limitation in OASIS - at least at the time I built it) but 
otherwise:

ocaml setup.ml -configure
ocaml setup.ml -build
ocaml setup.ml -install

While it's far from ideal, life is *much* easier on Windows with a compiler 
(i.e. building from sources). It's also a really good idea *not* to use spaces 
in anything (I use C:\Dev - although amusing that's had an issue with a buggy 
flexlink trying to write /dev/null!). Write your own software to handle spaces 
correctly, but don't expect Unix-only guys to think that way ;o)

With my last refresh of OCaml to 3.12.2, I produced fully automated scripts for 
Windows compilation - at some point, I'll try to chuck them up somewhere in 
case they're of use to others (but the recent work with GODI on Windows is much 
more promising than what I was doing...). If you're feeling brave, I'm happy to 
send the scripts and patches off-list (OCaml with findlib, extlib, calendar, 
pcre, csv, pgocaml, zlib, camlzip, openssl, cryptokit, ocamlnet, 
json-wheel/static, spidermonkey+spidercaml, ocamlsha and ocamldap)


David


-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to