Std::__cxx11::basic_string vs std::basic_string

Hello, I have compiled ROOT 6.06/02 on

gcc 5.3.1
fedora 23

with -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 (otherwise it cannot compile due to gcc 5).

Everything works.

Now I have to compile some ATLAS libraries and to link them with ROOT libraries. I get

/home/turra/ATLAS/sw/release/AnalysisBase/2.3.49/RootCore/obj/generic/xAODCore/lib/libxAODCore.so:
riferimento non definito a "TROOT::RegisterModule(char const*, char
const**, char const**, char const*, char const*, void (*)(),
std::vector<std::pair<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int>,
std::allocator<std::pair<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int> > > const&, char
const**)"

looking at the various libraries involved I discovered that inside

home/turra/root-6.06.02/mybuild/lib/libCore.so

I have

TROOT::RegisterModule(char const*, char const**, char const**, char
const*, char const*, void (*)(),
std::vector<std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>,
std::allocator<std::pair<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int> > > const&, char
const**)

comparing with the previouson I see that the difference is std::__cxx11::basic_string (inside
AnalysisBase library) vs std::basic_string (inside ROOT library).

Looking at the option I am using when compiling ROOT I see (with ccmake) that c++11 is ON.

Do you have any suggestions?

Ok, maybe I have solved:

from
gcc.gnu.org/onlinedocs/gcc-5.2. … l_abi.html

“”“
If you get linker errors about undefined references to symbols that
involve types in the std::__cxx11 namespace or the tag [abi:cxx11]
then it probably indicates that you are trying to link together object
files that were compiled with different values for the
_GLIBCXX_USE_CXX11_ABI macro. This commonly happens when linking to a
third-party library that was compiled with an older version of GCC. If
the third-party library cannot be rebuilt with the new ABI then you
will need to recompile your code with the old ABI.
”""

Hi,

Indeed you need to compile ALL the C++ libraries being used with the old abi …

Cheers,
Philippe.