Boost logo

Boost Users :

From: Debayan Chaudhuri (debayan_at_[hidden])
Date: 2004-10-11 00:03:59


Hi Mike,

   Thanks a lot for responding to my plea for help. I was getting the
following errors while building my simple program that used Boost threads(
only the initial errors are listed below ).

*******************************************************
/usr/local/boost/boost_1_30_0/boost/type_traits/is_convertible.hpp:191:
template instantiation depth exceeds maximum of 17
/usr/local/boost/boost_1_30_0/boost/type_traits/is_convertible.hpp:191:
(use -ftemplate-depth-NN to increase the maximum)
/usr/local/boost/boost_1_30_0/boost/type_traits/is_convertible.hpp:191:
instantiating `boost::add_reference<void (*&)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_convertible.hpp:191:
instantiated from `boost::detail::is_convertible_impl<void (*&)
(),boost::detail::int_convertible>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_enum.hpp:91:
instantiated from `boost::is_convertible<void (*&)
(),boost::detail::int_convertible>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_enum.hpp:91:
instantiated from `boost::detail::is_enum_helper<false>::type<void (*&)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_enum.hpp:91:
instantiated from `boost::detail::is_enum_impl<void (*)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_scalar.hpp:36:
instantiated from `boost::is_enum<void (*)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_scalar.hpp:36:
instantiated from `boost::detail::is_scalar_impl<void (*)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_pod.hpp:41: instantiated
from `boost::is_scalar<void (*)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/is_pod.hpp:41: instantiated
from `boost::detail::is_pod_impl<void (*)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/has_trivial_constructor.hpp:32
: instantiated from `boost::is_POD<void (*)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/has_trivial_constructor.hpp:32
: instantiated from `boost::is_pod<void (*)()>'
/usr/local/boost/boost_1_30_0/boost/type_traits/has_trivial_constructor.hpp:32
: instantiated from `boost::detail::has_trivial_ctor_impl<void (*)()>'
*******************************************************

   Being new to Boost, I was not aware of the concept of 'template
instantiation depth'. Then I echo'ed the gcc-C++-action in gcc-tools.jam
file - and found out that the following options are used while building the
threads library.
****************************
g++ -c -Wall -ftemplate-depth-100 -DBOOST_THREAD_BUILD_DLL=1 -g -O0 -fno-
inline -pthread -fPIC ........
****************************

Now I used "g++ -ftemplate-depth-100" for building my example program and it
compiled and ran fine.

I suppose such things should be documented in the Boost site.

regards,
Debayan.

> "Debayan Chaudhuri" <debayan_at_[hidden]> wrote in message
> news:20041008161349.M12932_at_rebaca.com...
> > Hi,
> >
> > I am evaluating Boost for use in our project. The platform OS is
> > FreeBSD
> > 4.9; which comes with gcc-2.95.3. I downloaded boost_1.30.0 and
> > compiled the
> > thread library on the FreeBSD box.
> >
> > When I try to compile a small test program using Boost threads; I
> > encounter hundreds of compiler errors; mostly in the Boost header
> > files. Is
> > there a workaround to this ? Which version of Boost works with
> > gcc-2.95.3 and
> > what are the compiler options that will make it compile properly?
>
> It's pretty hard to help unless you tell us what the compile errors
> are. Perhaps you could post them if you're still having problems?
>
> Mike
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net