This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
c++ link incompatibility between 3.4.0 and 3.4.1-20040625
- From: Nick Rasmussen <nick at ilm dot com>
- To: gcc at gcc dot gnu dot org
- Cc: nick at ilm dot com
- Date: Wed, 30 Jun 2004 20:19:30 -0700
- Subject: c++ link incompatibility between 3.4.0 and 3.4.1-20040625
I ran into this while rebuilding under the 3.4.1 prerelease:
libSgInit.so: undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
libSgInit.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
libSgInit.so: undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
Has there's been a symbol change in libstdc++ such that shared libraries
built with g++-3.4.0 can't be linked into programs compiled with 3.4.1?
I did a quick look in bugzilla and didn't see anything. Unfortunately
the library in question is in a bit of licensing code which I don't have
access to, but I'll try and get enough info to build a test case tomorrow.
A quick check of the libstdc++ symbols:
[nick@ewok]:/dept/rnd/vendor 7:45pm
> nm -C gcc-3.4.0/lib/libstdc++.so | grep allocate | sed -e 's/^[^ ]*//' >! /tmp/foo0
[nick@ewok]:/dept/rnd/vendor 7:45pm
> nm -C gcc-3.4.1-pre1/lib/libstdc++.so | grep allocate | sed -e 's/^[^ ]*//' > ! /tmp/foo1
[nick@ewok]:/dept/rnd/vendor 7:45pm
> diff -u /tmp/foo0 /tmp/foo1
--- /tmp/foo0 Wed Jun 30 19:45:08 2004
+++ /tmp/foo1 Wed Jun 30 19:45:16 2004
@@ -2,8 +2,10 @@
t __gnu_cxx::__mt_alloc<char>::allocate(unsigned, void const*)
t __gnu_cxx::__mt_alloc<wchar_t>::deallocate(wchar_t*, unsigned)
t __gnu_cxx::__mt_alloc<wchar_t>::allocate(unsigned, void const*)
- t __gnu_cxx::__pool_alloc<true, 0>::deallocate(void*, unsigned)
- t __gnu_cxx::__pool_alloc<true, 0>::allocate(unsigned)
+ t __gnu_cxx::__pool_alloc<char>::deallocate(char*, unsigned)
+ t __gnu_cxx::__pool_alloc<char>::allocate(unsigned, void const*)
+ t __gnu_cxx::__pool_alloc<wchar_t>::deallocate(wchar_t*, unsigned)
+ t __gnu_cxx::__pool_alloc<wchar_t>::allocate(unsigned, void const*)
W std::basic_filebuf<char, std::char_traits<char> >::_M_allocate_internal_buffer()
W std::basic_filebuf<wchar_t, std::char_traits<wchar_t> >::_M_allocate_internal_buffer()
T __cxa_allocate_exception
-nick