Boost logo

Boost :

From: Samuel Krempp (krempp_at_[hidden])
Date: 2003-08-14 07:55:38


On Thu, 2003-08-14 at 12:41, John Maddock wrote:

> Very likely you are using something like shared_ptr or regex that make
> themselves thread safe when BOOST_HAS_THREADS is defined, if this is the
> case then adding either:
>
> <define>BOOST_DISABLE_THREADS=1
>
> or
>
> <threading>multi
>
> To the build requirements of the test will fix that.
>
> If you don't depend on any boost lib that uses threads, then I would guess
> that the culprit would be the std lib used (probably synchronises it's
> iostream code somewhere),

format doesnt use regex, nor shared_ptr, and I suppose it's not the only
lib using std iostreams, though it seems format and ios_state are the
only libs suffering from this unwanted pthread linking problem.

ios_state and format share some similarities : they both are linked
statically (for the same reason : metrowerks needs to link statically
when using <locale>), use some streams, and use boost_test_exec_monitor.

Could this be a bad combination ?

> in which case you're going to need to use the
> second option above.

hmm, I'd prefer not link for multi-thread for every compilers just to
work around this problem. (format is probably not thread-safe, so
compiling it with <threads>multi might induce people in error)

Is it possible to supply different build requirements for different
toolsets ?
if so, I'd like to make format tests link dynamically (except for
metrowerks), and see if this gets rid of the problem with intel-7.1 .

-- 
Samuel

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk