【问题标题】:ninja_syntax missing when trying to build chromium arc尝试构建铬弧时缺少ninja_syntax
【发布时间】:2014-09-17 19:54:39
【问题描述】:

我正在尝试在 ubuntu 14.04 上构建 arc,但出现以下错误:

➜  arc git:(master) ✗ ./configure 
Traceback (most recent call last):
  File "src/build/configure.py", line 17, in <module>
    import config_loader
  File "/home/ligi/git/3rd/arc/src/build/config_loader.py", line 125, in <module>
    load_from(paths)
  File "/home/ligi/git/3rd/arc/src/build/config_loader.py", line 96, in load_from
    config_module = imp.load_source(module_name, path_name, config_file)
  File "/home/ligi/git/3rd/arc/mods/android/bionic/config.py", line 13, in <module>
    import make_to_ninja
  File "/home/ligi/git/3rd/arc/src/build/make_to_ninja.py", line 19, in <module>
    import ninja_generator
  File "/home/ligi/git/3rd/arc/src/build/ninja_generator.py", line 34, in <module>
    import ninja_syntax
ImportError: No module named ninja_syntax

我正在按照自述文件中的建议运行 install-build-deps 脚本:

➜  arc git:(master) ✗ ./src/build/install-build-deps.sh  # Ubuntu 14.04
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++-arm-linux-gnueabihf is already the newest version.
gcc-arm-linux-gnueabihf is already the newest version.
libcap-dev is already the newest version.
libtinfo5 is already the newest version.
python-markdown is already the newest version.
pbzip2 is already the newest version.
pigz is already the newest version.
libasound2:i386 is already the newest version.
libcairo2:i386 is already the newest version.
libcap2:i386 is already the newest version.
libgconf-2-4:i386 is already the newest version.
libglib2.0-0:i386 is already the newest version.
libncurses5:i386 is already the newest version.
libpango1.0-0:i386 is already the newest version.
libtinfo5:i386 is already the newest version.
libxcomposite1:i386 is already the newest version.
libxcursor1:i386 is already the newest version.
libxdamage1:i386 is already the newest version.
libxi6:i386 is already the newest version.
libxinerama1:i386 is already the newest version.
libxrandr2:i386 is already the newest version.
libxss1:i386 is already the newest version.
libxtst6:i386 is already the newest version.
libc6-dev-i386 is already the newest version.
libosmesa6 is already the newest version.
openjdk-6-jdk is already the newest version.
libcups2:i386 is already the newest version.
libfontconfig1:i386 is already the newest version.
libgl1-mesa-dev:i386 is already the newest version.
libgtk2.0-0:i386 is already the newest version.
libnss3:i386 is already the newest version.
libosmesa6:i386 is already the newest version.
libudev1:i386 is already the newest version.
linux-libc-dev:i386 is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic
  linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

depot_tools 也在我的路径中:

➜  3rd  ninja
ninja: error: loading 'build.ninja': No such file or directory
➜  3rd  which ninja
/home/ligi/git/3rd/depot_tools/ninja

我被困在这里 - 谷歌没有找到“ImportError: No module named ninja_syntax” ;-)

【问题讨论】:

    标签: android build chromium


    【解决方案1】:

    我在尝试运行launch_chrome.py 脚本时遇到了类似的问题,并注意到脚本都假设third-party/tools/ninja 中有一些内容。鉴于它是空的,我得出的结论是它一定是一个 git 子模块,所以简单的 git clone 不会把这些源拉进来。

    如果你已经有了一个工作目录,你可以通过执行(在你的工作副本的根目录)来初始化/更新它的子模块:

    git submodule update --init --recursive

    这应该会拉入所有内容。您还可以选择通过执行git clone --recursive https://chromium.googlesource.com/arc/arc 来克隆已经拉入其所有子模块的存储库。

    【讨论】:

      猜你喜欢
      • 2020-02-05
      • 1970-01-01
      • 2018-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-03
      • 1970-01-01
      相关资源
      最近更新 更多