Linux ppc64 - compatibility-ldbl.o can't find std::num_put
Brian Groose
brian@groose.com
Wed Apr 10 16:53:00 GMT 2019
It looks like I'm hitting the same issue that was reported in this
invalid gcc bug, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43968,
which was closed because it is a binutils bug?
I'm getting the exact same errors but running Linux on ppc64 instead
of alpha. I have built binutils 2.25.1 and 2.32 from source, and both
have hit the same linker errors as in that gcc bug. The same code
with the same binutils and gcc versions links without error on Linux
x86 and x64 (and 32-bit Solaris targets).
I am NOT linking with -static, though I am using -static-libgcc and
-static-libstdc++. I am unable to reproduce this with a small test
case program such as the one found in the gcc bug.
Can anyone give me any suggestions of things to try here or what might be wrong?
/opt/gcc-5.3.0/lib/gcc/powerpc64-unknown-linux-gnu/5.3.0/../../../../lib64/libstdc++.a(compatibility-ldbl.o):
In function `std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, long) const':
/root/gcc/gcc-5.3.0-sandbox/build-gcc/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2510:
undefined reference to `std::ostreambuf_iterator<char,
std::char_traits<char> > std::num_put<char,
std::ostreambuf_iterator<char, std::char_traits<char> >
>::_M_insert_int<long>(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, long) const'
... and more, with just the type passed to do_put changing - unsigned
long, void const*, long long, unsigned long long - and then wchar_t
versions of the same. Followed by:
/opt/gcc-5.3.0/lib/gcc/powerpc64-unknown-linux-gnu/5.3.0/../../../../lib64/libstdc++.a(compatibility-ldbl.o):
In function `std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t,
std::char_traits<wchar_t> >
>::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t>
>, std::ios_base&, wchar_t, long) const':
/root/gcc/gcc-5.3.0-sandbox/build-gcc/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2510:
undefined reference to `std::ostreambuf_iterator<wchar_t,
std::char_traits<wchar_t> > std::num_put<wchar_t,
std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
>::_M_insert_int<long>(std::ostreambuf_iterator<wchar_t,
std::char_traits<wchar_t> >, std::ios_base&, wchar_t, long) const'
... with the same type variations to follow.
More information about the Binutils
mailing list