Install ROOT with TUnuran class

Dear ROOTers,
I would like to install ROOT with TUnuran class on Almalinux 9.
How can I make it right?

Thank you in advance.
Andrei.

Welcome to the ROOT forum,

Have you tried the recipe given here: Installing ROOT - ROOT ?

1 Like

Hi, Couet,

Thank you.
I am trying it now and getting such errors:

# cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src
...
-- Looking for Python
-- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Python3_NumPy_INCLUDE_DIRS Development NumPy Development.Module Development.Embed) (found version "3.9.18")
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Python2_INCLUDE_DIRS Python2_LIBRARIES Python2_NumPy_INCLUDE_DIRS Interpreter Development NumPy Development.Module Development.Embed) 
   Reason given by package: 
       Interpreter: Wrong major version for the interpreter "/usr/bin/python"

CMake Warning at cmake/modules/SearchRootCoreDeps.cmake:223 (message):
 No supported Python 2 or 3 development packages were found; PyROOT will not
 be built.
Call Stack (most recent call first):
 CMakeLists.txt:164 (include)
...
-- ROOT default compression algorithm: zlib
CMake Deprecation Warning at cmake/modules/RootBuildOptions.cmake:434 (message):
 >>> Option 'gfal' is deprecated and will be removed in the next release of
 ROOT.  Please contact root-dev@cern.ch should you still need it.
Call Stack (most recent call first):
 CMakeLists.txt:166 (include)
...
-- Looking for X11
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
 Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
 /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
 /usr/share/cmake/Modules/FindX11.cmake:457 (find_package_handle_standard_args)
 cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
 cmake/modules/SearchInstalledSoftware.cmake:366 (find_package)
 CMakeLists.txt:254 (include)


-- Configuring incomplete, errors occurred!
See also "/root/ROOT/root_build/CMakeFiles/CMakeOutput.log"

It looks like you do not have Python on your machine.

1 Like

Dear @andreik ,

There are a few errors preventing you from building ROOT properly, let’s address them separately

Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Python3_NumPy_INCLUDE_DIRS Development NumPy Development.Module Development.Embed) (found version "3.9.18")

This line is telling you that your Python (version 3.9.18) does not have INCLUDE_DIRS,LIBRARIES, Numpy*. You need both the development Python package for your system and then you also need to install numpy on your machine.

Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)

This is telling you that you are missing the X11 libraries, also required for building ROOT.

In general, as per the ROOT installation instructions linked by @couet, you should take care of installing the required dependencies if you want to build ROOT manually.

Also, for Python specific dependencies, see our requirements.txt in the main folder of the project, root/requirements.txt at master · root-project/root · GitHub . A one liner could be

pip install -r $YOUR_ROOT_HOME/requirements.txt

Cheers,
Vincenzo

2 Likes

Thank you very much for your detailed answer, Vincenzo.

I’ve installed the dependencies and now there are no errors on
cmake -DCMAKE_INSTALL_PREFIX=…/root_install …/root_src

But when I type
cmake --build . – install -j4
there are such errors:

...
[ 53%] Building CXX object interpreter/llvm/src/lib/Support/CMakeFiles/LLVMSupport.dir/PrettyStackTrace.cpp.o
CMake Error at /root/ROOT/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-Release.cmake:49 (message):
  Command failed: 2

   '/usr/bin/gmake'

  See also

    /root/ROOT/root_build/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:9031: builtins/xrootd/CMakeFiles/XROOTD.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
...
[ 53%] Building CXX object interpreter/llvm/src/lib/Support/CMakeFiles/LLVMSupport.dir/Watchdog.cpp.o
[ 53%] Linking CXX static library ../libLLVMSupport.a
[ 55%] Built target LLVMSupport
gmake: *** [Makefile:156: all] Error 2

Could you please advise me what I have to do to finish the ROOT installation?

Thank you in advance,
Andrei.

The real error should be contained in this file, the rest of the trace you report is not informative.

Cheers,
Vincenzo

1 Like

Thank you, Vincenzo.

This is /root/ROOT/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-out.log:

