为什么我的 V8 构建在 AWS 上的 Ubuntu 上失败,并显示有关 google 存储文件不存在的消息?

Why is my V8 build failing on Ubuntu on AWS with a message about a google storage file not existing?

我正在尝试通过执行以下命令在 AWS 上的 Ubuntu 14.04 上构建 V8。这些是 Makefile 中的行,这就是语法不寻常的原因。

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
(export PATH=$(shell pwd)/depot_tools:$$PATH && fetch v8)
(cd v8 && git checkout -b 3.31.30 --quiet)
(export PATH=$(shell pwd)/depot_tools:$$PATH && cd v8 && gclient sync)
(export PATH=$(shell pwd)/depot_tools:$$PATH && cd v8 && make x64.release -j8 library=shared)

但是,在第 2 行 (运行 fetch v8),该过程失败并显示以下错误消息。

[10:11:36][Step 1/1]      [exec] (export PATH=/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8/depot_tools:$PATH && fetch v8)
[10:12:54][Step 1/1]      [exec] 
[10:12:54][Step 1/1]      [exec] ________ running '/usr/bin/python v8/build/landmines.py' in '/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8'
[10:12:54][Step 1/1]      [exec] Clobbering due to missing landmines file.
[10:12:54][Step 1/1]      [exec] 
[10:12:54][Step 1/1]      [exec] ________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-clang-format -s v8/buildtools/win/clang-format.exe.sha1' in '/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8'
[10:12:55][Step 1/1]      [exec] 
[10:12:55][Step 1/1]      [exec] ________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s v8/buildtools/mac/clang-format.sha1' in '/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8'
[10:12:55][Step 1/1]      [exec] 
[10:12:55][Step 1/1]      [exec] ________ running 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/clang-format.sha1' in '/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8'
[10:12:56][Step 1/1]      [exec] Error: Command download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/clang-format.sha1 returned non-zero exit status 1 in /var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8
[10:12:56][Step 1/1]      [exec] File gs://chromium-clang-format/7219213d084db0ea8eaed8f4291814f4f46fad3a for v8/buildtools/linux64/clang-format does not exist.
[10:12:56][Step 1/1]      [exec] 0> File gs://chromium-clang-format/7219213d084db0ea8eaed8f4291814f4f46fad3a for v8/buildtools/linux64/clang-format does not exist, skipping.
[10:12:56][Step 1/1]      [exec] Running: gclient config --spec 'solutions = [
[10:12:56][Step 1/1]      [exec]   {
[10:12:56][Step 1/1]      [exec]     "managed": False,
[10:12:56][Step 1/1]      [exec]     "name": "v8",
[10:12:56][Step 1/1]      [exec]     "url": "https://chromium.googlesource.com/v8/v8.git",
[10:12:56][Step 1/1]      [exec]     "custom_deps": {},
[10:12:56][Step 1/1]      [exec]     "deps_file": "DEPS",
[10:12:56][Step 1/1]      [exec]     "safesync_url": "",
[10:12:56][Step 1/1]      [exec]   },
[10:12:56][Step 1/1]      [exec] ]
[10:12:56][Step 1/1]      [exec] '
[10:12:56][Step 1/1]      [exec] Running: gclient sync --with_branch_heads
[10:12:56][Step 1/1]      [exec] Traceback (most recent call last):
[10:12:56][Step 1/1]      [exec]   File "/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8/depot_tools/fetch.py", line 335, in <module>
[10:12:56][Step 1/1]      [exec]     sys.exit(main())
[10:12:56][Step 1/1]      [exec]   File "/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8/depot_tools/fetch.py", line 330, in main
[10:12:56][Step 1/1]      [exec]     return run(options, spec, root)
[10:12:56][Step 1/1]      [exec]   File "/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8/depot_tools/fetch.py", line 324, in run
[10:12:56][Step 1/1]      [exec]     return checkout.init()
[10:12:56][Step 1/1]      [exec]   File "/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8/depot_tools/fetch.py", line 136, in init
[10:12:56][Step 1/1]      [exec]     self.run_gclient(*sync_cmd)
[10:12:56][Step 1/1]      [exec]   File "/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8/depot_tools/fetch.py", line 76, in run_gclient
[10:12:56][Step 1/1]      [exec]     return self.run(cmd_prefix + cmd, **kwargs)
[10:12:56][Step 1/1]      [exec]   File "/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8/depot_tools/fetch.py", line 66, in run
[10:12:56][Step 1/1]      [exec]     return subprocess.check_call(cmd, **kwargs)
[10:12:56][Step 1/1]      [exec]   File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
[10:12:56][Step 1/1]      [exec]     raise CalledProcessError(retcode, cmd)
[10:12:56][Step 1/1]      [exec] subprocess.CalledProcessError: Command '('gclient', 'sync', '--with_branch_heads')' returned non-zero exit status 2
[10:12:56][Step 1/1]      [exec] make[3]: Leaving directory `/var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8'
[10:12:56][Step 1/1]      [exec] make[3]: *** [checkout] Error 1
[10:12:56][Step 1/1]      [exec] make[2]: *** [v8.build] Error 2

同样的过程在本地虚拟机 运行 Ubuntu 14.04 上运行良好。构建在 AWS EC2 上的实例 运行 上失败 运行,也是 运行 Ubuntu 14.04,构建在 JetBrains TeamCity 下执行。

关键错误似乎是这一行:

Error: Command download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/clang-format.sha1 returned non-zero exit status 1 in /var/teamcity/work/efeb1dfa99775e78/libs/3rdParty/v8

这个错误试图告诉我什么?我究竟做错了什么? Google 透露了另一位用户 a similar problem,但没有解决方案。

我在这里和 arch linux(64)

有同样的错误

就我而言,仅制作 32 位版本时可以忽略此错误。 -> 使 ia32.release

如果clang报错可以尝试添加make ia32.release GYPFLAGS=-Dclang=0

希望对您有所帮助!

干杯

在这种情况下,我的连续 integration/teamcity 用户没有 "home" 目录。我定义了一个如下,问题解决

sudo mkdir -p /var/teamcity/home
sudo usermod --home /var/teamcity/home teamcity
sudo chown -R teamcity:teamcity /var/teamcity