This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linking issue with _GLIBCXX_DEBUG on 4.7/google


Hey all, I've just hit an issue when using _GLIBCXX_DEBUG together with Google's gcc 4.7 built using --enable-symvers=gnu-versioned-namespace flag. The issue is specific to unordered_mulimap and can be reproduced using the following:

struct MyType
{
};

#if 1
using MyMap = std::multimap<std::string, MyType *>; // works
#else
using MyMap = std::unordered_multimap<std::string, MyType *>; // fails to link
#endif


MyMap m;
m.insert({"blah"}, new MyType});

The latter variant fails to link with the following message:

In function `__gnu_debug::_Safe_unordered_container_base::~_Safe_unordered_container_base()':
statmgr.cc:(.text._ZN11__gnu_debug30_Safe_unordered_container_baseD2Ev[_ZN11__gnu_debug30_Safe_unordered_container_baseD5Ev]+0x15): undefined reference to `__gnu_debug::_Safe_unordered_container_base::_M_detach_all()'


The compiler was configured as follows:
Configured with: ../gcc47-google/configure --prefix=/opt/gcc-google-4.7-v7 --enable-languages=c,c++,lto --with-mpfr=/opt/gcc-4.6-rbt --with-cloog=/opt/gcc-4.6-rbt --with-mpc=/opt/gcc-4.6-rbt --with-gmp=/opt/gcc-4.6-rbt --with-system-zlib --disable-multilib --enable-lto --with-build-config=bootstrap-lto --with-fpmath=sse --enable-gold=yes --enable-cloog-backend=isl --disable-cloog-version-check --program-suffix=-google-4.7 --enable-symvers=gnu-versioned-namespace CFLAGS=-O3 CXXFLAGS='-O3 -mtune=core2'


Could someone shed some light on this please?

Thanks!
Oleg.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]