Installation (old page)
- 1 Installing pre-compiled version of Bio++
- 2 Installing Bio++ from source files: the automatic way
- 3 Installing Bio++ from source files: the manual way
Installing pre-compiled version of Bio++
Pre-compiled distribution come as two flavors: rpm (RedHat Package Manager) and deb (Debian) packages, for 32 and 64 bits architectures. You can download the packages individually from the repository (see ), or configure your system to automatically fetch them (debian only).
You can find several type of packages:
- Packages for compiled program use,
- Packages for development and compilation of programs,
- Source packages (rpm only).
The last category is equivalent to the .tar.gz distribution. The first one provides the dynamic libraries, and is for using program developed using Bio++ and compiled dynamically. The second category is for developing or compiling a program with Bio++. It provides the static libraries and header files. It depends on the packages of the first category.
RPM packages are then installed using the command <source lang="bash"> rpm -i libbpp-XXXXX.deb </source> and DEB packages using the command <source lang="bash"> dpkg -i libbpp-XXXXX.deb </source> You will need root access to execute these commands. To install Bio++ locally, you have to install from sources.
DMG packages are available there  (compiled with a MacIntel computer).
Installing Bio++ from source files: the automatic way
This uses an installation file written in bash. start by dowloading it at  in a empty directory, and make it executable: <source lang="bash"> chmod +x bpp-setup.sh </source> The launch it <source lang="bash"> ./bpp-setup.sh </source> On some systems (Sun for instance), you may need to type <source lang="bash"> . ./bpp-setup.sh </source> instead. The script will check you have all required tools in the right place, download the sources, unpack, configure, compile and install them!
Note: Be sure to have the write access for the installation directory you chosed! In some cases, you will have to run it as super-user.
Installing Bio++ from source files: the manual way
Installation from source files is possible under Linux-like systems (Linux, Unix, MacOS X, CygWin).
Get the source files
Current version using the Version System (Git)
- Get yourself into the directory where you want the project files to be.
Each library will come in a separate directory.
- Then retrieve the libraries you need:
<source lang="bash"> git clone http://biopp.univ-montp2.fr/git/bpp-core git clone http://biopp.univ-montp2.fr/git/bpp-seq git clone http://biopp.univ-montp2.fr/git/bpp-phyl git clone http://biopp.univ-montp2.fr/git/bpp-popgen git clone http://biopp.univ-montp2.fr/git/bpp-raa git clone http://biopp.univ-montp2.fr/git/bpp-qt </source>
Archives from the source distribution (targz)
Archives of Bio++ are distributed via a bundle of source file archives on its website, .
- Download and copy the distribution (.tar.gz files) into a directory where you have writing rights,
- Decompress each archive file with the command
<source lang="bash"> tar xvzf archive.tar.gz </source>
Compiling and installing under Linux-like systems
From now, repeat the following steps for each library in the following order:
- bpp-phyl (optional)
- bpp-popgen (optional)
- bpp-raa (optional)
- <source lang="bash">cd</source> to the source directory,
- build the Makefile with cmake
<source lang="bash"> cmake . </source> The libraries will be installed in /usr/local, a location which requires superuser access rights. An alternative option consists in installing in the user home, for example in a subdirectory called .local. <source lang="bash"> cmake . -DCMAKE_INSTALL_PREFIX=$HOME/.local </source> The CMAKE_INSTALL_PREFIX variable specifies where the libraries should be installed. See Note 2 below.
- Build the library: <source lang="bash">make</source>
- Then install it: <source lang="bash">make install</source>
- You can also generate the API documentation by typing <source lang="bash">make apidoc</source>
- When installing the other libraries, if you have several versions of the libraries on your system (for instance one in /usr/local/ in addition to your own in $HOME/.local, you can tell cmake which version to link to by running
<source lang="bash"> cmake . -DCMAKE_INSTALL_PREFIX=$HOME/.local </source>
- If you install lour libraries in a non standard directory, you should tell where the dynamic libraries are. For example, with bash shell, you can add in your .bashrc:
<source lang="bash"> export CPATH=$HOME/.local/include # for compilation export LIBRARY_PATH=$HOME/.local/lib # for compilation export LD_LIBRARY_PATH=$HOME/.local # for execution </source>
- If you are updating a library and encounter compatibility problems for test programs, you should add the option -DBUILD_TESTING=OFF
so that new libraries are installed without any compilation of the test programs.
- Usage of a debugger is possible if the option -DCMAKE_BUILD_TYPE=Debug is added to the cmake command line.
- On some 64bits systems, 64-bits libraries have to be installed in lib64 instead of lib. This can be achieved by passing the -DLIB_SUFFIX=64 option to cmake.