Error when try to compile Chromium

ぃ、小莉子 提交于 2019-12-06 19:16:57

问题


I try to use the command ninja -C out/Debug chrome to compile Chromium.

However the error msg says that:

ninja error loading 'build.ninja': the system cannot find the file specified 
ninja Entering dictory 'out/Debug'

Could I know what's the problem?

Thanks.


回答1:


The out directory and its contents (including build.ninja) are created by running

python build\gyp_chromium

or

gclient runhooks

Executing either command from within /src should allow your compile to proceed.




回答2:


After the switch to "gn" you could try:

gn gen out/Debug




回答3:


On Windows machine!

When I was running gn gen out/Default it also gave me an error:

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

I did the following steps and it worked for me.

  1. Set this variable. Reference (not sure about its purpose yet)

set DEPOT_TOOLS_WIN_TOOLCHAIN=0

  1. Run the command gn gen out/Default

  2. Run the build command again

autoninja -C out/Default chrome

It is also recommended to run gclient sync from out/Default directory.



来源:https://stackoverflow.com/questions/30003930/error-when-try-to-compile-chromium

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!