caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Building findlib/OCamlfind on Win32 system
@ 2004-05-10  5:59 brian donovan
  2004-05-10  8:21 ` Yutaka OIWA
  2004-05-10 11:22 ` Eugene Kotlyarov
  0 siblings, 2 replies; 6+ messages in thread
From: brian donovan @ 2004-05-10  5:59 UTC (permalink / raw)
  To: caml-list

Hello,

I posted this query to ocaml_beginners a few days ago and have received 
no replies as of yet.  Likewise my email to Yutaka Oiwa, the creator of 
the patch mentioned below.  I haven't approached findlib's author as he 
stated in the INSTALL file accompanying the findlib package that he does 
not have access to Windows systems or tools.  I'm reposting here in the 
hopes that there may be other Win32 OCaml users on Caml-list who've 
installed findlib ....

I'm an OCaml newbie (actually, I'm new to functional languages 
altogether and, for all intents and purposes, to compiled languages as 
well).  I've installed the standalone MinGW port of OCaml 3.0.7 on a 
WinXP system for learning purposes.

Aside from some probably to-be-expected problems (compiling a program 
that used Unix's fork, for example, prompted the compiler to complain 
that fork was not implemented, which I guess it may not have been in the 
MinGW 3.0.7 port), everything with the core seems fine.  I've been 
having some difficulties, probably due to my own ignorance more than 
anything else, today, however.  I don't know how many others on this 
list may have gone through the same process (or even how many of you are 
using OCaml on Win32, if any), so I'll spill my guts here and hope that 
I've done something obviously wrong that another member can point out.

I want to try to use "Zack's OCaml Http Daemon" module 
(<http://www.bononia.it/~zack/ocaml-http.en.html>), which relies on some 
libraries that aren't included with the default OCaml system :  findlib 
(>= 0.8), ocamlnet (>= 0.94), and pcre-ocaml (>= 4.28.2).  I began with 
findlib (available here : <http://www.ocaml-programming.de/packages/>).  
The current version is 1.0.4.  Findlib's author points out that for 
MinGW users, someone has prepared a patch to make findlib v0.8.1 work 
with MinGW port of OCaml.  I downloaded findlib 0.8.1 and the patch 
(from here : 
<http://www.ocaml-programming.de/packages/index-alt.html>).  I extracted 
the tarball, pasted the patch file into the top findlib directory and 
applied the patch (I've got the Cygwin toolchain installed).  Patch 
complained about an error when I applied it initially and suggested that 
I try using strip n when applying, so I started from scratch and used 
strip 1 :

patch -b -strip 1 -i patchfilename

This time, no error messages.  Great.

The rest of the build went fine : ./configure, make all, make opt, make 
install, and make clean (as recommended in the INSTALL file bundled with 
findlib).  I tried using findlib.  Nothing seemed to work except the 
command findlib ocamlbrowser, which launched a little 4 pane gui that 
listed most (but not all?) of the modules/libraries in the lib directory 
of my OCaml install (stublibs, labltk, findlib itself, forex were not 
visible - shouldn't they be?).  Trying other commands, like "ocamlfind 
query Unix" or "ocamlfind query Array" or "ocamlfind list" gave me nada 
- just a fresh prompt.

It occurred to me that perhaps my mistake was in building findlib 
outside of the file hierarchy of my OCaml install, so I re-extracted the 
contents of the findlib tarball, copied the extracted findlib folder 
into the lib directory, applied the patch, yadda yadda.  Same result.  
[Side question : when building libraries for OCaml on WIndows, does the 
location in relation to the OCaml install matter?]

Can anyone give me any tips on getting findlib/OCamlfind up and running 
properly on Win32?  I'd be very grateful.

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


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

end of thread, other threads:[~2004-05-10 18:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-10  5:59 [Caml-list] Building findlib/OCamlfind on Win32 system brian donovan
2004-05-10  8:21 ` Yutaka OIWA
2004-05-10 17:42   ` Solved! ... " brian donovan
2004-05-10 18:17     ` Yutaka OIWA
2004-05-10 11:22 ` Eugene Kotlyarov
     [not found]   ` <409F825B.4050006@lophty.com>
     [not found]     ` <409FA788.2000106@narod.ru>
2004-05-10 17:27       ` Solved ! ... " brian donovan

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