This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Missing explicit instantiations in libstdc++ (was Re: Unreviewed
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: jason at redhat dot com (Jason Merrill)
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 3 Dec 2001 16:45:06 -0500 (EST)
- Subject: Re: Missing explicit instantiations in libstdc++ (was Re: Unreviewed
> >>>>> "John" == John David Anglin <dave@hiauly1.hia.nrc.ca> writes:
>
> >> > /usr/ccs/bin/ld: Unsatisfied symbols:
> >> > std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> >::_Rep::_S_max_size(data)
> >> > std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> >::_Rep::_S_terminal(data)
> >> > collect2: ld returned 1 exit status
> >>
> >> Hmm. _S_max_size should already be instantiated in src/string-inst.cc, but
> >> it looks like we need to add an explicit instantiation for _S_terminal.
>
> > I see:
>
> > 000000d4 T std::string::_Rep::_S_max_size
>
> > in src/string-inst.o. However, we don't have the above. I have enclosed
> > below the complete list of undefined symbols found from the libstdc++
> > testsuite run.
>
> "the above"?
std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> >::_Rep::_S_max_size(data)
or in mangled form
_ZNSbIhSt11char_traitsIhESaIhEE4_Rep11_S_max_sizeE
As noted in a message that I just sent, the definition for this symbol
on a system with weak support is being provided by the testcase
(eg., collate.cc). So, should the testcase using this symbol provide
explicit instantiation or should it be done in the library?
>
> Why is the linker not happy with the definition you see?
It isn't happy because the symbol is defined
> I've switched this to the libstdc++ list, since that's what will need to
> change to resolve this. Y'all knock yourselves out.
>
> Jason
>
> > Executing on host: /xxx/gnu/gcc-3.1/objdir/gcc/g++ -B/xxx/gnu/gcc-3.1/objdir/gcc/ -nostdinc++ -L/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.00/libstdc++-v3/src -L/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.00/libstdc++-v3/src/.libs -B/opt/gnu/hppa2.0w-hp-hpux11.00/bin/ -B/opt/gnu/hppa2.0w-hp-hpux11.00/lib/ -isystem /opt/gnu/hppa2.0w-hp-hpux11.00/include -g -DDEBUG_ASSERT -DLOCALEDIR="/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.00/libstdc++-v3/po/share/locale" -nostdinc++ -I/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.00/libstdc++-v3/include/hppa2.0w-hp-hpux11.00 -I/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.00/libstdc++-v3/include -I/xxx/gnu/gcc-3.1/libstdc++-v3/libsupc++ -I/xxx/gnu/gcc-3.1/libstdc++-v3/libio -I/xxx/gnu/gcc-3.1/libstdc++-v3/include/backward -I/xxx/gnu/gcc-3.1/libstdc++-v3/testsuite /xxx/gnu/gcc-3.1/libstdc++-v3/testsuite/18_support/numeric_limits.cc -DDEBUG_ASSERT -lm -o ./numeric_limits (timeout = 300)
> > /usr/ccs/bin/ld: Unsatisfied symbols:
> > std::numeric_limits<B>::traps (data)
> > std::numeric_limits<B>::max_exponent10 (data)
> > std::numeric_limits<B>::digits (data)
> > std::numeric_limits<B>::digits10 (data)
>
> Looks like the testcase needs to explicitly instantiate numeric_limits<B>.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)