【发布时间】:2015-05-02 15:12:56
【问题描述】:
我尝试使用命令ninja -C out/Debug chrome 来编译 Chromium。
但是错误消息说:
ninja error loading 'build.ninja': the system cannot find the file specified
ninja Entering dictory 'out/Debug'
我能知道是什么问题吗?
谢谢。
【问题讨论】:
我尝试使用命令ninja -C out/Debug chrome 来编译 Chromium。
但是错误消息说:
ninja error loading 'build.ninja': the system cannot find the file specified
ninja Entering dictory 'out/Debug'
我能知道是什么问题吗?
谢谢。
【问题讨论】:
out 目录及其内容(包括 build.ninja)是通过运行创建的
python 构建\gyp_chromium
或
gclient 运行钩子
在 /src 中执行任一命令应该可以让您的编译继续进行。
【讨论】:
在 Windows 机器上!
当我运行gn gen out/Default 时,它也给了我一个错误:
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
^----------
Current dir: D:/Chromium/src/out/Goma/
Command: C:/Python27/python.exe -- D:/Chromium/src/build/vs_toolchain.py get_toolchain_dir
Returned 1 and printed out:
Please follow the instructions at https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
我做了以下步骤,它对我有用。
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
运行命令gn gen out/Default
再次运行构建命令
autoninja -C out/Default chrome
还建议从out/Default目录运行gclient sync。
【讨论】:
切换到“gn”后你可以试试:
gn gen out/调试
【讨论】: