This document describes how to build OpenMS on a GNU/Linux system from source. If you do not have root privileges on your system, make sure you read the section Building without root privileges.
We are working on adding OpenMS to the repositories of the most popular distributions, but for many platforms the toolkit needs to be manually compiled on your system. The same applies if you want to use the most recent source files from our Git repository.
If you encounter errors during configuring/compiling our software, have a look at our Known Issues section, maybe the error is already known. If not, please write to the mailing list (open-ms-general AT lists.sourceforge.net) or report the error on our issue tracker.
You can find the links to the release and development versions on the Downloads page of the OpenMS project.
From here on the instructions assume you have an extracted tar.gz of the Release and are inside its root, or checked out the development (Git) version by:
Before building from source, OpenMS requires several other libraries to be present on your system. Most of these should be available in the repositories of your GNU/Linux distribution.
For the libraries/versions often not found in those repositories, we provide sources and build scripts. The Release tar.gz archive contains the libraries in the contrib/ folder, if you build the Development (Git) version, you'll have to check them out separately (see below in Building remaining dependencies and in Building without root privileges).
Required packages and libraries
For the most common distributions, these commands will install most of the libraries. The most complete list of packages is listed for Ubuntu:
Fedora packages | sudo yum groupinstall 'Development Tools' sudo yum install git tar sudo yum install epel-release # Update repo list for the thirdparty repository EPEL sudo yum repolist # Get installable contrib libraries sudo yum install qt4 qt4-devel qt4-webkit-devel python-devel boost-devel \ libsvm-devel glpk-devel libzip-devel zlib-devel xerces-c-devel bzip2-devel |
OpenSuse 11.1 (list outdated) Use package names of other distros listed here as a basis to search native packages . | sudo zypper install cmake gcc-g++ autoconf libqt4-devel |
Ubuntu/Debian (10.04/6.0 or later recommended, tested on 15.10) | sudo apt-get install cmake g++ autoconf qt4-dev-tools patch libtool make git \ libqt4-core libqt4-dev libqt4-gui libqt4-opengl-dev automake libqtwebkit-dev sudo apt-get install libboost-regex-dev libboost-iostreams-dev libboost-date-time-dev libboost-math-dev \ libsvm-dev libglpk-dev libzip-dev zlib1g-dev libxerces-c-dev libbz2-dev |
OpenMS conveniently provides its dependencies for download. The OpenMS Release package contains the sources of all dependencies in the contrib/ folder. For the Development (Git) version, this folder is not included, it has to be checked out separately (and referred to later). We generally recommend to keep the contrib separate from the OpenMS source code. Assuming you have extracted the the OpenMS source code in a folder ~/Development
(i.e., ~/Development/OpenMS
) we suggest to also put the contrib there (i.e., ~/Development/contrib
). For the contrib as well as for OpenMS we suggest to use out-of-source builds.
From the ./contrib-build/
folder, execute the following command to show the available build types
and then build SeqAn (the other build scripts may or may not be needed to be executed depending on if your distribution does not provide a package for the dependency):
To avoid problems while building the libraries contained in the contrib package, the path to your contrib-build directory should not have any spaces in it.
If you are on a system without root access (e.g. a shared cluster), there are some additional considerations, especially regarding dependencies. Specifically, some older Red Hat systems have older libraries installed that may interfere with the newer versions that OpenMS requires. The recommended installation procedure is to use the contrib package to compile all dependencies from source:
Alternatively, you can build one package after the other by providing -DBUILD_TYPE=...
with the appropriate argument. In addition, you may have to compile Qt yourself which you can get from http://download.qt.io/official_releases/qt (use a 4.x version), if it is not provided on your server or the version on your environment is too old. Then you can use the traditional ./configure –prefix=/path && gmake && gmake install
sequence to compile and install Qt (note that you should set the –prefix=/path
to a local directory assuming you don't have root privileges).
When configuring OpenMS (see next section), consider setting WITH_GUI=Off
and HAS_XSERVER=Off
, especially as you may not have compiled Qt with OpenGL and you may not have an X server. If you want to use your own qt installation, be sure to set the QT_QMAKE_EXECUTABLE=/path/to/qmake
flag when using cmake to configure OpenMS. Finally, you may have to remove any system libraries from the CMAKE_PREFIX_PATH
to ensure that the correct version of each library is used.
It is assumed that you have successfully built and installed all dependencies and are in the root folder of the OpenMS tree (see above in Checkout OpenMS for instructions how to obtain OpenMS sources either from a release version or from the most recent development branch).
The next step is to create a build directory beside the OpenMS root directory e.g., OpenMS-build
(see above note on out-of-source builds).
In the OpenMS build directory we execute CMake to configure OpenMS. You should substitute /PATH/TO/contrib/
with the above path to the build contrib. Make sure you use the absolute (and not relative) path for the contrib to avoid any potential issues. If you encounter problems with previously installed system libraries, consider removing the /usr;/usr/local
part of the path:
In order to build the OpenMS library, the TOPP tools, tests, and this documentation, execute the following command:
The previous step takes the most time, in the meanwhile you can prepare your environment for easy OpenMS usage:
Make sure to add /PATH/TO/OpenMS/lib/
(e.g. /home/smith/OpenMS/lib/) to the environment variable LD_LIBRARY_PATH. The best way is to edit $HOME/.bashrc
and add the following
The TOPP tools will be built in the /PATH/TO/OpenMS/bin/ folder. Add this path to the environment variable PATH to use the commands anywhere on your system.
This is necessary to use the TOPP tools from TOPPView.
You can do this by appending the following also to your $HOME/.bashrc
(Do not use the tilde character ~ to abbreviate your home folder)
Apply both changes by executing
PATH
. Build them or download them from our thirdparty git repo and adapt the following for every thirdparty tool you want to use (shown for XTandem): If the build from Configuring and building OpenMS/TOPP is ready, you can now run a GNU/Linux OpenMS tool by e.g. executing
From here on you should be good to go! See below for advanced installation and configuration options.
Advanced users can list the separate make targets by calling:
You can set more CMake variables adding -DVARIABLE=VALUE
options in step Configuring and building OpenMS/TOPP.
The most important CMake variables are:
CMAKE_INSTALL_PREFIX | the path where the bin/ and lib/ directories should be installed to (when sudo make install is wished for a system-wide install: e.g. -DCMAKE_INSTALL_PREFIX=/usr/local/) For development, install prefixes are not supported. In this case OpenMS must be built in place! |
CMAKE_PREFIX_PATH | Additional search path for the contrib libraries. If not set the location is assumed to be contrib/as packaged in the Release tar.gz. |
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'. |
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 behaviour 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. |
HAS_XSERVER | Defines if a running X Server is available when building OpenMS. As building parts of the documentation and running certain tests requires a running X Server, this flag can be used to disable those parts of the documentation and the tests that need an X Server. (Default: On) |
WITH_GUI | Defines if the OpenMS GUI tools (TOPPView, TOPPAS) should be built or not. These components need Qt > 4.7 which may not be available on some systems (specifically older CentOS / RHEL servers). If you plan to use OpenMS without a GUI, set this flag to "Off" (Default: On) |
ENABLE_TUTORIALS | Defines if OpenMS should build and install the pdf tutorials. (Default: On) |
SEARCH_ENGINES_DIRECTORY (optional) | The location where thirdparty search engines (X!Tandem, OMSSA, MyriMatch, MSGF+, Fido) are located. This directory should have the same structure as the example in the search engine repository at https://open-ms.svn.sourceforge.net/svnroot/open-ms/THIRDPARTY/SEARCHENGINES/. This directory is only needed to include thirdparty tools in the installer for OpenMS. For using/running thirdparty tools, see section Getting your environment ready to use OpenMS |
PYOPENMS | Use ON to also build the Python bindings, see also pyOpenMS (Python bindings). |
A full list of the CMake variables is shown when you execute
This works only after having executed cmake
once (see Configuring and building OpenMS/TOPP)
After you have installed OpenMS and TOPP, you should test your installation by executing the following command:
or
Using ctest you can also execute only a subset of tests by using the -R [REGEX] option and run tests in parallel using the -j parameter. For more information, consult ctest man page.
Will run all TOPP test using 4 jobs. Make sure that you have build all tests beforehand by executing
OpenMS / TOPP release 2.1.0 | Documentation generated on Fri Jan 6 2017 21:40:06 using doxygen 1.8.11 |