Building root from not default compiler

I’m trying to build root 6 on a server, that as default has gcc/g++ 4.4.7 installed (which doesn’t support C++11, so it can’t build root6). As such, I’ve installed an updated version of gcc/g++ in my home directory, /homedir/libraries/gcc-install/. Using this, I was able to CMake properly, but when I try to subsequently call make, I’ve run into a series of errors, that I’ve managed to solve one by one until this one:

[ 72%] Generating G__TMVAGui.cxx, ../../lib/libTMVAGui_rdict.pcm, ../../lib/libTMVAGui.rootmap /homedir/libraries/root-build/bin/rootcling: /usr/lib64/ version "CXXABI_1.3.7" not found (required by /homedir/libraries/root-build/lib/ /homedir/libraries/root-build/bin/rootcling: /usr/lib64/ version "GLIBCXX_3.4.20" not found (required by /homedir/libraries/root-build/lib/

it seems that rootcling is looking for the c++ library libstdc++ in /usr/lib64, which is the location for the library for the default g++ 4.4.7 compiler; not the library of the new version of g++ that i’ve installed (which would be located at /homedir/libraries/gcc-install/lib64)

I ran into an error like this before, which I solved by

export LD_LIBRARY_PATH=/homedir/libraries/gcc-install/lib64

but that isn’t working for this error. I’m not sure how to proceed; I’m not very experienced as a coder so any tips would be helpful, thanks.

You may have to export LD_LIBRARY_PATH and start over with make clean for it to work. If that doesn’t work, try to configure ROOT with these extra options to CMake:

-DCMAKE_PREFIX_PATH=/homedir/libraries/gcc-install -Drpath=ON

rootcling needs to use your compiler’s own C++ library, as you correctly diagnosed, and these options will ensure that’s the case.

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