Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Building OpenMS on Linux

Read this section first!

This document addresses OpenMS users and explains the installation procedure for building OpenMS from its sources. On Linux, this the most common way to install OpenMS even though we provide binary packages for select Linux distributions and versions of OpenMS. Be aware though that we do not provide binary installers for every Linux distribution. For more information read the install instructions for the TOPP binaries.

This document especially considers the installation of several libraries which are required by OpenMS. Most of these libraries are made available in our "contrib-package" (see below).
If you encounter errors during configuring/compiling our software, have a look at our "Known Issues" section (documentation), maybe the error is already known. If not, please write to the mailing list.

Required applications

In order to compile OpenMS, several applications need to be installed:

If your OpenMS version is a development version from SVN, the following applications are needed in order to create the OpenMS documentation:

Here is a list of package names that might help you (might change with newer distributions).

Fedora OpenSuse 11.1 Ubuntu 8.10 and later Debian (Lenny)
cmake
gcc, gcc-g++
autoconf, autoconf-2.6*
qt-devel also look here
cmake
gcc-g++
autoconf
libqt4-devel
cmake
g++
autoconf
qt4-dev-tools
patch
libtool
cmake
g++
autoconf
qt4-dev-tools
patch
libtool
make

Installing the contrib package

OpenMS depends on several external libraries, namely Boost, GSL, libSVM, SeqAn, glpk, zlib, libbz2 and Xerces-C. There are two ways to install them: i) use the "contrib" package provided by OpenMS and compile them from source or ii) use the distributions package management.

Installing the dependencies from source

In order to facilitate the installation of the libraries required for OpenMS, we composed a "contrib-package" containing the libraries Boost, GSL, libSVM, SeqAn, glpk, zlib, libbz2 and Xerces-C.

The contrib package is contained in the OpenMS release package and is available under the path contrib in the OpenMS directory.

If you are using the developer version of OpenMS, you must check out the contrib from Sourceforge SVN repository

  > svn co https://open-ms.svn.sourceforge.net/svnroot/open-ms/contrib
  

CMake is used to check the system and create the contrib libraries.
Go to the contrib directory and execute the following command:

  > cmake .
  

If everything worked, the following sub-directories were created under contrib :

Note
To avoid problems while building the libraries contained in the contrib package, the path to your contrib directory should not have any spaces in it.

Installing the dependencies from the distribution

All OpenMS dependencies (except SeqAn) can be installed using the package management on many major Linux distributions. Depending on your internet connection, this may be faster for you. For Ubuntu (12.04) and Debian please install the following packages:

  libxerces-c-dev libgsl0-dev libboost-regex-dev libboost-iostreams-dev libboost-date-time-dev libboost-math-dev libsvm-dev libglpk-dev libzip-dev zlib1g-dev 
  

Once these are installed, you will still need SeqAn, for this follow the instructions above (section section Installing the dependencies from source) and configure with

  > cmake -DBUILD_TYPE=SEQAN .
  
Note
When compiling OpenMS (see section Installing OpenMS/TOPP below) you will need to set the following CMake flags:

-DCMAKE_FIND_ROOT_PATH="/usr;/usr/local" and -DBOOST_USE_STATIC=OFF to enable CMake to find the correct libraries and to disable static linking of the Boost libraries.


Installing %OpenMS/TOPP

You need to get the OpenMS source package from our website. The latest stable version of OpenMS can be found in the download page. For further (e.g. latest developer version from SVN) info see the download instructions.

If you have not installed the contrib libraries which OpenMS requires, please refer to the section Installing the contrib package above and install the contrib libraries.

CMake is used to check the system and create the main 'Makefile'.
Go to the OpenMS directory and execute the following command:

  > cmake .
  

You can set CMake variables using the -D VARIABLE=VALUE option. A full list of the CMake variables is shown when you execute

  > ccmake .
  

This works only after having executing cmake . before.

The most important CMake variables are:

INSTALL_PREFIX

the path where the library is installed.
Note: Moving the library after installing it is not possible! Please use this option to point CMake to the location OpenMS should be installed to.

For development, install prefixes are not supported. In this case OpenMS must be built in place!

CMAKE_FIND_ROOT_PATH Additional search path for the contrib libraries. If not set the location is assumed to be <path_to_OpenMS>/contrib.
QT_QMAKE_EXECUTABLE Defines the Qt 'qmake' application. The corresponding Qt installation is used.
CMAKE_BUILD_TYPE Should be either 'Release' (optimization enabled) or 'Debug' (debug info and precondition/postcondition checks enabled).
The default is 'Release'.
QT_DB_PLUGIN Defines the Qt database type. By default MySQL is used.
CMAKE_CXX_COMPILER Defines the C++ compiler to use.
CMAKE_C_COMPILER Defines the C compiler to use. This should match the C++ compiler. Mixing compilers (e.g., clang++ for C++ and gcc for C) can lead to undefined behavior as some internal settings (e.g., OpenMP support) are determined using the C compiler and are assumed to be the same for the C++ compiler.
SEARCH_ENGINES_DIRECTORY (optional) The location where the ID search engines are located. This directory should have the same structure as the one in the OpenMS svn repository. This directory is needed to build the installer for OpenMS.
PYOPENMS Use ON to also build the Python bindings, see also pyOpenMS (Python bindings).

After CMake was executed, you can list the make targets by calling:

  > make targets
  

In order to build the OpenMS library and TOPP tools execute the following command:

  > make
  

If you have chosen to use a install prefix via the INSTALL_PREFIX variable you should install the components using:

  > make install
	
Note
Make sure to add <path_to_OpenMS>/lib/ (e.g. /home/smith/OpenMS/lib/) to the environment variable LD_LIBRARY_PATH.
The TOPP tools are ready to use in the <path_to_OpenMS>/bin/ folder. To use the TOPP tools from TOPPView, you have to add this path to the environment variable PATH (do not use the tilde character ~ to abbreviate your home folder).

Testing your %OpenMS/TOPP installation

After you have installed OpenMS and TOPP, you should test your installation by executing the following command:

  > make test_build
  > make test
  
Note
To enable DB connectivity tests, use the following CMake parameters:
  • DB_TEST
  • DB_TEST_HOST
  • DB_TEST_PORT
  • DB_TEST_DB
  • DB_TEST_USER
  • DB_TEST_PW

OpenMS / TOPP release 1.11.1 Documentation generated on Mon Aug 18 2014 14:41:10 using doxygen 1.8.7