From 9267ddff1a5e7f6bc9d37c13fe0904d20617826d Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 12 Aug 2019 10:33:12 +0800 Subject: cni: fix problem about cross compilation When setting up k8s, the following error appeared, failing to setup coredns pod. NetworkPlugin cni failed to set up pod "coredns-5f7fc64c95-4nnfq_kube-system" network: fork/exec /opt/cni/bin/loopback: no such file or directory This is because the binary, /opt/cni/bin/loopback, has wrong interpreter. So fix do_compile to use ${GO} instead of go to fix this problem. Signed-off-by: Chen Qi Signed-off-by: Bruce Ashfield --- recipes-networking/cni/cni_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes-networking/cni') diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb index 266ee691..495b9c11 100644 --- a/recipes-networking/cni/cni_git.bb +++ b/recipes-networking/cni/cni_git.bb @@ -47,10 +47,10 @@ do_compile() { export CGO_ENABLED="1" cd ${S}/src/import/vendor/github.com/containernetworking/cni/libcni - go build + ${GO} build cd ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool - go build + ${GO} build cd ${S}/src/import/vendor/github.com/containernetworking/plugins/ PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/main/* | grep -v windows)" @@ -58,7 +58,7 @@ do_compile() { for p in $PLUGINS; do plugin="$(basename "$p")" echo "building: $p" - go build -o ${WORKDIR}/plugins/bin/$plugin github.com/containernetworking/plugins/$p + ${GO} build -o ${WORKDIR}/plugins/bin/$plugin github.com/containernetworking/plugins/$p done } -- cgit v1.2.3-54-g00ecf