|
Boost Users : |
Subject: Re: [Boost-users] 'Multiply defined' errors in Boost 1.38.
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-02-22 04:36:10
Dyer, Nigel wrote:
> Hi
>
> There is a problem with the 1.38 release of Boost that is preventing me
> from compiling using gcc on a mac some code that compiled correctly in
> previous releases. I now get lots of 'multiply defined' error messages
> when certain boost header files are included in specific ways, e.g.
>
> /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: multiple definitions of
> symbol boost::test_tools::(anonymous namespace)::check_is_close
> bin/darwin-4.0.1/release/link-static/threading-multi/Lexer/BiobaseLexer.
> o definition of boost::test_tools::(anonymous namespace)::check_is_close
> in section (__DATA,__common)
> bin/darwin-4.0.1/release/link-static/threading-multi/Lexer/ArrayLexer.o
> definition of boost::test_tools::(anonymous namespace)::check_is_close
> in section (__DATA,__common)
>
>
> I have attached minimal example which seems to reproduce the problem.
>
> It seems to be associated with the change that was introduced in svn
> release r49800.
> (https://svn.boost.org/trac/boost/changeset?new=49800%40trunk&old=49793%
> 40trunk)
>
> I have run bjam -n -a with and without r49800 and also bjam with and
> without the r49800 change, which appears to show that the problem arises
> after the change has been introduced:
Hi Nigel,
thanks for a comprehensive bug report. On the first look, it appears that
Boost.Build change is actually right -- it fixes a previously introduced
bug that made PCHs non-functional. And, then, it appears that including
boost.test in PCH somehow upsets the compiler. Do things improve if you
take all boost.test headers out of bio-pch.h?
Thanks,
Volodya
P.S. Please don't ask new questions by replying to unrelated email,
I've nearly missed this one.
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