Boost logo

Boost :

From: Christoph Ludwig (cludwig_at_[hidden])
Date: 2004-06-19 09:53:36


On Wed, May 19, 2004 at 10:33:15AM +0400, Vladimir Prus wrote:
> Jonathan Wakely wrote:
>
> > Only the bug tracker, which is here:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11953
>
> Thanks for the link!
>
> >
> > Wolfgang Bangerth had no objection to the idea of a __GXX_PTHREADS
> > macro defined when -pthread is given, and Andrew Pinski targeted the
> > bug for GCC 3.4.1 - so it looks to me as though they're happy with it
> > and a fix will land before the next compiler release.
>
> Ok, seems like the problem will be solved.

Unfortunately, Mark Mitchell postponed yesterday the resolution of
PR#11953 until gcc 3.4.2.

I think that it's therefore imperative that users of g++ 3.4.x are
told about this problem and possible workarounds. I am unsure. though,
where this information should go. If I am not mistaken then
libs/config/config.htm is the only page that describes in detail what
can go into boost/config/user.hpp. It seems most natural to mention
there that users of g++ 3.4.x (on linux systems, at least) should define
BOOST_DISABLE_THREADS if they don't build their programs with
`-pthread'.

But this page is somewhat hidden and the language on
more/getting_started.html#Additional_Steps may stop many linux users
from reading libs/config/config.htm at all. So we need a notice at a
more prominent place. Any suggestions?

Another idea: How about adding a #warning to
boost/config/compiler/gcc.hpp if:
 * the compiler version is >= 3.4.0
 * the platform is linux (maybe other platforms, too? I don't know
   how they are affected.)
 * _REENTRANT is defined
 * the user didn't explicitly define either BOOST_DISABLE_THREADS or
   BOOST_HAST_THREADS

This could save boost users upgrading to gcc 3.4.x a lot of time
chasing linker errors.

Christoph

-- 
http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html
LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html

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