- Installing ROOT
- Download a pre-compiled binary distribution
- Install via a package manager
- Conda
- Linux package managers
- Fedora
- CentOS
- Arch Linux
- Gentoo
- Ubuntu and Debian-based distributions
- MacOS package managers
- Homebrew
- Macports
- LCG releases on CVMFS
- Pre-built ROOT without dependencies
- ROOT plus dependencies
- Gentoo Prefix on CVMFS
- Run in a Docker container
- Run on CERN LXPLUS
- Build from source
- Building ROOT from source
- Introduction
- Preparation
- Quick start
- Caveats
- ROOT, Python and PyROOT
- After v6.22
- CMake PYTHON_EXECUTABLE .
- Before v6.22
- Setting the C++ standard
- ROOT STL backports
- Enabling experimental features, aka ROOT7
- Building ROOT with CUDA support
- System-wide installation
- Location Independent Installation (gnuinstall=OFF)
- Fixed Location Installation (gnuinstall=ON)
- All build options
- Relevant CMake variables
- Additional variables
- External libraries
Installing ROOT
ROOT is available on Linux, Mac, and (as a beta release) on Windows.
The latest stable ROOT release is 6.24/00 (about ROOT versioning scheme).
There are several ways to install ROOT on your computer: they are all listed in the table of content on the right. Which one is best for you depends on your operating system and usage requirements. In all cases, make sure to always use the most recent ROOT release possible to get the latest bug fixes, features and quick user support.
Download a pre-compiled binary distribution
We distribute pre-compiled ROOT for several major Linux distributions as well as MacOS and (as a beta) Windows. The steps to install a pre-compiled binary are simple:
- Install all required dependencies with the system package manager
- Download the release for the desired platform and ROOT version
- Unpack the archive
- Add the ROOT libraries and executables to your environment by sourcing the appropriate thisroot.* script. These setup scripts can be found in the ROOT binary release, in the bin directory.
For example, on Ubuntu 19, a user could execute the following bash commands to install ROOT v6.22/00, after installing all required dependencies:
To avoid having to source thisroot.sh every time one needs to use ROOT, it is typical to add the instruction to .bashrc , .profile or analogous configuration files. Note, however, that sourcing thisroot.sh might interfere with ROOT versions installed with different methods.
Install via a package manager
Supported by the community: these packages are not maintained by the ROOT team, but by helpful members of the community. Please go through each package manager’s standard channels to report any related issue. If you package ROOT and would like to be added to the list below, please contact us by clicking the letter icon at the bottom of the page.
Conda
For any Linux distribution and MacOS, ROOT is available as a conda package. To create a new conda environment containing ROOT and activate it, execute
More instructions about using the conda package are available in this blog post.
Please report any issues with the conda package here.
On many Linux distributions, ROOT can be installed via Snap. For example, on Ubuntu:
See our dedicated blog post for more information, or visit the official ROOT Snap package page.
Linux package managers
ROOT can be directly installed from the operating system’s package manager in the following Linux distributions:
Fedora
Fedora’s ROOT package can be installed with
More typically, however, users will want more than just the base package. The full list of components can be seen at https://src.fedoraproject.org/rpms/root/ by clicking in one of the offered versions. To install ROOT with support for python and notebooks, for example, run
CentOS
ROOT is available on CentOS via EPEL. To install ROOT on CentOS, just run
Arch Linux
Arch’s ROOT package can be installed with
Gentoo
The Gentoo package for ROOT is sci-physics/root. It can be installed with
Ubuntu and Debian-based distributions
The ROOT team is working on the release of an official .deb package. More news on this topic very soon.
In the meanwhile, ROOT is available on Ubuntu via conda or our pre-compiled binaries.
MacOS package managers
Homebrew
On Mac, ROOT is also available as a homebrew formula. You can install it with
Macports
After installing macports, the ROOT port can be installed with
LCG releases on CVMFS
Pre-built ROOT without dependencies
If your platform mounts CVMFS (as, for example, CERN LXPLUS does), ROOT is directly available as an LCG release.
ROOT installations with minimal external dependencies are available for Fedora, Ubuntu, CentOS 7 and MacOS at:
For example, to set up ROOT 6.22/00 on a CentOS7 machine that already has all ROOT required dependencies installed, just run:
ROOT plus dependencies
On CentOS7, ROOT as well as its dependencies and many other packages are also available as an LCG view:
For example, to set up a full environment with ROOT 6.20/02 on CERN LXPLUS, you can run:
To check what ROOT version is contained in an LCG release, check lcginfo.cern.ch.
Gentoo Prefix on CVMFS
ROOT is also experimentally available in a Gentoo Prefix installation inside the contrib area of the SFT CVMFS repository. To use it from there, run
This will drop you into a new shell where all software from the prefix is available.
Run in a Docker container
ROOT Docker containers for several linux flavours are available at ROOT’s official DockerHub.
For example, to try out the latest ROOT release just run docker run -it rootproject/root .
Run on CERN LXPLUS
Users with a CERN computing account can simply connect to lxplus.cern.ch via SSH and start root : the latest stable version is installed as a normal system package.
Note that certain features (e.g. multi-threading capabilities) are not available on lxplus.cern.ch (or, equivalently, lxplus7.cern.ch ) due to incompatible versions of certain ROOT dependencies on CentOS7. You can use lxplus8.cern.ch to get access to CentOS8, where this limitation is not present.
Build from source
In case no other installation method is available, or if you want full control over the options ROOT is built with, it is possible to compile ROOT from source. See Building ROOT from source for detailed instructions.
As a quick summary, after installing all required dependencies, ROOT can be compiled with these commands on most UNIX-like systems:
Building ROOT from source
Introduction
ROOT uses the CMake cross-platform build-generator tool as the primary build system.
CMake does not build the project, it generates the files needed by your build tool (GNU make, Ninja, Visual Studio, etc) for building ROOT.
If you are really anxious about getting a functional ROOT build, go to the Quick Start section.
If you are a CMake novice, start on Basic CMake usage and then go back to the Quick Start.
The Options and the Variables section is a reference for customizing your build. If you already have experience with CMake, this is the recommended starting point.
Preparation
Make sure you have installed all required dependencies before building ROOT.
Quick start
The following are the basic instructions for UNIX-like systems. We will use the command-line, non-interactive CMake interface.
- Download and unpack the ROOT sources for a specific release (make sure to download the “Source distribution” and not a binary distribution) or simply clone ROOT’s git repository and check out the branch you would like to build, for example:
In the following we will refer to the directory where ROOT sources are (e.g. root_src above) as .
Create a directory for the build and a directory for the installation. It is not supported to build ROOT in the source directory. Then change ( cd ) to the build directory:
CMake will detect your development environment, perform a series of test and generate the files required for building ROOT. CMake will use default values for all build parameters. See the Build Options and Variables sections for fine-tuning your build This can fail if CMake cannot detect your toolset, or if it thinks that the environment is not sane enough. In this case make sure that the toolset that you intend to use is the only one reachable from the shell and that the shell itself is the correct one for you development environment. You can force CMake to use a given build tool, see the Usage section.
Proceed to use IDE project files or start the build from the build directory, after CMake has finished running:
The —build option tells cmake to invoke the underlying build tool (make, ninja, xcodebuild, msbuild, etc). The underlying build tool can also be invoked directly of course, but the cmake —build command is more portable. On UNIX systems (with make or ninja) you can speedup the build with cmake —build . — -jN where N is the number of available cores.
Setup ROOT in your environment:
To have ROOT setup automatically at each login, that command can be appended to a .profile , .login , .bashrc or equivalent configuration file.
Caveats
As it makes use of a C++ interpreter, ROOT has somewhat stricter requirements than other C++ libraries: applications that depend on ROOT must be compiled with the same C++ standard with which ROOT was compiled.
Also note that compatibility with compilers shipped with devtoolset s on CentOS or Red Hat is not guaranteed.
ROOT, Python and PyROOT
PyROOT, the set of Python bindings of ROOT, changed its structure and build/installation process in v6.22. In the following the main aspects are summarized for both after and before v6.22.
After v6.22
The main feature introduced in v6.22 concerning the PyROOT build system is the possibility to build for both Python3 and Python2 (MultiPython), available only if the version of CMake used to build is >= 3.14. In the following, build and installation processes both with CMake >= 3.14 and = 3.14
In this case, PyROOT libraries are built by default with both Python3 and Python2. For each Python version X.Y used to build PyROOT (e.g. 3.8, 2.7, etc.) the following libraries will appear both in the build directory and in the installation directory:
- libROOTPythonizationsX_Y.so
- libcppyX_Y.so
- libcppyy_backendX_Y.so
The following pure Python modules will appear as well:
If no option is specified, PyROOT will be built for the most recent Python3 and Python2 versions that CMake can find. If only one version can be found, PyROOT will be built only for that version. Moreover, for a given Python installation to be considered, it must provide both the Python interpreter (binary) and the development package. To build PyROOT, it is thus suggested to verify that python-dev is present and install it if not.
In order to build with specific Python installations (not necessarily the highest ones) hints to CMake can be provided by using -DPython2_ROOT_DIR=python2_dir and/or -DPython3_ROOT_DIR=python3_dir to point to the root directory of some desired Python installation. Similarly, Python2_EXECUTABLE and/or Python3_EXECUTABLE can be used to point to particular Python executables.
PyROOT can be built with only one version of Python even if multiple installations are present in the system. For this purpose, the option -DPYTHON_EXECUTABLE=/path/to/python_exec must be used to point to the desired Python installation. Note that if PYTHON_EXECUTABLE is specified, neither Python3_EXECUTABLE or Python2_EXECUTABLE will be taken into consideration.
When executing a Python script, the Python version used will determine which version of the PyROOT libraries will be loaded. Therefore, once the ROOT environment has been set (e.g. via source $ROOTSYS/bin/thisroot.sh ), PyROOT can be used from any of the Python versions it has been built for.
Example
The following other components are built and installed along with PyROOT:
- TPython : its library ( libROOTTPython.so ) is built only for the highest Python version that PyROOT is built with. Therefore, in a Python3-Python2 ROOT build, the Python code executed with TPython must be Python3-compliant.
- JupyROOT : built for both Python3 and Python2, it consists of a library libJupyROOTX_Y.so and a pure Python module JupyROOT .
- JsMVA : it consists of a pure Python module which can be used with both Python versions.
CMake PYTHON_EXECUTABLE .
Before v6.22
For ROOT = 6.22 by specifying -Dpyroot_legacy=ON . In this case the Python version used to build will be by default the one pointed by the executable python . A specific Python installation can be used by setting PYTHON_EXECUTABLE .
Setting the C++ standard
ROOT needs to be configured and built with the same C++ standard as the programs that will make use of it. The relevant cmake flag is CMAKE_CXX_STANDARD . For example, from the command line, the standard can be selected by passing one of 11, 14, 20,… such as -DCMAKE_CXX_STANDARD=14 .
ROOT STL backports
ROOT backports certain useful C++ standard library features to make them available in C++11, for example std::make_unique and std::string_view . The backports can be found here in the reference guide. The backports are disabled, falling back to the actual C++ standard library implementation if it provides it, depending for instance on the C++ standard ROOT is compiled with and the compiler version.
Enabling experimental features, aka ROOT7
New and improved versions of standard ROOT components are being implemented under codename ROOT7.
Turning on C++14 (see Setting the C++ standard) or higher will automatically enable ROOT7. Alternatively, you can explicitly enable ROOT7 with -Droot7=ON , which will in turn set the standard to C++14 if a value was not already specified by the user.
Building ROOT with CUDA support
To build ROOT with CUDA support, you need to have Nvidia’s CUDA Toolkit installed, and optionally Nvidia’s Cudnn library. The relevant CMake options to set are CMAKE_CUDA_HOST_COMPILER (usually set to the same as CMAKE_CXX_COMPILER ), and CMAKE_CUDA_STANDARD . Starting with ROOT 6.20.06 it is possible to set CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD to different values to allow to compile ROOT with C++17 while CUDA code with C++14 when using CUDA 9 or 10. In addition to these options, the relevant ROOT build options to enable are -Dcuda=ON -Dcudnn=ON -Dtmva-gpu=ON .
System-wide installation
There are two main methods of installing ROOT from source: location independent and fixed location. The former is advised for a personal installation of ROOT, while the latter for a system-wide installation. Both require to set the CMAKE_INSTALL_PREFIX variable at configuration time (its default is /usr/local if unset). The mode of installation is controlled via the gnuinstall option during configuration.
Location Independent Installation (gnuinstall=OFF)
This is the configuration used by the binary releases on the website. This method requires setting environment variables such as PATH , LD_LIBRARY_PATH , and PYTHONPATH . This is usually done by sourcing the script bin/thisroot.sh or equivalent for your shell from the installation directory. The installation can be done by running
from the build directory. If ROOT is built with -Drpath=ON , then it is usually not necessary to set LD_LIBRARY_PATH after installation. It is also important to note that with this method it is usually not possible to customize installation paths like CMAKE_INSTALL_BINDIR , CMAKE_INSTALL_LIBDIR , etc.
Fixed Location Installation (gnuinstall=ON)
The fixed location installation method is enabled with -Dgnuinstall=ON at configuration time, which then also allows the tuning of destinations for the various components by setting the variables CMAKE_INSTALL_xxxDIR , where xxx is BIN , LIB , INCLUDE , etc. The full list is available in cmake/modules/RootInstallDirs.cmake inside the repository and also in the list of variables below. The fixed location installation method does not require setting any environment variables when ROOT is installed into default system paths (e.g. /usr , /usr/local ). However, if CMAKE_INSTALL_LIBDIR is a directory that is not searched for by the linker, it is recommended to enable -Drpath=ON or to add CMAKE_INSTALL_LIBDIR to /etc/ld.so.conf in order to avoid having to set LD_LIBRARY_PATH to be able to run ROOT. Nevertheless, it may still be necessary to set PYTHONPATH with this method if PyROOT is not installed into one of the system paths searched for by Python (run python -m site to see this list of paths). This can be done with export PYTHONPATH=$(root-config —libdir) if root-config is already in your PATH .
All build options
Each build option is a boolean variable that can be turned ON or OFF. The current value is recorded in the CMake cache (CMakeCache.txt file on the build directory) and therefore it is not needed to be specified on the cmake command each time. Please note that some of the options might be turned OFF automatically for some platforms or if the required external library or component can not be satisfied. The user can view and edit the full list of options using the ccmake utility or cmake-gui for Windows. Note that on Windows some of the options are not yet implemented.
The user can set any CMake variable or option that controls the build process from the cmake command line. Passing cmake -D = creates an entry in the CMake cache. The list of the ROOT-specific CMake options can be found below. Note: Some options have platform-dependent default values (e.g. cocoa is ON on apple)
Click on one of the following dropdowns to see the full list of build options for a specific ROOT release:
build options for ROOT 6.22
Build option | Effect | Default |
---|---|---|
alien | Enable support for AliEn (requires libgapiUI from ALICE) | OFF |
arrow | Enable support for Apache Arrow | OFF |
asimage | Enable support for image processing via libAfterImage | ON |
builtin_afterimage | Build bundled copy of libAfterImage | OFF |
builtin_cfitsio | Build CFITSIO internally (requires network) | OFF |
builtin_clang | Build bundled copy of Clang | ON |
builtin_davix | Build Davix internally (requires network) | OFF |
builtin_fftw3 | Build FFTW3 internally (requires network) | OFF |
builtin_freetype | Build bundled copy of freetype | OFF |
builtin_ftgl | Build bundled copy of FTGL | OFF |
builtin_gl2ps | Build bundled copy of gl2ps | OFF |
builtin_glew | Build bundled copy of GLEW | OFF |
builtin_gsl | Build GSL internally (requires network) | OFF |
builtin_llvm | Build bundled copy of LLVM | ON |
builtin_lz4 | Build bundled copy of lz4 | OFF |
builtin_lzma | Build bundled copy of lzma | OFF |
builtin_openssl | Build OpenSSL internally (requires network) | OFF |
builtin_pcre | Build bundled copy of PCRE | OFF |
builtin_tbb | Build TBB internally (requires network) | OFF |
builtin_unuran | Build bundled copy of unuran | OFF |
builtin_vc | Build Vc internally (requires network) | OFF |
builtin_vdt | Build VDT internally (requires network) | OFF |
builtin_veccore | Build VecCore internally (requires network) | OFF |
builtin_xrootd | Build XRootD internally (requires network) | OFF |
builtin_xxhash | Build bundled copy of xxHash | OFF |
builtin_zlib | Build bundled copy of zlib | OFF |
builtin_zstd | Build included libzstd, or use system libzstd | OFF |
ccache | Enable ccache usage for speeding up builds | OFF |
cefweb | Enable support for CEF (Chromium Embedded Framework) web-based display | OFF |
clad | Build clad, the cling automatic differentiation plugin (requires network) | ON |
cocoa | Use native Cocoa/Quartz graphics backend (MacOS X only) | OFF |
coverage | Enable compile flags for coverage testing | OFF |
cuda | Enable support for CUDA (requires CUDA toolkit >= 7.5) | OFF |
cudnn | Enable support for cuDNN (default when Cuda is enabled) | ON |
cxxmodules | Enable support for C++ modules | OFF |
dataframe | Enable ROOT RDataFrame | ON |
davix | Enable support for Davix (HTTP/WebDAV access) | ON |
dcache | Enable support for dCache (requires libdcap from DESY) | OFF |
dev | Enable recommended developer compilation flags, reduce exposed includes | OFF |
exceptions | Enable compiler exception handling | ON |
fcgi | Enable FastCGI suppport in HTTP server | OFF |
fftw3 | Enable support for FFTW3 | ON |
fitsio | Enable support for reading FITS images | ON |
fortran | Build Fortran components of ROOT | OFF |
gdml | Enable support for GDML (Geometry Description Markup Language) | ON |
gfal | Enable support for GFAL (Grid File Access Library) | ON |
gnuinstall | Perform installation following the GNU guidelines | OFF |
gsl_shared | Enable linking against shared libraries for GSL (default no) | OFF |
gviz | Enable support for Graphviz (graph visualization software) | OFF |
http | Enable suppport for HTTP server | ON |
imt | Enable support for implicit multi-threading via IntelВ® Thread Bulding Blocks (TBB) | ON |
jemalloc | Use jemalloc memory allocator | OFF |
libcxx | Build using libc++ | OFF |
macos_native | Disable looking for libraries, includes and binaries in locations other than a native installation (MacOS only) | OFF |
mathmore | Build libMathMore extended math library (requires GSL) | ON |
memory_termination | Free internal ROOT memory before process termination (experimental, used for leak checking) | OFF |
memstat | Build memory statistics utility (helps to detect memory leaks) | OFF |
minuit2 | Build Minuit2 minimization library | OFF |
mlp | Enable support for TMultilayerPerceptron classes’ federation | ON |
monalisa | Enable support for monitoring with Monalisa (requires libapmoncpp) | OFF |
mpi | Enable support for Message Passing Interface (MPI) | OFF |
mysql | Enable support for MySQL databases | ON |
odbc | Enable support for ODBC databases (requires libiodbc or libodbc) | OFF |
opengl | Enable support for OpenGL (requires libGL and libGLU) | ON |
oracle | Enable support for Oracle databases (requires Oracle Instant Client) | ON |
pgsql | Enable support for PostgreSQL | ON |
pyroot | Enable support for automatic Python bindings (PyROOT) | ON |
pyroot_legacy | Use legacy Python bindings for ROOT | OFF |
pythia6 | Enable support for Pythia 6.x | ON |
pythia6_nolink | Delayed linking of Pythia6 library | OFF |
pythia8 | Enable support for Pythia 8.x | ON |
qt5web | Enable support for Qt5 web-based display (requires Qt5WebEngine) | OFF |
r | Enable support for R bindings (requires R, Rcpp, and RInside) | OFF |
roofit | Build RooFit advanced fitting package | ON |
root7 | Build ROOT 7 components of ROOT (requires C++14 standard or higher) | ON |
rpath | Link libraries with built-in RPATH (run-time search path) | OFF |
runtime_cxxmodules | Enable runtime support for C++ modules | ON |
shadowpw | Enable support for shadow passwords | OFF |
shared | Use shared 3rd party libraries if possible | ON |
soversion | Set version number in sonames (recommended) | OFF |
spectrum | Enable support for TSpectrum | ON |
sqlite | Enable support for SQLite | ON |
ssl | Enable support for SSL encryption via OpenSSL | ON |
tcmalloc | Use tcmalloc memory allocator | OFF |
tmva | Build TMVA multi variate analysis library | ON |
tmva-cpu | Build TMVA with CPU support for deep learning (requires BLAS) | ON |
tmva-gpu | Build TMVA with GPU support for deep learning (requries CUDA) | OFF |
tmva-pymva | Enable support for Python in TMVA (requires numpy) | ON |
tmva-rmva | Enable support for R in TMVA | OFF |
unuran | Enable support for UNURAN (package for generating non-uniform random numbers) | OFF |
vc | Enable support for Vc (SIMD Vector Classes for C++) | OFF |
vdt | Enable support for VDT (fast and vectorisable mathematical functions) | ON |
veccore | Enable support for VecCore SIMD abstraction library | OFF |
vecgeom | Enable support for VecGeom vectorized geometry library | OFF |
vmc | Build VMC simulation library | OFF |
webgui | Build Web-based UI components of ROOT (requires C++14 standard or higher) | ON |
win_broken_tests | Enable broken tests on Windows | OFF |
winrtdebug | Link against the Windows debug runtime library | OFF |
x11 | Enable support for X11/Xft | ON |
xml | Enable support for XML (requires libxml2) | ON |
xproofd | Enable LEGACY support for XProofD file server and client (requires XRootD v4 with private-devel) | OFF |
xrootd | Enable support for XRootD file server and client | ON |
В | Auxiliary build options | В |
all | Enable all optional components by default | OFF |
asan | Build ROOT with address sanitizer instrumentation | OFF |
clingtest | Enable cling tests (Note: that this makes llvm/clang symbols visible in libCling) | OFF |
gminimal | Enable only required options by default, but include X11 | OFF |
minimal | Enable only required options by default | OFF |
rootbench | Build rootbench if rootbench exists in root or if it is a sibling directory. | OFF |
roottest | Build roottest if roottest exists in root or if it is a sibling directory. | OFF |
testing | Enable testing with CTest | OFF |
build options for ROOT 6.24
Build option | Effect | Default |
---|---|---|
alien | Enable support for AliEn (requires libgapiUI from ALICE) | OFF |
arrow | Enable support for Apache Arrow | OFF |
asimage | Enable support for image processing via libAfterImage | ON |
builtin_afterimage | Build bundled copy of libAfterImage | OFF |
builtin_cfitsio | Build CFITSIO internally (requires network) | OFF |
builtin_clang | Build bundled copy of Clang | ON |
builtin_cling | Build bundled copy of Cling | ON |
builtin_davix | Build Davix internally (requires network) | OFF |
builtin_fftw3 | Build FFTW3 internally (requires network) | OFF |
builtin_freetype | Build bundled copy of freetype | OFF |
builtin_ftgl | Build bundled copy of FTGL | OFF |
builtin_gl2ps | Build bundled copy of gl2ps | OFF |
builtin_glew | Build bundled copy of GLEW | OFF |
builtin_gsl | Build GSL internally (requires network) | OFF |
builtin_llvm | Build bundled copy of LLVM | ON |
builtin_lz4 | Build bundled copy of lz4 | OFF |
builtin_lzma | Build bundled copy of lzma | OFF |
builtin_nlohmannjson | Use nlohmann/json.hpp file distributed with ROOT | ON |
builtin_openssl | Build OpenSSL internally (requires network) | OFF |
builtin_openui5 | Use openui5 bundle distributed with ROOT | ON |
builtin_pcre | Build bundled copy of PCRE | OFF |
builtin_tbb | Build TBB internally (requires network) | OFF |
builtin_unuran | Build bundled copy of unuran | OFF |
builtin_vc | Build Vc internally (requires network) | OFF |
builtin_vdt | Build VDT internally (requires network) | OFF |
builtin_veccore | Build VecCore internally (requires network) | OFF |
builtin_xrootd | Build XRootD internally (requires network) | OFF |
builtin_xxhash | Build bundled copy of xxHash | OFF |
builtin_zlib | Build bundled copy of zlib | OFF |
builtin_zstd | Build included libzstd, or use system libzstd | OFF |
ccache | Enable ccache usage for speeding up builds | OFF |
cefweb | Enable support for CEF (Chromium Embedded Framework) web-based display | OFF |
clad | Build clad, the cling automatic differentiation plugin (requires network) | ON |
cocoa | Use native Cocoa/Quartz graphics backend (MacOS X only) | OFF |
coverage | Enable compile flags for coverage testing | OFF |
cuda | Enable support for CUDA (requires CUDA toolkit >= 7.5) | OFF |
cudnn | Enable support for cuDNN (default when Cuda is enabled) | ON |
cxxmodules | Enable support for C++ modules | OFF |
dataframe | Enable ROOT RDataFrame | ON |
davix | Enable support for Davix (HTTP/WebDAV access) | ON |
dcache | Enable support for dCache (requires libdcap from DESY) | OFF |
dev | Enable recommended developer compilation flags, reduce exposed includes | OFF |
distcc | Enable distcc usage for speeding up builds (ccache is called first if enabled) | OFF |
exceptions | Enable compiler exception handling | ON |
fcgi | Enable FastCGI suppport in HTTP server | OFF |
fftw3 | Enable support for FFTW3 | ON |
fitsio | Enable support for reading FITS images | ON |
fortran | Build Fortran components of ROOT | OFF |
gdml | Enable support for GDML (Geometry Description Markup Language) | ON |
gfal | Enable support for GFAL (Grid File Access Library) | ON |
gnuinstall | Perform installation following the GNU guidelines | OFF |
gsl_shared | Enable linking against shared libraries for GSL (default no) | OFF |
gviz | Enable support for Graphviz (graph visualization software) | OFF |
http | Enable suppport for HTTP server | ON |
imt | Enable support for implicit multi-threading via IntelВ® Thread Bulding Blocks (TBB) | ON |
jemalloc | Use jemalloc memory allocator | OFF |
libcxx | Build using libc++ | OFF |
macos_native | Disable looking for libraries, includes and binaries in locations other than a native installation (MacOS only) | OFF |
mathmore | Build libMathMore extended math library (requires GSL) | ON |
memory_termination | Free internal ROOT memory before process termination (experimental, used for leak checking) | OFF |
memstat | Build memory statistics utility (helps to detect memory leaks) | OFF |
minuit2 | Build Minuit2 minimization library | OFF |
mlp | Enable support for TMultilayerPerceptron classes’ federation | ON |
monalisa | Enable support for monitoring with Monalisa (requires libapmoncpp) | OFF |
mpi | Enable support for Message Passing Interface (MPI) | OFF |
mysql | Enable support for MySQL databases | ON |
odbc | Enable support for ODBC databases (requires libiodbc or libodbc) | OFF |
opengl | Enable support for OpenGL (requires libGL and libGLU) | ON |
oracle | Enable support for Oracle databases (requires Oracle Instant Client) | ON |
pgsql | Enable support for PostgreSQL | ON |
pyroot_legacy | Use legacy Python bindings for ROOT | OFF |
pyroot | Enable support for automatic Python bindings (PyROOT) | ON |
pythia6_nolink | Delayed linking of Pythia6 library | OFF |
pythia6 | Enable support for Pythia 6.x | ON |
pythia8 | Enable support for Pythia 8.x | ON |
qt5web | Enable support for Qt5 web-based display (requires Qt5WebEngine) | OFF |
r | Enable support for R bindings (requires R, Rcpp, and RInside) | OFF |
roofit | Build RooFit advanced fitting package | ON |
root7 | Build ROOT 7 components of ROOT (requires C++14 standard or higher) | ON |
rpath | Link libraries with built-in RPATH (run-time search path) | OFF |
runtime_cxxmodules | Enable runtime support for C++ modules | ON |
shadowpw | Enable support for shadow passwords | OFF |
shared | Use shared 3rd party libraries if possible | ON |
soversion | Set version number in sonames (recommended) | OFF |
spectrum | Enable support for TSpectrum | ON |
sqlite | Enable support for SQLite | ON |
ssl | Enable support for SSL encryption via OpenSSL | ON |
tcmalloc | Use tcmalloc memory allocator | OFF |
test_distrdf_pyspark | Enable distributed RDataFrame tests that use pyspark | OFF |
tmva-cpu | Build TMVA with CPU support for deep learning (requires BLAS) | ON |
tmva-gpu | Build TMVA with GPU support for deep learning (requries CUDA) | OFF |
tmva | Build TMVA multi variate analysis library | ON |
tmva-pymva | Enable support for Python in TMVA (requires numpy) | ON |
tmva-rmva | Enable support for R in TMVA | OFF |
unuran | Enable support for UNURAN (package for generating non-uniform random numbers) | OFF |
uring | Enable support for io_uring (requires liburing and Linux kernel >= 5.1) | OFF |
vc | Enable support for Vc (SIMD Vector Classes for C++) | OFF |
vdt | Enable support for VDT (fast and vectorisable mathematical functions) | ON |
veccore | Enable support for VecCore SIMD abstraction library | OFF |
vecgeom | Enable support for VecGeom vectorized geometry library | OFF |
vmc | Build VMC simulation library | OFF |
webgui | Build Web-based UI components of ROOT (requires C++14 standard or higher) | ON |
win_broken_tests | Enable broken tests on Windows | OFF |
winrtdebug | Link against the Windows debug runtime library | OFF |
x11 | Enable support for X11/Xft | ON |
xml | Enable support for XML (requires libxml2) | ON |
xproofd | Enable LEGACY support for XProofD file server and client (requires XRootD v4 with private-devel) | OFF |
xrootd | Enable support for XRootD file server and client | ON |
В | Auxiliary build options | В |
all | Enable all optional components by default | OFF |
asan | Build ROOT with address sanitizer instrumentation | OFF |
asserts | Enable asserts (is ON for CMAKE_BUILD_TYPE=Debug and dev=ON) | OFF |
clingtest | Enable cling tests (Note: that this makes llvm/clang symbols visible in libCling) | OFF |
gminimal | Enable only required options by default, but include X11 | OFF |
minimal | Enable only required options by default | OFF |
rootbench | Build rootbench if rootbench exists in root or if it is a sibling directory. | OFF |
roottest | Build roottest if roottest exists in root or if it is a sibling directory. | OFF |
testing | Enable testing with CTest | OFF |
Relevant CMake variables
Here are some of the CMake variables that are used often, along with a brief explanation and ROOT-specific notes. For full documentation, check the CMake docs or execute cmake —help-variable VARIABLE_NAME .
Variable | Type | Explanation |
---|---|---|
CMAKE_BUILD_TYPE | STRING | Sets the build type for make based generators. Possible values are Release, MinSizeRel, Debug, RelWithDebInfo and Optimized. On systems like Visual Studio the user sets the build type with the IDE settings. Default is RelWithDebInfo |
CMAKE_INSTALL_PREFIX | PATH | Path where ROOT will be installed if make install is invoked or the “INSTALL” target is built. |
CMAKE_C_FLAGS | STRING | Extra flags to use when compiling C source files. |
CMAKE_CXX_FLAGS | STRING | Extra flags to use when compiling C++ source files. |
BUILD_SHARED_LIBS | BOOL | Flag indicating if shared libraries will be built. Its default value is ON. |
CMAKE_Fortran_COMPILER | PATH | Full path to the Fortran compiler. Alternatively you can specify the environment variable FC before invoking cmake |
CMAKE_C_COMPILER | PATH | Full path to the C compiler. Alternatively you can specify the environment variable CC before invoking cmake |
CMAKE_CXX_COMPILER | PATH | Full path to the C++ compiler. Alternatively you can specify the environment variable CXX before invoking cmake |
CMAKE_INSTALL_BINDIR | PATH | Install destination for user executables (bin) |
CMAKE_INSTALL_LIBDIR | PATH | Install destination for object code libraries (lib or lib64 or lib/ on Debian) |
CMAKE_INSTALL_INCLUDEDIR | PATH | Install destination for C/C++ header files (include) |
CMAKE_INSTALL_SYSCONFDIR | PATH | Install destination for read-only single-machine data (etc) |
CMAKE_INSTALL_MANDIR | PATH | Install destination for man documentation (DATAROOTDIR/man) |
CMAKE_INSTALL_DATAROOTDIR | PATH | Install directory for read-only architecture-independent data (share) |
CMAKE_INSTALL_DATADIR | PATH | Install destination read-only architecture-independent data (DATAROOTDIR/root) |
CMAKE_INSTALL_MACRODIR | PATH | Install destination for ROOT macros (DATAROOTDIR/macros) |
CMAKE_INSTALL_ICONDIR | PATH | Install destination for icons (DATAROOTDIR/icons) |
CMAKE_INSTALL_FONTDIR | PATH | Install destination for fonts (DATAROOTDIR/fonts) |
CMAKE_INSTALL_SRCDIR | PATH | Install destination for sources (DATAROOTDIR/src) |
CMAKE_INSTALL_DOCDIR | PATH | Install destination for documentation root (DATAROOTDIR/doc/root) |
CMAKE_INSTALL_TESTDIR | PATH | Install destination for tests (DOCDIR/test) |
CMAKE_INSTALL_TUTDIR | PATH | Install destination for tutorials (DOCDIR/tutorials) |
CMAKE_INSTALL_ACLOCALDIR | PATH | Install destination for locale-dependent data (DATAROOTDIR/aclocal) |
CMAKE_INSTALL_ELISPDIR | PATH | Install destination for lisp files (DATAROOTDIR/emacs/site-lisp) |
CMAKE_INSTALL_CMAKEDIR | PATH | Install destination for cmake modules (DATAROOTDIR/cmake) |
Additional variables
A number of additional variables to control the way ROOT is built.
Variable | Type | Explanation |
---|---|---|
LLVM_BUILD_TYPE | STRING | Build type for the bundled LLVM. It is used to set the CMAKE_BUILD_TYPE for the /interpreter/ subdirectory |
External libraries
ROOT requires a number of external libraries that the CMake system needs to locate. The list of externals depends on the build options that have been enabled. CMake will look for these third party products at a number of standard places in your system but the user can influence the search by setting some environment variables before invoking the CMake command or by setting package specific CMake variables to their exact location.
The actual cached values used by CMake for the exact location of libraries and include files of the used external libraries can be inspected and modified using the ccmake utility.