【问题标题】:Buidling boost error: Name clash for '<pstage\lib>boost_system-vc120-mt-1_58.dll'构建提升错误:“<pstage\lib>boost_system-vc120-mt-1_58.dll”的名称冲突
【发布时间】:2015-02-05 04:41:20
【问题描述】:

我正在尝试在 64 位系统上使用 Visual Studio 2013 在 Windows 8.1 上构建 boost

b2 toolset="msvc" address-model=64 -s ZLIB_SOURCE=C:\H\M\zlib --build-type=complete stage

这是完整的输出:

Performing configuration checks

    - symlinks supported       : no
    - junctions supported      : yes
    - hardlinks supported      : yes
    - arm                      : no
    - mips1                    : no
    - power                    : no
    - sparc                    : no
    - x86                      : yes
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - iconv (libc)             : no
    - iconv (separate)         : no
    - icu                      : no
    - icu (lib64)              : no
    - message-compiler         : yes
    - compiler-supports-ssse3  : yes
    - compiler-supports-avx2   : yes
    - gcc visibility           : no
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
error: Name clash for '<pstage\lib>boost_system-vc120-mt-1_58.dll'
error:
error: Tried to build the target twice, with property sets having
error: these incompabile properties:
error:
error:     -  <warnings>all
error:     -  <architecture>x86 <warnings>on
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.

这是什么意思以及如何解决?

谢谢

【问题讨论】:

    标签: c++ boost boost-build b2


    【解决方案1】:

    如果我将 --without-context --without-coroutine 添加到 b2 选项,则构建

    【讨论】:

      【解决方案2】:

      来自Boost 1.58 beta release notes

      重要提示

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

      ./b2 address-model=64 architecture=x86

      对此进行测试。

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

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

      【讨论】:

      • 即使参数在 1.69 编译失败
      【解决方案3】:

      您是否从 git 存储库中获得了提升?

      如果是这样,我认为 git 中可用的最新版本已损坏。今天我也尝试编译它,如果你能解决你提到的错误,你会得到另一个错误,因为目标目录中的文件不完整(boost ptr_container library isn't installed after compilation from source

      解决方案是从他们的网站 (http://sourceforge.net/projects/boost/files/boost/1.57.0/) 下载最新的 boost 版本。之后,编译和安装就可以正常工作了

      【讨论】:

      • 是的,我试图获取包含所有子模块的 git 版本。今晚将尝试稳定。
      • 我做了git co boost-1.56.0;,然后构建时出现同样的错误。
      【解决方案4】:

      在我的例子中,我使用了variant=release,debug 命令行参数,这导致了名称冲突。

      我添加了额外的参数--layout=tagged,问题就消失了。

      另见https://stackoverflow.com/a/55214183/2338477

      【讨论】:

        【解决方案5】:

        也许您在$PATH 中有两个版本的 g++。尝试运行where g++。如果您看到两个 g++,则从 $PATH 中删除一个。然后重新开始所有的构建过程。这对我有用,

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2015-09-17
          • 1970-01-01
          • 2012-01-20
          相关资源
          最近更新 更多