Home | News | Documentation | Download

ROOT on CENTOS 8, error in linking python Libraries

ROOT Version: v6-20-04
Platform: CentOS 8
Compiler: CMake 3.11.4
Python: 3.6.2
Package Manager: Conda


I built root using:

sudo cmake -DCMAKE_INSTALL_PREFIX=/home/user/root_install -DPYTHON_INCLUDE_DIR=/opt/anaconda3/envs/myenv/include/python3.6m -DPYTHON_LIBRARY=/opt/anaconda3/myenv/lib -DPYTHON_EXECUTABLE=/opt/anaconda3/envs/myenv/bin/python -Dpyroot=ON /home/user/root

After this installed using:

cmake --build . --target install

I get error at 96 percent.

[ 96%] Linking CXX shared library ../../lib/libPyROOT.so
CMakeFiles/PyROOT.dir/src/Converters.cxx.o: In function `PyROOT::TConverter::FromMemory(void*)':
Converters.cxx:(.text+0x27): undefined reference to `PyExc_TypeError'
Converters.cxx:(.text+0x36): undefined reference to `PyErr_SetString'
CMakeFiles/PyROOT.dir/src/Converters.cxx.o: In function `PyROOT::TConverter::ToMemory(_object*, void*)':

It continues after this.

collect2: error: ld returned 1 exit status
gmake[2]: *** [bindings/pyroot/CMakeFiles/PyROOT.dir/build.make:559: lib/libPyROOT.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:28988: bindings/pyroot/CMakeFiles/PyROOT.dir/all] Error 2
gmake: *** [Makefile:152: all] Error 2

How can I build root from source for my system?

Hello,

Since you are using conda anyway, would it be an option for you to use the ROOT conda package instead of building from source?

I am sorry but that won’t be an option. I am using a very strictly defined enviornment with >50 libraries locked into their versions. I must be able to use root from within this enviornment. I get conflicts when I install conda-forge root.

I have made some progress. I was able to build & install by using the location upto .so.m file, however when I import ROOT in python I get the following error:
Traceback (most recent call last):
File “”, line 1, in
File “/home/user/root_install/lib/ROOT/init.py”, line 31, in
importlib.import_module(librootpyz_mod_name)
File “/opt/anaconda3/envs/myenv/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /opt/anaconda3/envs/myenv/bin/…/lib/libstdc++.so.6: version `CXXABI_1.3.11’ not found (required by /home/user/root_install/lib/libtbb.so.2)

Hello,

In the past some problems have been reported when building ROOT with Anaconda’s Python. It seems that, to make it work, you need to compile ROOT with the same compiler that is shipped by Anaconda.

Another option is that you build ROOT with another Python that is not Anaconda’s.