0

我一直在尝试在 Mac 上构建 Chromium。我一直在关注这里的文档

Fetch 将无法正确结束,并将退出并显示以下堆栈跟踪:

Error: Command 'vpython src/build/landmines.py' returned non-zero exit status 1 in /Users/admin/Desktop/chromedriversource/chromium
Traceback (most recent call last):
  File "/Users/admin/Desktop/chromedriversource/depot_tools/fetch.py", line 301, in <module>
    sys.exit(main())
  File "/Users/admin/Desktop/chromedriversource/depot_tools/fetch.py", line 296, in main
    return run(options, spec, root)
  File "/Users/admin/Desktop/chromedriversource/depot_tools/fetch.py", line 290, in run
    return checkout.init()
  File "/Users/admin/Desktop/chromedriversource/depot_tools/fetch.py", line 133, in init
    self.run_gclient(*sync_cmd)
  File "/Users/admin/Desktop/chromedriversource/depot_tools/fetch.py", line 78, in run_gclient
    return self.run(cmd_prefix + cmd, **kwargs)
  File "/Users/admin/Desktop/chromedriversource/depot_tools/fetch.py", line 68, in run
    return subprocess.check_output(cmd, **kwargs)
  File "/Users/admin/anaconda/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('gclient', 'sync', '--no-history')' returned non-zero exit status 2

我在目录中有 .glient,但没有 .gclient_entries。

当我运行 gclient sync :项目已同步,但它与堆栈跟踪退出:

________ running 'vpython src/build/landmines.py' in '/Users/admin/Desktop/chromedriversource/chromium'
[E2017-12-11T14:20:13.540361-05:00 36600 0 annotate.go:238] goroutine 1:
[E2017-12-11T14:20:13.540400-05:00 36600 0 annotate.go:238] #0 go.chromium.org/luci/vpython/python/find.go:88 - python.Find()
[E2017-12-11T14:20:13.540414-05:00 36600 0 annotate.go:238]   annotation #0:
[E2017-12-11T14:20:13.540423-05:00 36600 0 annotate.go:238]     reason: no Python found
[E2017-12-11T14:20:13.540470-05:00 36600 0 annotate.go:238]   annotation #1:
[E2017-12-11T14:20:13.540490-05:00 36600 0 annotate.go:238]     reason: failed to get version for: "/Users/admin/anaconda/bin/python2.7"
[E2017-12-11T14:20:13.540506-05:00 36600 0 annotate.go:238]   annotation #2:
[E2017-12-11T14:20:13.540517-05:00 36600 0 annotate.go:238]     reason: failed to parse version from: "2.7.13 :: Anaconda 4.4.0 (x86_64)"
[E2017-12-11T14:20:13.540528-05:00 36600 0 annotate.go:238]   annotation #3:
[E2017-12-11T14:20:13.540542-05:00 36600 0 annotate.go:238]     reason: non-canonical Python version string: "2.7.13 :: Anaconda 4.4.0 (x86_64)"
[E2017-12-11T14:20:13.540557-05:00 36600 0 annotate.go:238] 
[E2017-12-11T14:20:13.540567-05:00 36600 0 annotate.go:238] #1 go.chromium.org/luci/vpython/venv/config.go:253 - venv.(*Config).resolvePythonInterpreter()
[E2017-12-11T14:20:13.540575-05:00 36600 0 annotate.go:238]   reason: could not find Python for: 2.7.0
[E2017-12-11T14:20:13.540586-05:00 36600 0 annotate.go:238] 
[E2017-12-11T14:20:13.540594-05:00 36600 0 annotate.go:238] #2 go.chromium.org/luci/vpython/venv/config.go:175 - venv.(*Config).makeEnv()
[E2017-12-11T14:20:13.540601-05:00 36600 0 annotate.go:238]   reason: failed to resolve system Python interpreter
[E2017-12-11T14:20:13.540611-05:00 36600 0 annotate.go:238] 
[E2017-12-11T14:20:13.540619-05:00 36600 0 annotate.go:238] #3 go.chromium.org/luci/vpython/venv/venv.go:122 - venv.With()
[E2017-12-11T14:20:13.540629-05:00 36600 0 annotate.go:238]   reason: failed to initialize empty probe environment
[E2017-12-11T14:20:13.540637-05:00 36600 0 annotate.go:238] 
[E2017-12-11T14:20:13.540644-05:00 36600 0 annotate.go:238] #4 go.chromium.org/luci/vpython/run.go:72 - vpython.Run()
[E2017-12-11T14:20:13.540652-05:00 36600 0 annotate.go:238] #5 go.chromium.org/luci/vpython/application/application.go:261 - application.(*application).mainImpl()
[E2017-12-11T14:20:13.540666-05:00 36600 0 annotate.go:238] #6 go.chromium.org/luci/vpython/application/application.go:349 - application.(*Config).Main.func1()
[E2017-12-11T14:20:13.540674-05:00 36600 0 annotate.go:238] #7 go.chromium.org/luci/vpython/application/support.go:45 - application.run()
[E2017-12-11T14:20:13.540685-05:00 36600 0 annotate.go:238] #8 go.chromium.org/luci/vpython/application/application.go:348 - application.(*Config).Main()
[E2017-12-11T14:20:13.540692-05:00 36600 0 annotate.go:238] #9 vpython/main.go:92 - main.mainImpl()
[E2017-12-11T14:20:13.540700-05:00 36600 0 annotate.go:238] #10 vpython/main.go:98 - main.main()
[E2017-12-11T14:20:13.540711-05:00 36600 0 annotate.go:238] #11 runtime/proc.go:185 - runtime.main()
[E2017-12-11T14:20:13.540718-05:00 36600 0 annotate.go:238] #12 runtime/asm_amd64.s:2337 - runtime.goexit()
Error: Command 'vpython src/build/landmines.py' returned non-zero exit status 1 in /Users/admin/Desktop/chromedriversource/chromium

不知道我在这里缺少什么。

4

1 回答 1

3

在 IRC Chromium 上:

发现 gclient 无法识别 Python 的“Anaconda”构建。一旦我从 $PATH 中删除它,一切都运行良好。

摇滚乐。

于 2017-12-11T20:46:46.620 回答