【问题标题】:Boost build breaks: Name clash for '<pstage/lib>libboost_system.so.1.58.0'Boost 构建中断:“<pstage/lib>libboost_system.so.1.58.0”的名称冲突
【发布时间】:2015-02-08 19:32:54
【问题描述】:

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

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 分支上。可以做些什么来修复这个错误?提前致谢。

【问题讨论】:

    标签: boost


    【解决方案1】:

    来自Boost 1.58 beta release notes

    重要提示

    构建脚本存在错误;你必须指定 地址模式和架构到 b2。我用过:

    ./b2 address-model=64 architecture=x86

    对此进行测试。

    将这些标志添加到 b2 命令可以解决问题,而无需排除 contextcoroutine 库(如果您像我一样实际使用这些库,这很方便!)。

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

    【讨论】:

    • 所以这与--address-modeladdress-model 之前的答案不同?
    • @NickThompson: --address-model--architecture 似乎没有做任何事情 - 指定这些选项的正确方法是不使用破折号。 (这可以解释为什么添加带有破折号的选项没有效果!)
    【解决方案2】:

    这是当前 git master 中的一个 bug。

    作为一种解决方法,请在命令行上明确说明地址模型和架构选项:

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

    【讨论】:

    • 我运行了一个 'git pull' 并尝试了这个,但它仍然为我提供了相同的错误消息。 . .
    • 它应该是address-model=64,而不是--address-model=64(即没有前导双破折号)。
    【解决方案3】:

    我能够使用https://stackoverflow.com/a/27885628/200985 的建议进行构建。我正在编译分支boost-1.57.0,我开始编译分支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;
    

    【讨论】:

    • 我想这让我解决了编译问题,但我只是不明白为什么没有人知道如何构建整个 boost 库。我不想这样做。
    猜你喜欢
    • 2015-02-05
    • 2012-08-23
    • 1970-01-01
    • 1970-01-01
    • 2014-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多