Thursday, March 26, 2009

ocaml batteries on Ubuntu

OCaml is a functional programming language. I'm trying to learn it right now, but it clearly has a steep learning curve, especially if you aren't familiar with functional programming languages. It does seem impressive in many ways, but we'll see, eh?

Anyway, the standard library seems a little sparse, so I am trying to install 'batteries'. Turns out it wants some dependencies to build and they aren't entirely straightforward. Here's how to get it building:

sudo aptitude install libcamomile-ocaml-dev libzip-ocaml-dev libtype-conv-camlp4-dev
libsexplib-ocaml-dev libbin-prot-camlp4-dev libocamlnet-ocaml-dev

(do we need libmagic-ocaml-dev ??)
This is super weird, you have to configure the program as super user because it wants to make a directory for batteries in /usr/local. Anyway, here's the install

sudo ./configure
sudo make all opt install install-doc

And it does take forever to make the documentation (maybe 5 minutes to install on my computer).

No comments: