构建docker时出现do_compile错误

时间:2017-02-08 14:23:55

标签: docker yocto lxc openembedded

我正在使用最新版本的yocto(morty)构建docker,但是构建失败了以下错误

ERROR: containerd-0.2.2+git0ac3cd1be170d180b2baed755e8f0da547ceb267-r0 do_compile: oe_runmake failed

我也得到了一些日志数据,如下所示

Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8 static
| ERROR: oe_runmake failed
| /var/mshehery/Documents/git/poky/build/tmp/work/i586-poky-linux/containerd/0.2.2+git0ac3cd1be170d180b2baed755e8f0da547ceb267-r0/git
| cd ctr && go build -ldflags "-w -extldflags -static -X github.com/docker/containerd.GitCommit=0ac3cd1be170d180b2baed755e8f0da547ceb267 " -tags "" -o ../bin/ctr
| cd containerd && go build -ldflags "-w -extldflags -static -X github.com/docker/containerd.GitCommit=0ac3cd1be170d180b2baed755e8f0da547ceb267 " -tags "" -o ../bin/containerd
| cd containerd-shim && go build -ldflags "-w -extldflags -static -X github.com/docker/containerd.GitCommit=0ac3cd1be170d180b2baed755e8f0da547ceb267 " -tags "" -o ../bin/containerd-shim
| # runtime/internal/sys
| compile: unknown architecture "i586"
| Makefile:58: recipe for target 'shim-static' failed
| make: *** [shim-static] Error 2
| make: *** Waiting for unfinished jobs....
| # runtime/internal/sys
| compile: unknown architecture "i586"
| Makefile:46: recipe for target 'client-static' failed
| make: *** [client-static] Error 2
| # runtime/internal/sys
| compile: unknown architecture "i586"
| Makefile:52: recipe for target 'daemon-static' failed
| make: *** [daemon-static] Error 2
| ERROR: Function failed: do_compile (log file is located at /var/mshehery/Documents/git/poky/build/tmp/work/i586-poky-linux/containerd/0.2.2+git0ac3cd1be170d180b2baed755e8f0da547ceb267-r0/temp/log.do_compile.20684)

显然,containerd存在一些问题,即控制runC的守护进程。有人可以建议修复吗?我正在使用元虚拟化层及其对Docker的依赖性。所有层都是可以兼容的。

1 个答案:

答案 0 :(得分:0)

以下是我的问题的更新

配方指定支持的以下架构

do_compile() {
export GOARCH="${TARGET_ARCH}"
# supported amd64, 386, arm arm64

为了删除错误并构建containerd_git.bb,目标体系结构需要从i586更改为支持的体系结构。该体系结构在poky / build / conf / local.conf文件中指定,如下所示

# You need to select a specific machine to target the build with. There are a selection
# of emulated machines available which can boot and run in the QEMU emulator:
#
#MACHINE ?= "qemuarm"
#MACHINE ?= "qemuarm64"
#MACHINE ?= "qemumips"
#MACHINE ?= "qemuppc"
#MACHINE ?= "qemux86"
#MACHINE ?= "qemux86-64"
#
# There are also the following hardware board target machines included for 
# demonstration purposes:
#
#MACHINE ?= "beaglebone"
#MACHINE ?= "genericx86"
#MACHINE ?= "genericx86-64"
#MACHINE ?= "mpc8315e-rdb"
#MACHINE ?= "edgerouter"
#
# This sets the default machine to be qemux86 if no other machine is selected:
MACHINE ??= "genericx86-64"

我能够使用上述设置成功构建配方。