Ocsigen platform installation

Preliminary notice

Ocsigen is a set of software projects with some dependencies to some well-spread OCaml modules.

Many software distributions come with Ocsigen packages, and the following compiling instructions should work with very few changes on most Unix systems (Linux, MacOS, FreeBSD ...).

Installation with Opam

If you want to compile Ocsigen packages, the recommended way is to use the OPAM package manager:

sudo aptitude install libev-dev libgdbm-dev libncurses5-dev libpcre3-dev 
                      libssl-dev libsqlite3-dev libcairo-ocaml-dev m4
                      opam camlp4-extra

or on MacOS :

brew install ocaml opam libev gdbm pcre openssl pkg-config sqlite3

On MacOS, after installing sqlite3 and pkg-config, you need to tell pkg-config where is the sqlite3.pc file using

brew link --force sqlite3

Binary distribution

Ocsigen is available in some software distributions, e.g.:

If your distribution has all the packages you need, this is probably the simplest way to install Ocsigen software. But be careful to install the last stable version available on this Web site.

Individual source package

The Ocsigen platform as external dependencies, and building each project individually may be a long process. Here the consolidated list of dependencies in the order you may build them.

Consolidated dependencies

C libraries

On Debian based system:

sudo aptitude install libev-dev libgdbm-dev libncurses5-dev libpcre3-dev 
                      libssl-dev libsqlite3-dev libcairo-ocaml-dev
OCaml libraries

On Debian based system:

sudo aptitude install ocaml ocaml-compiler-libs 
                      camlp4 camlp4-extra 
                      ocaml-findlib libfindlib-ocaml-dev 
                      libreact-ocaml-dev libssl-ocaml-dev libpcre-ocaml-dev 
                      libcryptokit-ocaml-dev libtext-ocaml-dev 
                      libcalendar-ocaml-dev libocamlnet-dev
Optionnal OCaml libraries

On Debian based system:

sudo aptitude install libsqlite3-ocaml-dev libzip-ocaml-dev 
                      libtype-conv-camlp4-dev ocamlduce

Build each projects separately

As this step, you may build the Ocsigen platform in this order:

Consolidated dependencies for Ocsimore

External C libraries

On Debian based system:

sudo aptitude install libpam0g-dev postgresql
External OCaml libraries

On Debian based system:

sudo aptitude install libextlib-ocaml-dev libcsv-ocaml-dev libpgocaml-ocaml-dev libpam-ocaml-dev