Petter Reinholdtsen writes: > I found interesting comments regarding this in > <URL: http://allanmcrae.com/2015/06/the-case-of-gcc-5-1-and-the-two-c-abis/ > > and <URL: https://llvm.org/bugs/show_bug.cgi?id=23529 >.
> Apparently clang do not understand a new gcc invention, the API tag, > which is inserted in symbols build using -std=c++11. > According to > <URL: > https://www.reddit.com/r/cpp/comments/442b38/clang_38_gcc_53_incompatibilities/ > >, > We might get it working by building the library using > --with-defualt-libstdcxx-abi=gcc4-compatible to avoid the problem, or > perhaps we need -D_GLIBCXX_USE_CXX11_ABI=0. More testing is needed. AFAIU the "--with-defualt-libstdcxx-abi=gcc4-compatible" is a gcc configure flag that enables it to produce code with multiple ABIs. The "-D_GLIBCXX_USE_CXX11_ABI=0" then tells gcc to produce C++0x code with the old (incompatible with the standard) ABI. The main problem is that CLang invariably produces code with the gcc's old C++0x ABI, and only "recently" accepted a patch to accept the new ABI names used by glibc (as compiled with gcc) [1]. Therefore, I (like [2]) would advise against compiling any library with the old ABI, and wait for debian to pack a newer CLang release with that patch. [1] https://llvm.org/bugs/show_bug.cgi?id=23529 [2] https://wiki.debian.org/GCC5 "To build code with gcc-5 which is compatible with the old ABI, define the macro _GLIBCXX_USE_CXX11_ABI to 0 before including any C++ standard library headers. Should only be used for leaf packages, not for libraries as a last resort." Cheers, Lluis