Help building root from source openSUSE Tumbleweed

I’m trying to build root from source following the tutorial in the install section. Have to build from source cause I’m using openSUSE Tumbleweed.
I’m having a problem with CMake: I have 3 folders in my home directory, root_build root_install and root_src. I am inside root_build and run the command

cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src

yet this gives the error “ROOT must be built out-of-source”.
I have no clue what I’m doing wrong, I’ve seen the issue usually means I have to make a build folder next to src and run the command from there… but that’s what I’m already doing.

Also since I’m already making a thread, is this also installing PyROOT or do I have to do something on top to use ROOT from python scripts?

Thanks for the help.

Hello and welcome to the forum!

Thanks for this post. What CMake is telling you is that you should invoke it from outside the source directory, for example in a build directory. Your set of directories could be:

  • root_install
  • root_src
  • root_build

and you should from within root_build invoke CMake as you did:

cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src

As for PyROOT, if you have a Python installation findable for CMake, you should be ok. At the end of the configuration CMake prints the root components that will be installed, pyroot should be there. In case it is not, telling warning messages are printed during the configuration, it should be easy for you to debug issues if there are any.

In case you need further help, do not hesitate to post!



As you can see from the image, I am already running CMake from root_build, but for some reason it thinks I am inside root_src. I don’t understand how to fix this.

Do you have any remnants of previous attempts in the src dir perhaps? Could you try from scratch?

Indeed that was the issue, thank you!
I still can’t seem to finish the installation though.
I apparently was missing two packages: libXft-devel and patch even though I ran both the required and optional packages installations for openSUSE listed.
Running everything from scratch again, it breaks when running build and install. I get this error which is too complex for me to parse

CMake Error at /home/leo/CernRoot/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-Release.cmake:49 (message):
  Command failed: 1

   '/usr/bin/cmake' '-DCMAKE_INSTALL_PREFIX:PATH=/home/leo/CernRoot/root_build/builtins/xrootd/XROOTD-prefix' '-DCMAKE_PREFIX_PATH:STRING=' '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_C_COMPILER=/usr/bin/cc' '-DCMAKE_C_FLAGS= -Wno-implicit-fallthrough -pipe -Wall -W -pthread' '-DCMAKE_CXX_COMPILER=/usr/bin/c++' '-DCMAKE_CXX_FLAGS= -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread ' '-DCMAKE_OSX_SYSROOT=' '-DCMAKE_OSX_DEPLOYMENT_TARGET=' '-DENABLE_PYTHON=OFF' '-DENABLE_CEPH=OFF' '-DWITH_OPENSSL3=TRUE' '-DCMAKE_INSTALL_RPATH:STRING=/home/leo/CernRoot/root_build/builtins/xrootd/XROOTD-prefix/lib64' '-GUnix Makefiles' '-S' '/home/leo/CernRoot/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD' '-B' '/home/leo/CernRoot/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-build'

  See also


gmake[2]: *** [builtins/xrootd/CMakeFiles/XROOTD.dir/build.make:92: builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:9437: builtins/xrootd/CMakeFiles/XROOTD.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

I checked the “see also” files and get the error

[31mCMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find libuuid (missing: UUID_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/Findlibuuid.cmake:55 (find_package_handle_standard_args)
  cmake/XRootDFindLibs.cmake:6 (find_package)
  CMakeLists.txt:26 (include)

inside XROOTD-configure-err.log which says I am missing libuuid: I googled and apparently this package on openSUSE is provided with libuuid1 which I do have installed. I guess since the names are slightly different this causes an error, but I don’t know how to fix it.

Hi Leonardo,

This error could be the cause:

Could you check that you have the uuid devel package installed? It’s that one that provides the header files necessary to build code incorporating the interfaces of the UUID library.

I hope this helps.


Okay so apparently installing libuuid-devel and re-running everything from scratch fixed it.
To sum everything up, if anybody needs this in the future, to install ROOT on openSUSE Tumbleweed (fresh install) you have to install the dependencies listed at Dependencies - ROOT but ALSO libXft-devel, patch and libuuid-devel

Thanks for the help!