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

Bruce Ashfield bruce.ashfield at gmail.com
Wed Jan 17 05:10:23 PST 2018


On Wed, Jan 17, 2018 at 1:22 AM, Jagadeesh Krishnanjanappa
<jkrishnanjanappa at mvista.com> wrote:
> 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

Even if this is in the vendor/ tree, it should be a patch, versus a
sed operation.
If it's a patch, I'll check it during each uprev of CNI, like this ..
I'll never notice it.

Cheers,

Bruce

>         export GOARCH="${TARGET_GOARCH}"
>         export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
>         export GOPATH="${S}/src/import:${S}/src/import/vendor"
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


More information about the meta-virtualization mailing list