Error when try to compile Chromium

前端 未结 3 1201
春和景丽
春和景丽 2021-02-19 21:59

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\'         


        
3条回答
  •  情书的邮戳
    2021-02-19 22:29

    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.

提交回复
热议问题