![]() |
OpenMS
|
This document explains the procedure for building OpenMS from source.
If you only want to use the OpenMS PiPeline (TOPP), you are strongly encouraged to download the binary installer from the OpenMS website instead of building OpenMS from sources. Be aware though that we do not provide binary installers for every macOS version.
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.
In order to compile OpenMS, several applications need to be installed:
A compiler and its toolchain.
Apple Clang is the officially supported compiler on macOS for building OpenMS (GCC can be used at your own risk). OpenMS is tested with the Apple Clang toolchain that ships with the last three Xcode releases. Older Xcode versions may fail due to missing C++20 features.
A minimal installation of Apple Clang is achieved by downloading Apple's "Command Line Tools". However we suggest using a full Xcode installation from the Mac App Store. More details can be found on the Apple Developer Site.
A package manager for installing the remaining dependencies.
For installing dependencies we suggest using the Homebrew package manager. However, If you would rather built all dependencies from source code you can do so using the OpenMS contrib
directory. Details can be found in the section entitled Installing the contrib Package.
After installing Homebrew the following commands will install all needed dependencies for OpenMS:
brew uninstall
or at least brew unlink
them, so they are not used when building OpenMS.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):