【问题标题】:Error when try to compile Chromium尝试编译 Chromium 时出错
【发布时间】: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'

我能知道是什么问题吗?

谢谢。

【问题讨论】:

    标签: chromium ninja


    【解决方案1】:

    out 目录及其内容(包括 build.ninja)是通过运行创建的

    python 构建\gyp_chromium

    gclient 运行钩子

    在 /src 中执行任一命令应该可以让您的编译继续进行。

    【讨论】:

      【解决方案2】:

      在 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
      

      我做了以下步骤,它对我有用。

      1. 设置此变量。 Reference(还不确定它的用途)

      set DEPOT_TOOLS_WIN_TOOLCHAIN=0

      1. 运行命令gn gen out/Default

      2. 再次运行构建命令

      autoninja -C out/Default chrome

      还建议从out/Default目录运行gclient sync

      【讨论】:

        【解决方案3】:

        切换到“gn”后你可以试试:

        gn gen out/调试

        【讨论】:

        • 如果您添加一些解释,这个答案会更有用。
        猜你喜欢
        • 1970-01-01
        • 2016-08-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多