Boost logo

Boost :

From: Christoph Ludwig (cludwig_at_[hidden])
Date: 2004-07-22 07:34:33


On Thu, Jul 22, 2004 at 01:08:29PM +0200, Martin Wille wrote:
> Jonathan Wakely wrote:
> >This is a known (*) issue with GCC 3.4, you must explicitly define
> >BOOST_DISABLE_THREADS if you are not going to link with -pthread.
>
> Right.
>
>
> >http://lists.boost.org/MailArchives/boost/msg64550.php and many more
> >
> >THIS ISSUE IS GOING TO AFFECT USERS, IF BOOST DEVELOPERS STILL DON'T
> >KNOW ABOUT IT THEN IT NEEDS TO BE MADE MORE OBVIOUS.
[...]
> This problem should be obvious to everyone who installs gcc-3.4.1,
> since you have to select how the standard library will be compiled.

FWIW, gcc's configuration switsches w.r.t. threading support didn't
change between gcc 3.3.x and 3.4.x. Therefore can reasonably expect
the same behavior. (Unless the change is documented in the release
notes, of course, but this issue is not mentioned in the release notes
of gcc 3.4.{0,1}.

> Nevertheless, this should be explained in the Release Notes for
> 1.32.
[...]
> >This doesn't only affect users of new versions of boost, anyone who
> >switches to GCC 3.4, even with an old Boost release, will start getting
> >these linker errors.
>
> Right. However, this is not really a Boost problem. The problem is
> being caused by the way you installed the standard library. Users
> of other software will be affected, too. GCC 3.4 still is relatively
> new, so knowledge about this problem still needs some time to spread.

Sure, the problem is neither caused by nor specific to Boost. But I'd
be surprised if many developers were aware of the problem. After all,
gcc has a command line switch `-pthread'. That makes you assume that
compiling without `-pthread' gives you a single threaded binary and
that libraries don't silently add dependencies to the
pthread-library. (I actually always assumed that gcc - configured with
--enable-threads=posix - provides both a single threaded and a
multi threaded version of the standard library and that `-pthread'
chooses between these two versions, possibly among other things. I
only learned that this assumption was wrong when I investigated above
problem.)

I therefore recommend to put a warning to gcc 3.4 users at a prominent
place.

Regards

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