首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Building (码头)上构建v8

在Building (码头)上构建v8
EN

Stack Overflow用户
提问于 2017-05-27 02:27:23
回答 1查看 1.2K关注 0票数 3

我尝试在ubuntu上构建v8 (使用docker,因为我的dev环境中没有根访问权限)。

我试着遵循这里的指示,https://github.com/v8mips/v8mips/wiki/Get-the-code

我可以得到depot_tools,但是当我运行fetch v8时,我会得到以下错误:

代码语言:javascript
复制
Error: Command '/usr/bin/python v8/third_party/binutils/download.py' 
    returned non-zero exit status 1 in /home
Traceback (most recent call last):
  File "/home/depot_tools/fetch.py", line 300, in <module>
    sys.exit(main())
  File "/home/depot_tools/fetch.py", line 295, in main
    return run(options, spec, root)
  File "/home/depot_tools/fetch.py", line 289, in run
    return checkout.init()
  File "/home/depot_tools/fetch.py", line 132, in init
    self.run_gclient(*sync_cmd)
  File "/home/depot_tools/fetch.py", line 76, in run_gclient
    return self.run(cmd_prefix + cmd, **kwargs)
  File "/home/depot_tools/fetch.py", line 66, in run
    return subprocess.check_output(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('gclient', 'sync', '--with_branch_heads')'
    returned non-zero exit status 2

有谁知道会有什么问题吗?这是我的Dockerfile

代码语言:javascript
复制
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y python
WORKDIR /home
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /home/depot_tools:"$PATH"

然后使用docker run -it v8build (码头映像的名称)运行对接程序,并运行fetch v8

编辑(添加版本信息):

  • Ubuntu: 16.04
  • git: 2.7.4
  • python: 2.7.12
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-05-27 06:29:49

我已经弄清楚问题出在哪里了,这就是答案。希望有人能从中受益。

结果,您可以运行fetch -n v8来查看将要运行的所有命令。这些命令如下:

代码语言:javascript
复制
fetch -n v8
Running: gclient root
Running: gclient config --spec 'solutions = [
  {
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "managed": False,
    "name": "v8",
    "deps_file": "DEPS",
    "custom_deps": {},
  },
]
'
Running: gclient sync --with_branch_heads
cd /home/x/v8
Running: git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
Running: git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
Running: git config diff.ignoreSubmodules all

错误发生在gclient sync --with_branch_heads,正如错误输出所描述的那样。

我一个接一个地运行命令来手动复制进程,这样它就可以打印出通过运行fetch v8隐藏的消息。错误的结果是,ubuntu:latest对接器映像没有lbzip2

安装解决了这个问题。

更新的Dockerfile

代码语言:javascript
复制
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y git python lbzip2 && apt-get clean
WORKDIR /home
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /home/depot_tools:"$PATH"
RUN cd /home && fetch v8

旅程还在继续。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44212337

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档