在Windows上构建Chromium时出错

时间:2016-12-04 14:27:12

标签: windows visual-studio-2015 chromium ninja

我使用带有SP1的Windows 7和带有更新3的Microsoft Visual Studio社区2015.我一步一步地执行this指令。

设置构建:

通过Visual Studio命令提示符我输入:

gn gen --target_cpu="x86" --filters=//chrome out\Default

然后我输入:

ninja -C out\Default chrome

当编译完成大约10%时,构建失败并丢失文件。

完整日志:

D:\ChromiumBuild\chromium\src>gn gen --target_cpu="x86" --filters=//chrome o
t\Default
Done. Made 5575 targets from 1215 files in 3469ms

D:\ChromiumBuild\chromium\src>ninja -C out\Default chrome
ninja: Entering directory `out\Default'
[2762/27638] ACTION //third_party/WebK...ue_keywords(//build/toolchain/win:x64)
FAILED: gen/blink/core/CSSValueKeywords.cpp gen/blink/core/CSSValueKeywords.h
D:/Chromium/depot_tools/python276_bin/python.exe ../../third_party/WebKit/Sourc
/build/scripts/make_css_value_keywords.py ../../third_party/WebKit/Source/core/
ss/CSSValueKeywords.in ../../third_party/WebKit/Source/core/css/SVGCSSValueKeyw
rds.in --output_dir gen/blink/core --gperf ../../third_party/gperf/bin/gperf.ex

Traceback (most recent call last):
  File "../../third_party/WebKit/Source/build/scripts/make_css_value_keywords.p
", line 177, in <module>
    in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv)
  File "D:\ChromiumBuild\chromium\src\third_party\WebKit\Source\build\scripts\i
_generator.py", line 108, in main
    writer.write_files(options.output_dir)
  File "D:\ChromiumBuild\chromium\src\third_party\WebKit\Source\build\scripts\i
_generator.py", line 60, in write_files
    self._write_file_if_changed(output_dir, generator(), file_name)
  File "../../third_party/WebKit/Source/build/scripts/make_css_value_keywords.p
", line 172, in generate_implementation
    gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subproce
s.PIPE, universal_newlines=True)
  File "D:\Chromium\depot_tools\python276_bin\lib\subprocess.py", line 709, in
_init__
    errread, errwrite)
  File "D:\Chromium\depot_tools\python276_bin\lib\subprocess.py", line 957, in
execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
[2771/27638] ACTION //third_party/WebK...ual_modules(//build/toolchain/win:x64)
ninja: build stopped: subcommand failed.

D:\ChromiumBuild\chromium\src>

我也试过没有定位x86:

gn gen --filters=//chrome out\Default

但问题是一样的。

当我尝试创建解决方案然后在Visual Studio中编译时:

gn gen --ide=vs --filters=//chrome out\Default
devenv out\Default\all.sln

建筑似乎没有尽头。 4小时后,编译大约完成了20%(16 GB RAM和8 x 4.0 GHz,CPU使用率始终为100%,没有防病毒或防火墙)。

有没有办法修复这个丢失的文件?

0 个答案:

没有答案