Table Of Contents

Previous topic

glossary

Next topic

Changelog

This Page

Compiling pplacer from source

Important

We provide binaries on the main pplacer site and encourage their use. However, for those who want to be on the bleeding edge of development, here are instructions and scripts for setting up a compilation environment.

Compiling pplacer requires a number of libraries and tools to be installed:

On Debian/Ubuntu 12.04, everything but OPAM can be installed with:

apt-get install -y \
  camlp4-extra \
  gawk \
  libgsl0-dev \
  libsqlite3-dev \
  libz-dev \
  m4 \
  make \
  ocaml \
  patch

OPAM

pplacer uses the OPAM package manager for installing OCaml dependencies. OPAM can also manage different versions of the OCaml compiler - pplacer is tested against version 3.12.1.

See the the official instructions for installation details.

Once OPAM is installed, it needs to be configured:

# Install version 3.12.1 of the OCaml compiler version if it's not active
command -v ocamlc && ( ocamlc -version | grep -q 3.12.1 ) || opam switch install 3.12.1

opam init
opam repo add pplacer-deps http://matsen.github.io/pplacer-opam-repository
opam update pplacer-deps
eval `opam config env`

Building pplacer

Once the dependencies above are installed, navigate to the checkout of pplacer, and use OPAM to install the OCaml modules used by pplacer:

cd /path/to/pplacer
# Install required OCaml packages
cat opam-requirements.txt | xargs opam install -y

Finally, build pplacer, guppy and rppr with:

make

Now the binaries should be in the bin/ directory. Put them in your path and you are ready to go!