This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linux ppc64 - compatibility-ldbl.o can't find std::num_put
I have not yet tried newer versions of gcc, though that's my next step
as first I need 5.3.0.
I did check, and the symbols are definitely in libstdc++.a (apologies
for the wrapping):
$ nm -C /opt/act-gcc-5.3.0/lib64/libstdc++.a | grep -F
"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"
U 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
0000000000001590 W 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
If I run 'ar x' for local-inst.o and wlocal-inst.o and add those two
.o files to my linker command line, it successfully links.
My linker options, beyond local -L and -l for my own libraries, only
has -Wl,-z,noexecstack -static-libgcc -static-libstdc++. If I remove
-static-libstdc++, it does link successfully as well, though to the
shared version of course.
I'm just not sure what would cause ld fail to find symbols that are in
the same .a but a different .o, I didn't think circular dependencies
between .o files in the same .a would cause this type of issue as can
happen when two .a files depend on each other. Is there a table or
index that might not be updated, as was the case in that previous bug?
On Fri, Apr 12, 2019 at 10:57 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Wed, Apr 10, 2019 at 12:52:59PM -0400, Brian Groose wrote:
> > 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?
>
> No, that old ar bug won't be the trouble here.
>
> > 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?
>
> I don't know what to suggest with the few details you've supplied.
> I think you'll find that the missing compatibility-ldbl.o symbols are
> defined in locale-inst.o, also in libstdc++.a. So it's a mystery why
> they don't satisfy the references. Have you tried newer versions of
> gcc?
>
> --
> Alan Modra
> Australia Development Lab, IBM