ROOT 6.10 and PyROOT

Hi all,

I installed the latest version of ROOT in my local machine. The installation runs smoothly. However when I start a python prompt and try to do a import ROOT command, I get the following error:

Traceback (most recent call last):
File “”, line 1, in
File “/home/lsantos/root6_10/lib/ROOT.py”, line 24, in
import cppyy
File “/home/lsantos/root6_10/lib/cppyy.py”, line 61, in
import libPyROOT as _backend
ImportError: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8’ not found (required by /home/lsantos/root6_10/lib/libPyROOT.so)

Strangely enough, yesterday I removed everything from ROOT and Anaconda. Installed Anaconda 2 (python 2.7) and ROOT all over again and it worked. However, when I rebooted my computer and tried again to use. I got the same error.

Thanks in advance,

Lucas

I did the . bin/thisroot.sh to initialize ROOT.

You probably need to set LD_LIBRARY_PATH so that the libraries installed in non-standard locations can be found. For example, add

export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/lsantos/anaconda2/lib"

to your .bashrc and that should at least let the particular library above be found. You may need to add more paths if you still get errors.

Hi Guilherme,

It didn’t work, the problem persists. I put the commands in .bashrc in the following order:

source /home/lsantos/root6_10/bin/thisroot.sh
export PATH="/home/lsantos/anaconda2/bin:$PATH"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/lsantos/anaconda2/lib"

What is the error that you get now?

The same one

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lsantos/root6_10/lib/ROOT.py", line 24, in <module>
    import cppyy
  File "/home/lsantos/root6_10/lib/cppyy.py", line 61, in <module>
    import libPyROOT as _backend
ImportError: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/lsantos/root6_10/lib/libPyROOT.so)

More than that, I cannot open emacs nor python after changing it into the bashrc

emacs: /home/lsantos/anaconda2/lib/libtiff.so.5: no version information available (required by emacs)
emacs: /home/lsantos/anaconda2/lib/libgomp.so.1: version `GOMP_4.0' not found (required by /lib64/libMagickWand-6.Q16.so.2)
emacs: /home/lsantos/anaconda2/lib/libgomp.so.1: version `GOMP_4.0' not found (required by /lib64/libMagickCore-6.Q16.so.2)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /lib64/libwebkit2gtk-4.0.so.37)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib64/libwebkit2gtk-4.0.so.37)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib64/libwebkit2gtk-4.0.so.37)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib64/libjavascriptcoregtk-4.0.so.18)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /lib64/libjavascriptcoregtk-4.0.so.18)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib64/libjavascriptcoregtk-4.0.so.18)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicui18n.so.57)
emacs: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.57)


That means that it is finding the libraries, but they are not ABI compatible with the system libraries and libPyROOT.so may need the one that gets found last. The problems you see with emacs are because the path was probably prepended to the search path somehow, so it’s finding incompatible libraries from your anaconda installation first. What options did you use to compile ROOT? Did you add the option
-DCMAKE_PREFIX_PATH=/home/lsantos/anaconda2 to cmake? That may help.

Tried what you suggested and recompiled from scratch. Got this error during the build phase:

/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/lsantos/root6_10/lib/libRIO.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/lsantos/root6_10/lib/libRIO.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/lsantos/root6_10/lib/libRIO.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/lsantos/root6_10/lib/libRIO.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/lsantos/root6_10/lib/libCling.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/lsantos/root6_10/lib/libCling.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/lsantos/root6_10/lib/libThread.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/lsantos/root6_10/lib/libCore.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/lsantos/root6_10/lib/libCore.so)
/home/lsantos/root6_10/bin/rootcling: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/lsantos/root6_10/lib/libCore.so)
gmake[2]: *** [tmva/pymva/CMakeFiles/G__PyMVA.dir/build.make:73: tmva/pymva/G__PyMVA.cxx] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:25502: tmva/pymva/CMakeFiles/G__PyMVA.dir/all] Error 2
gmake: *** [Makefile:152: all] Error 2

Sorry, I don’t know what else could be the problem in your setup. There are incompatible versions of the libraries, as you can see in the error messages, but it’s difficult to tell why the wrong version is being loaded. Other people have reported problems with 6.10 and libstdc++, and the problems seem to be gone after the latest LLVM upgrade (i.e., in the latest version of ROOT), so as a last resource, you could try cloning from GitHub (with git clone https://github.com/root-project/root) and using that version rather than 6.10. Let us know if you still have problems with that.

Got another error =(

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lsantos/root6_10/lib/ROOT.py", line 24, in <module>
    import cppyy
  File "/home/lsantos/root6_10/lib/cppyy.py", line 61, in <module>
    import libPyROOT as _backend
ImportError: /home/lsantos/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/lsantos/root6_10/lib/libPyROOT.so)


I’m running out of options, I think. Does the pyroot of version 6.10 works only with python 3?

Thanks for all the help.

If anaconda pulls in its own libstdc++, it should sport its own C++ compiler, too: use that to compile. Better yet, remove gcc from anaconda.

Could make it work. First of all: gcc was not installed through conda. So, that was the issue. Then the error went to build step. It was related to ssl. I just said cmake to not build ssl

cmake -DCMAKE_PREFIX_PATH=/home/lsantos/anaconda2 -D ssl=OFF ../root-6.10.02/
and it worked!

Thanks guys for all the help.

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