Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.build] multiple definitions of symbols at link since revision 49800.
From: Peter Bartlett (pete_at_[hidden])
Date: 2008-12-10 11:07:44


Quoting Vladimir Prus <vladimir_at_[hidden]>:

> Nigel Dyer wrote:
>
>> Hello
>>
>> I am using the trunk release of boost, and started having problems with
>> multiple definitions of symbols during linking (see example linker output
>> below). I can cure the problem by removing the change to
>> tools\build\v2\build\generators.jam introduced in revision 49800.
>>
>> It only seems to occur if the following headers:
>>
>> #include <boost/test/floating_point_comparison.hpp>
>> #include <boost/lambda/lambda.hpp>
>> #include <boost/lambda/bind.hpp>
>>
>> are included in precompiled headers which are included in cpp files that are
>> created by the antlr parser generator. It occurs on a compilation with
>> darwin, but not msvc.
>>
>> It is unclear whether the generator.jam change has identified a waekness in
>> the boost libraries, or there is a problem with the revision 49800 change
>> that only surfaces in obscure circumstances, or the change has highlighted a
>> problem in my code. It can be fixed by removing the includes from the
>> precompiled header. I feel this should not be necessary
>
> It appears that some compiler bug is triggered by this change, but
> it's not yet clear how.

GCC PCHs were broken in the presence of anonymous namespaces in a
header until version 4.2
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10591). I guess
gcc/darwin has the same or similar problem.


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