Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Building PCRE-OCaml on Win32
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: brian donovan <lists@l...>
Subject: [Caml-list] Building PCRE-OCaml on Win32
With findlib/OCamlfind now working, I'm one step closer to getting OCaml 
HTTP going.

OCaml HTTP also requires OCamlnet (>= 0.94) and PCRE-OCaml (>= 4.28.2) 
and OCamlnet depends on Markus Mottl's PCRE-OCaml, so that's next up.    
As a newbie, I would normally post my questions to ocaml_beginners 
first, but a previous question in the same vein didn't elicit any 
responses there and though I emailed the author of the MinGW makefile 
(mentioned further on), I haven't yet received a reply.  I am using the 
MinGW port of OCaml 3.07 on WinXP for learning purposes and have a 
complete (all packages) Cygwin install.

If anyone has gotten PCRE-OCaml working on Win32 w/the MinGW port of 
OCaml 3.0.7 w/out MSVC installed, please skip the rest of my email 
(describing what I tried and what happened) and tell me what I need to do. 

The PCRE-OCaml 5.0.8 package (which you can browse here : 
<http://www.oefai.at/~markus/ocaml_sources/pcre-ocaml-5.08.0/> ... 
download here : 
<http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html>), dated in 
the README file as having been prepared in January 2003, contains a 
README.win32 file with instructions divided into two sections : "Install 
libpcre" and "Install ocaml-pcre" and advises at the top "Need Cygwin, 
MSVC, findlib.".  I do not have access to MSVC at present, but I was 
encouraged by the presence of a Makefile.mingw (itself dated November 
2003)  in the pcre_make.win32 folder alongside the Makefile.win32 
referenced in the "Install libpcre" portion of the win32 readme.

First, it occurred to me to wonder whether I did in fact need to install 
libpcre, as I have a full Cygwin install and I see pcre in the package 
list (<http://www.cygwin.com/packages/>).  So my first question is : if 
I already have pcre through Cygwin, do I still need this libpcre?

Assuming that I did need it, I tried following the instructions in the 
win32 readme for installing libpcre.

Unfortunately, there's an oddity in the win32 readme (aside from it not 
mentioning the presence of the Makefile.mingw).  The 4th step in the 
instructions for installing libpcre is "Read 'non-unix-use' and make 
changes [...]", but I've checked every file and  README.win32 contains 
the only instance of the phrase "non-unix-use" within any of the files 
in the package.

Skipping that step, I proceeded to : make -f Makefile.win32

Doing this, I knew that it probably would not work (because of skipping 
step 4 and also because I didn't have MSVC on my system).  Make stopped 
immediately with the message :

*** No rule to make target 'maketables.c', needed by 
'maketables.s.obj'.  Stop.

Then, I tried the MinGW makefile : make -f Makefile.mingw

Result :

*** No rule to make target 'pcre.mli', needed by 'pcre.cmi'.  Stop.

I then chanced the 2nd set of instructions ("Install ocaml-pcre"), 
hoping that maybe I didn't need libpcre but rather only ocaml-pcre.  The 
lib directory has its own Makefile.win32 and I followed the instructions :

make -f Makefile.win32 all

Make chugged for a second and produced the following lines (note : my 
OCaml install lives in C:/ocaml3.0.7) :

echo C:/ocaml3.0.7/lib
cl /nologo /c /MT pcre_stubs.c /Fopcre_stubs.s.obj /IC:/ocaml3.0.7/lib
make: cl: Command not found
make: *** [pcre_stubs.lib] Error 127

Checking the makefile, I saw the use of cl and Googled my problem.  It 
turns out that cl is MVC's compiler. 

Thanks for any advice.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners