【问题标题】:Avoid fails during build of Boost 1.63.0 - Threads在构建 Boost 1.63.0 期间避免失败 - 线程
【发布时间】:2017-03-16 14:55:28
【问题描述】:

嘿,希望你们中的一些有经验的人能提供帮助..

(我在谷歌上搜索了很多,阅读了很多其他人的文章和问题,他们有类似的问题,但无法为我的问题找到一个好的答案/解决方案)

尝试通过 VS2013 x64 Native Tools 命令构建提升线程:

b2.exe --with-thread --build-type=complete toolset=msvc-12.0 architecture=x86 address-model=64 stage
  • Win7 64 位
  • 安装了更新 5 的 VS2013
  • 在 C:\boost_1_63_0 上提升 1.63.0 文件

问题:如何避免失败?(来自 ..\bin.v2\config.log)

...found 10 targets...
...updating 5 targets...
common.mkdir libs\config\checks\architecture\bin
common.mkdir libs\config\checks\architecture\bin\msvc-12.0
common.mkdir libs\config\checks\architecture\bin\msvc-12.0\debug
common.mkdir libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi
compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\32.obj
32.cpp
...updated 5 targets...
...found 2 targets...
...updating 1 target...
compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\arm.obj
arm.cpp
libs\config\checks\architecture\arm.cpp(13) : fatal error C1189: #error :  "Not ARM"

    call "C:\Users\..\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_x86.cmd" >nul
cl /Zm800 -nologo @"libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\arm.obj.rsp" 

...failed compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\arm.obj...
...failed updating 1 target...
...found 2 targets...
...updating 1 target...
compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\mips1.obj
mips1.cpp
libs\config\checks\architecture\mips1.cpp(10) : fatal error C1189: #error :  "Not MIPS1"

    call "C:\Users\..\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_x86.cmd" >nul
cl /Zm800 -nologo @"libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\mips1.obj.rsp" 

...failed compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\mips1.obj...
...failed updating 1 target...
...found 2 targets...
...updating 1 target...
compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\power.obj
power.cpp
libs\config\checks\architecture\power.cpp(13) : fatal error C1189: #error :  "Not PPC"

    call "C:\Users\..\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_x86.cmd" >nul
cl /Zm800 -nologo @"libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\power.obj.rsp" 

...failed compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\power.obj...
...failed updating 1 target...
...found 2 targets...
...updating 1 target...
compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\sparc.obj
sparc.cpp
libs\config\checks\architecture\sparc.cpp(10) : fatal error C1189: #error :  "Not SPARC"

    call "C:\Users\..\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_x86.cmd" >nul
cl /Zm800 -nologo @"libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\sparc.obj.rsp" 

...failed compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\sparc.obj...
...failed updating 1 target...
...found 2 targets...
...updating 1 target...
compile-c-c++ libs\config\checks\architecture\bin\msvc-12.0\debug\threading-multi\x86.obj
x86.cpp
...updated 1 target...
...found 3 targets...
...updating 3 targets...
common.mkdir bin.v2
link.touch bin.v2\test-symlink-source
link.mklink bin.v2\test-symlink
You do not have sufficient privilege to perform this operation.

    if exist "bin.v2\test-symlink" del "bin.v2\test-symlink"
    mklink "bin.v2\test-symlink" "test-symlink-source"

...failed link.mklink bin.v2\test-symlink...
...failed updating 1 target...
...updated 2 targets...
...found 2 targets...
...updating 2 targets...
common.mkdir bin.v2\test-junction-source
link.junction bin.v2\test-junction
Junction created for bin.v2\test-junction <<===>> bin.v2\test-junction-source
...updated 2 targets...
...found 3 targets...
...updating 3 targets...
common.mkdir bin.v2\symlink
link.touch bin.v2\test-hardlink-source
link.hardlink bin.v2\symlink\test-hardlink
Hardlink created for bin.v2\symlink\test-hardlink <<===>> bin.v2\test-hardlink-source
...updated 3 targets...
...found 1 target...
...updating 1 target...
config-cache.write bin.v2\project-cache.jam
...updated 1 target...

在运行上面提到的构建命令后,我发现失败与 b2 的输出相关,其中包括:

  • 手臂:没有
  • mips1:没有
  • ...
  • 支持的符号链接:否

C:\boost_1_63_0>b2.exe --with-thread --build-type=complete toolset=msvc-12.0 architecture=x86 address-model=64 stage
Performing configuration checks

- 32-bit                   : yes
- arm                      : no
- mips1                    : no
- power                    : no
- sparc                    : no
- x86                      : yes
- symlinks supported       : no
- junctions supported      : yes
- hardlinks supported      : yes

这是什么意思?

为什么 b2 会产生该输出以及为什么这些组件会导致日志中失败?

任何帮助将不胜感激。

PS:我知道二进制文件可以在precompiled 找到,但我想了解这个问题。

【问题讨论】:

    标签: multithreading boost boost-thread


    【解决方案1】:

    我知道这个问题很老,但它可以帮助某人。

    构建系统(boost build,jam 的一种变体)执行一些配置检查,以确定系统的体系结构、平台、操作系统、要使用的工具集、某些实用程序的功能等。这些测试失败,并不意味着请求的库将无法编译,在某些情况下某些功能可能不存在,例如未找到 ICU 库,ICU 后端将无法在 boost 语言环境中使用。特别是您提到的一些测试:

    arm : no                   
    ===> An ARM processor was not detected.
    
    mips1 : no                 
    ===> A MIPS processor was not detected.
    
    symlinks supported : no    
    ===> Those are supported in Windows starting with Windows Vista, but admin privileges are required.
    

    如果要查看执行的测试结果,可以通过选项“--debug-configuration”和“-dn”(其中n是调试级别),根据“b2--帮助”:

    General command line usage:
    
        b2 [options] [properties] [targets]
    
      Options, properties and targets can be specified in any order.
    
    Important Options:
    
      * --clean Remove targets instead of building
      * -a Rebuild everything
      * -n Don't execute the commands, only print them
      * -d+2 Show commands as they are executed
      * -d0 Suppress all informational messages
      * -q Stop at first error
      * --reconfigure Rerun all configuration checks
      * --debug-configuration Diagnose configuration
      * --debug-building Report which targets are built with what properties
      * --debug-generator Diagnose generator search/execution
    
    Further Help:
    
      The following options can be used to obtain additional documentation.
    
      * --help-options Print more obscure command line options.
      * --help-internal Boost.Build implementation details.
      * --help-doc-options Implementation details doc formatting.
    

    您可以检查“bin.v2\config.log”以查看执行的测试及其结果。要进行更深入的检查,您需要了解 boost 构建系统中 jam 文件的语法。

    从源代码构建的官方帮助 (boost 1_65_1) 可以在这里找到:Build Binaries From Source。

    boost构建系统的官方帮助可以在这里找到:Boost.Build。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-09-05
      • 2020-05-06
      • 2012-04-21
      • 1970-01-01
      • 2012-11-07
      • 1970-01-01
      • 2018-04-15
      • 2016-11-09
      相关资源
      最近更新 更多