【问题标题】:Unable to build boost 1.60 with Visual Studio 2015 Pro无法使用 Visual Studio 2015 Pro 构建 boost 1.60
【发布时间】:2016-07-08 07:29:56
【问题描述】:

平台是 Windows server 2012R2。安装的工具集是带有更新 1 和 Windows Driver Kit 10 的 VS2015。

我运行“VS2015 x64 Native Tools Command Prompt”,导航到解压后的 boost_1_60_0 文件夹并运行 bootstrap.bat(也使用选项“msvc”运行)。

很快就失败了:

Building Boost.Build engine

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

还有 bootstrap.log 内容:

###
### Using 'vc14' toolset.
###

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>if exist bootstrap rd /S /Q bootstrap 

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>md bootstrap 

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib /Febootstrap\jam0  command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c class.c cwd.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c 
command.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
compile.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
constants.c
debug.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
execcmd.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
execnt.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
filent.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
frames.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
function.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
glob.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
hash.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
hdrmacro.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
headers.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
jam.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
jambase.c
jamgram.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
lists.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
make.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
make1.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
object.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Generating Code...
Compiling...
option.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
output.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
parse.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
pathnt.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
pathsys.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
regexp.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
rules.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
scan.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
search.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
subst.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
timestamp.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
variable.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
modules.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
strings.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
filesys.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
builtins.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
md5.c
md5.c(55): fatal error C1083: Cannot open include file: 'string.h': No such file or directory
class.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
cwd.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
w32_getreg.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Generating Code...
Compiling...
native.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
set.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
path.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
regex.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\modules\../mem.h(67): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
property-set.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
sequence.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
order.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\modules\../mem.h(67): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
Generating Code...

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>exit /b 2 

任何想法为什么我不能建造? This site 建议应该非常直截了当。

【问题讨论】:

  • <ctype.h> 是标准库头文件。我建议尝试编译一个 hello world 程序。
  • 没有问题。确定使用“isalnum”方法,效果很好。在c:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\ctype.h找到ctype.h。

标签: c++ visual-studio boost visual-studio-2015


【解决方案1】:

基于 Tmayto 的回答和我在评论中提到的 workaround,我发现 ctype.h 不在 Visual Studio 树中,而是在 Windows 工具包树中。此外,它不在%INCLUDE% 指定的路径中,而是在10.0.10240.0\ucrt(和10.0.10150.0\ucrt)中。因此,除了wdf 之外,我还将10.0.10586.0 标记为隐藏(有关详细信息,请参见下图)。现在,boost正在建设中。

MS 真的需要修复他们的东西!似乎其中一个脚本只是盲目地假设标题位于“最新”或“最高编号”文件夹中。

我不知道这样做会产生什么影响,因为我还没有开始尝试编译我们需要的驱动程序......这样做非常令人不安,并且可能会在以后破坏一些重要的东西。

更新:安装 WDK 10 和 SDK 10 后,10.0.10586.0 文件夹已正确填充,也无需将其标记为隐藏。虽然我不知道哪个套件部署了该文件夹,但我怀疑之前缺少标题是由于安装了早期版本。

【讨论】:

  • 我很高兴你能弄明白。希望微软能真正解决这个问题,而不是这个奇怪的“让我们将你所有的标准库复制到一个非标准文件”
  • 显然,他们没有阅读“不制作 WDK 安装的狗早餐的完整白痴指南”。感谢您的帮助!
  • 这不是固定的(更新 3),应该隐藏 10.0.10240.0 之后的任何内容(最后一个带有 ucrt)。例如10.0.14393.0 也应该被隐藏。
  • 它必须是填充它的套件(SDK10 或 WDK10)。我的10.0.10586.0 正确填充。感谢您提供有用的更新,很明显,从中得出的结论是,个别结果可能会有所不同。
【解决方案2】:

您的链接器似乎无法找到标准的 c/c++ 库。如果您拥有 Windows Driver Kit 10,或者您缺少这些库,它看起来可能是一个问题。首先,检查C:\Program Files\Microsoft Visual Studio 14.0\VC\include,看看你里面是否有文件,特别是stddef.hstdlib.hctype.h之类的文件

否则,请尝试将 C:\Program Files (x86)\Windows Kits\10\include\wdf 文件夹重命名为 C:\Program Files (x86)\Windows Kits\10\include\00wdf 之类的名称

git issuestackoverflow issue 看来,人们似乎在这方面取得了成功。

【讨论】:

  • 嗯,有些东西出了问题。我删除了 WDK 并在 Visual Studio 上进行了修复。尽管如此,VC\include 目录中明显缺乏 std 包含。它们似乎都在 Windows Kits\\10\Include 树中,其中子目录包括 10.0.10150.0\ucrt 和 10.0.10240.0\ucrt。我现在正在尝试重新安装 WDK,看看这个 workaround 是否有帮助。
  • 重命名 wdf 或将 hidden 属性应用于 wdf 文件夹都没有帮助。 :(
  • 不幸的是,我很快就没有想法了。您是否尝试过将所有 std 包含的目录直接包含到 Visual Studio 中? IE。链接它们就像你会一个 3rd 方库并包括?我从未尝试过,但它可能对你有用
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-12
  • 2015-12-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多