![]() |
OpenMS
|
This document describes how to build OpenMS on a GNU/Linux system from source.
If you encounter errors while configuring or compiling OpenMS, search in the issue tracker for a possible solution. If an existing issue can't be found please report the error using the same issue tracker.
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.
We recommend installing all dependencies using your distribution's package manager. However, If you would rather built all dependencies from source you can do so using the OpenMS contrib
directory. Details can be found in the section entitled Using the contrib Package.
The OpenMS continuous build system uses Ubuntu and therefore build instructions for Ubuntu will be the most accurate.
Dependencies can be installed using the following commands:
make targets
.The TOPP tools should now be ready to use.
The applications are located in the $OPENMS_DIR/openms_build/bin
directory.
PATH
environment variable. You can find pre-built binaries in the OpenMS THIRDPARTY
directory. To use them set the PATH
environment variable using the following command: You can set more CMake variables adding -DVARIABLE=VALUE
options when calling CMake.
The most important CMake variables are:
OPENMS_CONTRIB_LIBS | Separate search path for the contrib libraries from github.com/OpenMS/contrib that is internally considered before CMAKE_PREFIX_PATH for searching, linking and adding include directories. |
---|---|
CMAKE_PREFIX_PATH | Additional search path for the contrib libraries. [MacOSX only] If you want to use libraries installed via Homebrew or MacPorts you might need to provide the corresponding paths
Please keep in mind that both Homebrew and MacPorts do not provide all libraries so you also need to specify the path to your self-build contrib via |
Qt6_DIR | Additional search path for the Qt6 CMake files. Use /PATH/TO/QT_INSTALLATION/lib/cmake/Qt6 as value, e.g. C:\dev\qt6\6.7.1\msvc2019_64\lib\cmake\Qt6 |
HAS_XSERVER=On/Off | [Linux/MacOS only] 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) |
ADDRESS_SANITIZER=On/Off | [g++/clang only] Enables/Disables Address Sanitizer (ASAN) to find access violations and other bugs. |
WITH_GUI=On/Off | Defines if the OpenMS GUI tools (TOPPView, TOPPAS) should be built or not. If you plan to use OpenMS without a GUI, set this flag to "Off" (Default: On) |
ENABLE_DOCS=On/Off | Enables documentation targets, allowing to build the OpenMS documentation. (Default: On) |
GIT_TRACKING=On/Off | Embed Git checksum into the library. (Default: On) |
ENABLE_UPDATE_CHECK=On/Off | Check online for OpenMS Updates upon invocation of any TOPP tool. (Default: On) |
CMAKE_BUILD_TYPE | [makefiles only; does not apply for XCode or VS] 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. |
MY_CXX_FLAGS | Additional custom C++ compile options you would like to add (must fit your chosen compiler). This might be useful, for example, for adding debug symbols to a Release build, or for performance analysis (e.g. for ... -DMY_CXX_FLAGS="-Og;-ggdb;-g3;-fno-omit-frame-pointer" ... ) |
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. |
SEARCH_ENGINES_DIRECTORY (optional) | The location where thirdparty search engines (X!Tandem, MSGF+) are located. This directory should have the same structure as the example in the search engine repository at https://github.com/OpenMS/THIRDPARTY after flattening for your platform. /. This directory is only needed to include thirdparty tools in the installer for OpenMS. |
PYOPENMS=Off/On | Create Python bindings, see also pyOpenMS (Default: Off) |
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. For development, install prefixes are not supported. In this case OpenMS must be built in place! |
After building OpenMS and TOPP, you should test your installation by executing the following command:
Under certain circumstances you may want to build all dependencies from source code. In order to facilitate the installation of the libraries required for OpenMS we provide a "contrib" package containing the following libraries: Boost, Eigen, libSVM, libHDF5, glpk, zlib, bzip2, CoinMP and Xerces-C.The following commands can be used to build all of these dependencies (assuming you have already cloned the OpenMS repository using the commands previously used in this document):
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. Details can be found in the section entitled Using the contrib Package.
If the graphical TOPP tools fail to start or exit with an error message related to Qt you may need to set the QT_QPA_PLATFORM
environment variable. This is especially true if you are executing the graphical tools remotely over a SSH-forwarded X11 connection.
Setting the QT_QPA_PLATFORM
environment variable to minimal
before running a TOPP tool should help. For example: