caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Building pcre-ocaml 7.0.2 on MinGW
@ 2013-06-19 14:36 David Allsopp
  2013-06-19 14:43 ` Markus Mottl
  0 siblings, 1 reply; 5+ messages in thread
From: David Allsopp @ 2013-06-19 14:36 UTC (permalink / raw)
  To: OCaml List

It's been a while since I refreshed my OCaml installation from 3.12.1 but
having discovered that GADTs may really be the best thing since sliced
bread, I've been upgrading all my OCaml packages on Windows.

I'd noticed when I last refreshed (pcre-ocaml 6.2.5 / pcre 8.21) that pcre
8.21 no longer built under Windows but on that occasion I was lazy and stuck
with pcre 8.12 as that did build. This time, I've managed to get pcre 8.33
and pcre-ocaml 7.0.2 compiled under MinGW (32-bit) but with some very hacky
effort required.

Wondering if anyone else has succeeded doing this and whether there are any
GNU autotools experts here who might be able to provide pointers to the
weird problem with libtool before I brave posting to the autotools list! :o)

(Background: Windows Vista VM running Cygwin 1.7.20, GCC 4.5.3)
Configured PCRE with:
./configure --prefix="C:/Dev/OCaml" --includedir="C:/Dev/OCaml/lib"
--disable-cpp --enable-utf8 --host=i686-w64-mingw32 --build=mingw32

At this point, make all will freeze (completely crashes the terminal) when
it gets to libpcre.la. The same goes for PCRE 8.13, 8.20 and 8.21. A limited
comparison of the sources suggests that the issue is with libtool. The
workaround I've used is to configure PCRE 8.12 with the same switches and
then overwrite the libtool script in PCRE 8.33 with the one generated by
PCRE 8.12's configure. PCRE 8.12 is built with autoconf 2.65 where 8.33 is
built with autoconf 2.68 (I tried installing autoconf 2.65 and regenerating
the configure script in 8.33 but that didn't work either).

Having built PCRE 8.33 and installed it, it's necessary to produce a wrapper
.cmd file for pcre-config so that ocaml setup.ml -build works for pcre-ocaml
7.0.2 as unfortunately it's now using ocamlbuild rather than make (which
could use pcre-config directly).

With both of those shims in place, it does seem to be working - but has
anyone else been trying or experienced trouble building PCRE on Windows
since version 8.12? I haven't got the first clue how to debug libtool...


David


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-19 16:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19 14:36 [Caml-list] Building pcre-ocaml 7.0.2 on MinGW David Allsopp
2013-06-19 14:43 ` Markus Mottl
2013-06-19 15:08   ` David Allsopp
2013-06-19 16:32     ` Adrien Nader
2013-06-19 16:45       ` Markus Mottl

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