Error when try to compile Chromium

前端 未结 3 1225
春和景丽
春和景丽 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

    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.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-19 22:36

    After the switch to "gn" you could try:

    gn gen out/Debug

    0 讨论(0)
提交回复
热议问题