Ocsigen platform installation

Preliminary warning

Ocsigen is a set of software projects with some dependencies to some well-spread OCaml modules. We do not provide binary packages ourselves, as we can't support all versions of all operating systems and software distributions.

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

Call for contributors

We are looking for testers and/or packagers on MacOS, Debian stable, Ubuntu, RedHat, Mandriva, etc If someone wants to test and adapt for Microsoft Windows, we will be happy to includes her changes.

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.

Source compilation

If the latest version of Ocsigen is not available in your distribution or if you want to install a development version, you may compile the whole Ocsigen platform.

Th 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

or on MacOS :

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

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

sudo ln -s /usr/local/Cellar/sqlite/3.7.15.2/lib/pkgconfig/sqlite3.pc \
  /usr/local/lib/pkgconfig/sqlite3.pc

Other ways to install Ocsigen:

Individual source package

The Ocsigen platform as a lot of 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