Skip to content

Instantly share code, notes, and snippets.

@bixel
Created February 21, 2020 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bixel/78ec481c92b1aa3728ce627f2d5f35e7 to your computer and use it in GitHub Desktop.
Save bixel/78ec481c92b1aa3728ce627f2d5f35e7 to your computer and use it in GitHub Desktop.
Installing ROOT from source :-)

Yet another set of instructions to install ROOT from source

After downloading/cloning the source (see root.cern.ch/downloading-root), I usually checkout whatever version I want to use

git checkout vX-XX-X

Change into the build/ directory (which is part of the project source for whatevery reason, but that seems not to interfere)

cd build

Call cmake with the following additional parameters to link to the correct python version.

cmake -DCMAKE_INSTALL_PREFIX=/opt/root \
  -DPYTHON_EXECUTABLE=$(which python3) \
  -DPYTHON_INCLUDE_DIR=$(python3-config --prefix)/include \
  -DPYTHON_LIBRARY=$(python3-config --prefix)/lib \
  ..

Now let the CPU do it's job

cmake --build . -- -j

Then I'll get some coffee... Do some other things... Get another coffee... And run

cmake --build . --target install

Finally make sure that you

source /opt/root/bin/thisroot.sh

before using root.

Here you go 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment