10

I'm trying to do a boost source build, via:

git clone --recursive https://github.com/boostorg/boost.git
cd boost
./bootstrap
./b2 link=shared threading=multi variant=release --without-mpi

This chokes with the following error message:

error: Name clash for '<pstage/lib>libboost_system.so.1.58.0'
error: 
error: Tried to build the target twice, with property sets having 
error: these incompabile properties:
error: 
error:     -  none
error:     -  <address-model>64 <architecture>x86
error: 
error: Please make sure to have consistent requirements for these 
error: properties everywhere in your project, especially for install
error: targets.

This occurs on both the develop and master branch. What can be done to fix this error? Thanks in advance.

0

3 Answers 3

13

From the Boost 1.58 beta release notes:

Important Note

There is a bug with the build scripts; you have to specify the address-mode and architecture to b2. I used:

./b2 address-model=64 architecture=x86

to test this.

Adding these flags to the b2 command solves the problem without having to exclude the context and coroutine libraries (handy if, say, you actually use these libraries, like I do!).

Naturally, if you're building 32-bit libraries, you want to add address-model=32 instead.

2
  • So this differs from the previous answer by --address-model vs. address-model?
    – user14717
    Apr 4, 2015 at 15:01
  • 5
    @NickThompson: --address-model and --architecture don't appear to do anything - the correct way to specify those options is without the dashes. (That would explain why adding the options with dashes had no effect!) Apr 4, 2015 at 16:53
4

This is a bug in the current git master.

As a workaround, explicitly state the address-model and architecture options on the command line:

./b2 link=shared threading=multi variant=release --without-mpi address-model=64 architecture=x86
2
  • I ran a 'git pull' and tried this, but it still came up with the same error message for me . . .
    – user14717
    Mar 9, 2015 at 19:46
  • It should be address-model=64, not --address-model=64 (i.e. without the leading double-dashes).
    – Tanz87
    Dec 30, 2017 at 23:18
3

I was able to build using the suggestion at https://stackoverflow.com/a/27885628/200985 . I'm compiling branch boost-1.57.0, and I started compiling branch boost-1.56.0, and it got past this point, too. To sum up, I ran

git co boost-1.57.0;
./bootstrap.sh --prefix=/home/me/builds/development;
./b2 --prefix=/home/me/builds/development -j9 --without-context --without-coroutine;
1
  • 7
    I guess that gets me around the compilation problem, but I just don't understand why no one knows how to build the entire boost library. I'd prefer not to do this.
    – user14717
    Feb 9, 2015 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.