Error when building ROOT from source - build step for 'XROOTD'

ROOT Version: ROOT 6.34.04
Platform: CentOS Stream 9
Compiler: gcc

I am currently trying to build ROOT from the source on CentOS, and when running the command cmake --build . --target install [-- builtin_xrootd=OFF] I receive this error:

CMake Error at /usr/bin/root_builddir/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-Release.cmake:49 (message):
  Command failed: 2

   '/usr/bin/gmake'

  See also

    /usr/bin/root_builddir/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log


gmake[2]: *** [builtins/xrootd/CMakeFiles/XROOTD.dir/build.make:86: builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:9470: builtins/xrootd/CMakeFiles/XROOTD.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

This is the content of the log file:

[I] No git repository info found. Trying to interpret VERSION_INFO
[I] The XrdVersion.hh file already exists
/usr/bin/ld: XrdCl/libXrdCl.so.3.0.0: undefined reference to `uuid_unparse'
/usr/bin/ld: XrdCl/libXrdCl.so.3.0.0: undefined reference to `uuid_generate'
collect2: error: ld returned 1 exit status
gmake[5]: *** [src/CMakeFiles/xrdreplay.dir/build.make:99: src/xrdreplay] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:367: src/CMakeFiles/xrdreplay.dir/all] Error 2
gmake[3]: *** [Makefile:136: all] Error 2

I have already tried installing xrootd myself, which is why I started running cmake with the option -- builtin_xrootd=OFF. I also tried enabling the powertools repo (crb) and running the command again to possibly resolve dependency issues, but neither of these solutions worked.

Thanks!

Did you install all dependencies first including uuid?
See e.g. Install ROOT with TUnuran class - #9 by vpadulan

You may (or may not) also need to apply this PR: [cmake] replace custom FindLibuuid.cmake with upstream version by silverweed · Pull Request #16971 · root-project/root · GitHub

Yes, I installed the dependencies listed that were required for building on CentOS from the page linked on the ROOT site including uuid, but I ended up having to install some of the optional ones like libuuid-devel to resolve an error I was receiving prior to my current issue. However, I didn’t delete and start my build from scratch after installing libuuid-devel as the post you linked suggests so I may try that.

I restarted my build and after running the command cmake -DCMAKE_INSTALL_PREFIX=<installdir> <sourcedir> I received a warning to set the variable XRootD_DIR to XRootDConfig.cmake. So I made a shell script in /etc/profile.d with this in the script:

 export XRootD_DIR=XRootDConfig.cmake

I restarted my laptop and the build ended up finishing 100% without errors after I ran the command cmake --build . --target install.

However, now there is nothing in my install directory, so when I try to enable ROOT in my environment using source <installdir>/bin/thisroot.sh it doesn’t work since there is no script in that directory.

Why not running it directly from the build directory? No need to install, just source builddir/bin/thisroot.sh