Boost 构建中断:'<pstage/lib>libboost_system.so.1.58.0' 的名称冲突

Boost build breaks: Name clash for '<pstage/lib>libboost_system.so.1.58.0'

我正在尝试通过以下方式进行增强源构建:

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

这会出现以下错误消息:

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.

这发生在 developmaster 分支上。如何修复此错误?提前致谢。

我能够使用 中的建议进行构建。我正在编译 b运行ch boost-1.57.0,我开始编译 b运行ch boost-1.56.0,它也通过了这一点。综上所述,我运行

git co boost-1.57.0;
./bootstrap.sh --prefix=/home/me/builds/development;
./b2 --prefix=/home/me/builds/development -j9 --without-context --without-coroutine;

这是当前 git master 中的一个错误。

作为解决方法,在命令行中明确说明地址模型和体系结构选项:

./b2 link=shared threading=multi variant=release --without-mpi address-model=64 architecture=x86

来自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.

将这些标志添加到 b2 命令可以解决问题,而不必排除 contextcoroutine 库(如果您实际使用这些库,就像我做!)。

当然,如果您要构建 32 位库,则需要添加 address-model=32