Boost logo

Boost-Build :

From: John Maddock (john_at_[hidden])
Date: 2005-08-31 05:10:39


> OK, I've traced the issue back to the internal GCC macro
>
> _GLIBCPP_HAVE_GTHR_DEFAULT
>
> not being defined in a GCC config header named bits/c++config.h.
> I've manually defined that (instructions on the header seem to indicate
> I'm
> allowed to do it) and now BOOST_HAS_THREADS is defined, but

Are you sure you can do that? As far as I know the only reason why that
macro would not be defined is if your std lib was built single threaded, in
which case threading support in Boost should be turned off. Looking around
my cygwin installation, I see that both gcc-3.2 and 3.3.1 *do* define
_GLIBCPP_HAVE_GTHR_DEFAULT in their config setups. I don't suppose you're
using Win98 or something are you? I recall this installs different cygwin
runtime from the NT versions that I have here. Failing that are you able to
just update your cygwin installation?

> the problem shows the other way around: I cannot set it off
> with
>
> bjam "-sTOOLS=GCC" "-sBUILD=<threading>single" test_basic
>
> Shouldn't BOOST_HAS_THREADS be undef'd in this latter case?

Sigh..... this has come up before, <threading>single doesn't really do what
it says, it just does a build with the compilers default settings, and if
those happen to be multithreaded, then Boost will be as well. Defining
BOOST_DISABLE_THREADS when compiling will really force threading support off
if that's what you want, but you'll have to use that define in any projects
that link to libs built that way, as thread safe and non-thread safe libs
are unlikely to be binary compatible.

John.

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk