This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: Missing concept check instantiations on sparc-sun-solaris2.8 cross sometimes


On Tue, Jun 10, 2003 at 06:49:34PM -0300, Brad Spencer wrote:
> For very simple programs the gcc-3.3 cross compiler for
> sparc-sun-solaris2.8 (on i686-pc-linux-gnu), some of the concept
> checking helpers do not get instantiated.  Is this a known issue?

News to me.

> I have determined that by using the std::copy() algorithm (for any
> types?) causes the templates to be instantiated (or something) and the
> problem goes away.
[...]
> With the copy line commented out, I get linker errors reporting that
> some of the instantiations are missing.   Uncommenting it fixes the
> problem.

If you uncomment that line, and compile to a .o, and then run nm over the
.o file, you'll see which checks are being additionally instantiated.


> Perhaps there are some
> missing from concept-inst.cc?  I'm not that familiar with exactly how
> this mechanism works.

There's a paragraph of comments at the top of the file, but they look like
a continuation of the license boilerplate, so they're easy to miss.


> In function
> `__gnu_cxx::_LessThanComparableConcept<int>::__constraints()':
> /build/eng-linux1/spencer/gcc-cross/sparc-sun-solaris2.8/build-gcc/sparc-sun-solaris2.8/libstdc++-v3/include/istream:105:
> undefined reference to `void
> __gnu_cxx::__aux_require_boolean_expr<bool>(bool const&)'
> /opt/gcc-3.3-cross/sparc-sun-solaris2.8/lib/gcc-lib/sparc-sun-solaris2.8/3.3/../../../../sparc-sun-solaris2.8/lib/libstdc++.a(locale.o):

Hmm.  All the errors are of the same form:  missing
__gnu_cxx::__aux_require_boolean_expr<bool>(bool const&).  But that function
is the first one instantiated in concept-inst.cc, so I'm confused.

If you run nm on your_build_dir/src/.libs/concept-inst.o, what symbols do
you see?


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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