[  0%] Built target XrdVersion.hh
[  2%] Built target XrdFrm
[  2%] Built target xrdpinls
[ 25%] Built target XrdUtils
[ 28%] Built target XrdCrypto
[ 29%] Built target xrdsssadmin
[ 29%] Built target XrdCryptoLite
[ 30%] Built target XrdSecpwd-5
[ 48%] Built target XrdServer
[ 49%] Built target XrdSec-5
[ 51%] Built target XrdXml
[ 51%] Built target xrdcrc32c
[ 53%] Built target XrdCryptossl-5
[ 54%] Built target xrdcks
[ 54%] Built target xrdgsiproxy
[ 54%] Built target XrdAppUtils
[ 55%] Built target XrdSecunix-5
[ 55%] Built target XrdCmsRedirectLocal-5
[ 56%] Built target xrdpwdadmin
[ 56%] Built target xrdacctest
[ 57%] Built target frm_xfragent
[ 58%] Built target cconfig
[ 59%] Built target XrdSecgsi-5
[ 59%] Built target XrdSecProt-5
[ 59%] Built target XrdSecgsiAUTHZVO-5
[ 59%] Built target mpxstats
[ 60%] Built target XrdBlacklistDecision-5
[ 60%] Built target XrdSecgsiGMAPDN-5
[ 61%] Built target xrdgsitest
[ 62%] Built target wait41
[ 62%] Built target XrdCksCalczcrc32-5
[ 62%] Built target frm_purged
[ 62%] Built target XrdXrootd-5
[ 63%] Built target xrootd
[ 63%] Built target XrdN2No2p-5
[ 64%] Built target XrdBwm-5
[ 64%] Built target XrdOssSIgpfsT-5
[ 64%] Built target XrdOfsPrepGPI-5
[ 65%] Built target XrdSsiShMap
[ 66%] Built target XrdThrottle-5
[ 67%] Built target XrdHttpUtils
[ 69%] Built target XrdOssCsi-5
[ 69%] Built target XrdSecsss-5
[ 73%] Built target cmsd
[ 75%] Built target frm_admin
[ 83%] Built target XrdCl
[ 83%] Built target frm_xfrd
[ 84%] Built target XrdHttp-5
[ 87%] Built target XrdPosix
[ 88%] Built target XrdClProxyPlugin-5
[ 88%] Built target XrdClRecorder-5
[ 90%] Built target XrdPfc-5
[ 90%] ESC[32mESC[1mLinking CXX executable xrdqstatsESC[0m
[ 90%] ESC[32mESC[1mLinking CXX executable xrdmapcESC[0m
[ 90%] ESC[32mESC[1mLinking CXX executable xrdreplayESC[0m

and this is /root/ROOT/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-err.log:

[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/xrdqstats.dir/build.make:100: src/xrdqstats] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:958: src/CMakeFiles/xrdqstats.dir/all] Error 2
gmake[4]: *** Waiting for unfinished jobs....
/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/xrdmapc.dir/build.make:99: src/xrdmapc] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:1013: src/CMakeFiles/xrdmapc.dir/all] Error 2
/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:1207: src/CMakeFiles/xrdreplay.d

These files are new. I just typed this once more:
cmake --build . – install -j4

Andrei.

Dear @andreik ,

That looks like a missing libuuid-devel package (or equivalent depending on your distribution). Also this package is indicated in the requirements page that I linked above. Please make sure that all requirements are installed.

Once that’s done, I suggest you delete completely your build directory and start a new ROOT build from scratch.

Cheers,
Vincenzo

1 Like

Dear Vincenzo,

Thank you very much for your advises. I deleted my build directory and built ROOT from scratch.
ROOT works now. But I still can’t use TUnuran class:

root [1] gSystem->Load("libUnuran");
Error in <TUnixSystem::FindDynamicLibrary>: libUnuran[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /root/ROOT/root_install/lib:.:/root/ROOT/root_install/lib:/lib64/glibc-hwcaps/x86-64-v3:/lib64/glibc-hwcaps/x86-64-v2:/lib64/tls/haswell/x86_64:/lib64/tls/haswell:/lib64/tls/x86_64:/lib64/tls:/lib64/haswell/x86_64:/lib64/haswell:/lib64/x86_64:/lib64:/usr/lib64/glibc-hwcaps/x86-64-v3:/usr/lib64/glibc-hwcaps/x86-64-v2:/usr/lib64/tls/haswell/x86_64:/usr/lib64/tls/haswell:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/haswell/x86_64:/usr/lib64/haswell:/usr/lib64/x86_64:/usr/lib64

Could you please be so kind to advise me how I can overcome it?

Thank you in advance,
Andrei.

Dear @andreik ,

The build options that you can specify to cmake when building ROOT manually are listed out at Building ROOT from source - ROOT . Among them, you will see there is unuran option (to be specified as cmake -Dunuran=ON) which you will need to enable unuran in your ROOT build. Also in this case, make sure that the unuran package is installed in your system before building.

Cheers,
Vincenzo

1 Like

Dear Vincenzo,

Should I install ROOT from the beginning with this unuran option or I can just configure it?

Andrei.

Dear @andreik ,

You can try reconfigure and rebuild, and double check in the CMakeCache.txt file of your build directory that you find unuran=ON written somewhere. Otherwise if this first attempt does not work, a clean build gives you that guarantee.

Cheers,
Vincenzo

1 Like

I’ve rebuilt ROOT with this option.
It works now.
Thank you very much!!!

Best Regards,
Andrei.

2 Likes

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