[boost.build] multiple definitions of symbols at link since revision 49800.
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
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
#include #include 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. Can you: 1. Produce a minimal example that reproduce this problem, and post it as archive of some common format. 2. Run bjam -n -a on your project, both with and without r49800, capture the output in both cases, and post them. 3. Confirm that the change shown in https://svn.boost.org/trac/boost/changeset?new=49800%40trunk&old=49793%40trunk is indeed the change that appears to be problematic. Thanks, Volodya
Quoting Vladimir Prus
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
#include #include 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.
Hello Volodya I have attached minimal example which seems to reproduce the problem 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, as described in: https://svn.boost.org/trac/boost/changeset?new=49800%40trunk&old=49793%4 0trunk The results are attached, and included in the tar.gz file Let me know if you need any more information. Nigel
participants (4)
-
Dyer, Nigel
-
Nigel Dyer
-
Peter Bartlett
-
Vladimir Prus