Error while building root from source code

Hello guys, i’m having problems installing and compiling root on Ubuntu.
I have downloaded from git repository with this

$ git clone --branch v6-22-00-patches https://github.com/root-project/root.git root_src

after this i made two directory (buildDIR and INSTALL) and in the build directory i run

cmake -DCMAKE_INSTALL_PREFIX=buildDIR ../

everything seems to work, but when i try to compile with

$ cmake --build . -- -j3

I’m having this error, anyone have a solution for this? thank you for the support!

 [CMake Error at /home/commodo98/programmi/root_src/buildDIR/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-Release.cmake:16 (message):
  Command failed: 2

   '/usr/bin/make'

  See also

    /home/commodo98/programmi/root_src/buildDIR/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log


CMakeFiles/XROOTD.dir/build.make:111: recipe for target 'XROOTD-prefix/src/XROOTD-stamp/XROOTD-build' failed
make[2]: *** [XROOTD-prefix/src/XROOTD-stamp/XROOTD-build] Error 1
CMakeFiles/Makefile2:251: recipe for target 'CMakeFiles/XROOTD.dir/all' failed
make[1]: *** [CMakeFiles/XROOTD.dir/all] Error 2
make[1]: *** waiting for unfinished processes.... ```

_Platform:_ ubuntu 18.04

Welcome to the ROOT Forum!
Maybe @oshadura can have an idea, but in the meanwhile, did you try to search the forum to see if there was a similar issue? For example, maybe this one could help: Unable to compile XROOTD

Could you please check logs here: /home/commodo98/programmi/root_src/buildDIR/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log ?

I have read the discussion but no solution has emerged.
I tried to check here
/home/commodo98/programmi/root_src/buildDIR/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log
but i don’t find build-*.log directory

I found a txt named XROOTD-build-err.log, i post what i found inside

[I] No git repository info found. Trying to interpret VERSION_INFO
[I] The XrdVersion.hh file already exists
/home/commodo98/programmi/root_src/buildDIR/XROOTD-prefix/src/XROOTD/src/XrdCl/XrdClFileStateHandler.cc:45:10: fatal error: uuid/uuid.h: File o directory non esistente
#include <uuid/uuid.h>
^~~~~~~~~~~~~
compilation terminated.
make[5]: *** [src/XrdCl/CMakeFiles/XrdCl.dir/XrdClFileStateHandler.cc.o] Error 1
make[4]: *** [src/XrdCl/CMakeFiles/XrdCl.dir/all] Error 2
make[3]: *** [all] Error 2

sudo apt-get install uuid-dev

I did, but still have problems

CMake Error at /home/commodo98/programmi/root_src/buildDIR/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-Release.cmake:16 (message):
  Command failed: 2

   '/usr/bin/make'

  See also

    /home/commodo98/programmi/root_src/buildDIR/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log


CMakeFiles/XROOTD.dir/build.make:111: recipe for target 'XROOTD-prefix/src/XROOTD-stamp/XROOTD-build' failed
make[2]: *** [XROOTD-prefix/src/XROOTD-stamp/XROOTD-build] Error 1
CMakeFiles/Makefile2:251: recipe for target 'CMakeFiles/XROOTD.dir/all' failed
make[1]: *** [CMakeFiles/XROOTD.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I search for the file and now i find :

[I] No git repository info found. Trying to interpret VERSION_INFO
[I] The XrdVersion.hh file already exists
XrdCl/libXrdCl.so.2.0.0: riferimento non definito a "uuid_unparse"
XrdCl/libXrdCl.so.2.0.0: riferimento non definito a "uuid_generate"
collect2: error: ld returned 1 exit status
make[5]: *** [src/xrdpfc_print] Error 1
make[4]: *** [src/CMakeFiles/xrdpfc_print.dir/all] Error 2
make[3]: *** [all] Error 2

Maybe you need to destroy your build directory and start completely from scratch again.

1 Like

mmm, yes it could be, i try

I’ve had a similar issue in several computers and always ended up disabling xrootd and cxxmodules when configuring with cmake.

What I do not understand is, if the issue was that ‘uuid-dev’ was missing, why doesn’t it complain about it in the ‘configure’ step?

I also get the uuid_unparse error after installing uuid-dev.

It looks exactly like this one:

It seems that after rebuilding, the configure command is not ‘updated’ and it misses adding -luuid to the g++ make command.

For me, just deleting the folder XROOTD-Prefix solved it, I didn’t need to recompile whole ROOT again.

I think you simply destroyed xroodt-prefix

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.