Ok, my advice is then to install ROOT’s dependencies using yum, then compile and install like this:
root $ mkdir build && cd build
build $ cmake .. -Drpath=ON -DCMAKE_INSTALL_PREFIX=/opt/root/<version> -CCMAKE_CXX_STANDARD=17 ...
build $ cmake --build .
build $ cmake --build . --target install
After that, rather than source thisroot.sh
, just do
export PATH=$PATH:/opt/root/<version>/bin
export PYTHONPATH=$(root-config --libdir)
in the shell where you want to use ROOT, not on your .bashrc
. That way you make sure not to mix up different versions of ROOT.
If you need to compile against a specific version of ROOT, use cmake -DCMAKE_PREFIX_PATH=/opt/root/<version> -DCMAKE_C_COMPILER=$(root-config --cc) -DCMAKE_CXX_COMPILER=$(root-config --cxx) ...
when configuring your own project.