[meta-virtualization] [master][rocko][PATCH] cni: fix build error for arm64

Jagadeesh Krishnanjanappa jkrishnanjanappa at mvista.com
Tue Jan 16 22:22:51 PST 2018


Replace syscall.Dup2 calls with syscall.Dup3, as syscall.Dup2 is not
supported for arm64.

Solves below error:
-- snip --
Log data follows:
| DEBUG: Executing shell function do_compile_ptest_base
...
| # import/vendor/github.com/onsi/ginkgo/internal/remote
| ../../vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go:34:2: undefined: syscall.Dup2
| ../../vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go:35:2: undefined: syscall.Dup2
-- snip --

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa at mvista.com>
---
 recipes-networking/cni/cni_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb
index 427a812..c83a56e 100644
--- a/recipes-networking/cni/cni_git.bb
+++ b/recipes-networking/cni/cni_git.bb
@@ -29,6 +29,10 @@ inherit go
 inherit goarch
 
 do_compile() {
+	if [ "${TARGET_GOARCH}" = "arm64" ]; then
+		sed -i "s:syscall.Dup2\(.*\))$:syscall.Dup3\1, 0):g" \
+		${S}/src/import/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go 
+	fi
 	export GOARCH="${TARGET_GOARCH}"
 	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 	export GOPATH="${S}/src/import:${S}/src/import/vendor"
-- 
2.7.4



More information about the meta-virtualization mailing list