Revert "runc: Don't override GOARCH or GOROOT"
PATCH 1/1 Revert "runc: Don't override GOARCH or GOROOT"
From: Aníbal Limón <[email protected]>
This reverts commit fdee07aadc1b5224a540c7e8893144207e1979cb.
Causes build failures when is cross-compiling to aarch64,
| CGO_ENABLED=1 aarch64-linaro-linux-go build -i -tags " cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X main.version=1.0.0-rc3 " -o runc .
...
| /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link: running aarch64-linaro-linux-gcc failed: exit status 1 | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crt1.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crti.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crtbeginT.o: No such file or directory
...
--- recipes-containers/runc/runc.inc | 3 +++ 1 file changed, 3 insertions(+)
recipes-containers/runc/runc.inc +3 -0
@@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''" inherit goarch do_compile() { + export GOARCH="${TARGET_GOARCH}" + export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" # Set GOPATH. See 'PACKAGERS.md'. Don't rely on # docker to download its dependencies but rather # use dependencies packaged independently.
@@ -32,6 +34,7 @@ do_compile() { (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" # Fix up symlink for go-cross compiler rm -f ${S}/src/import/vendor/src
Signature · 1 line
2.11.0
Quoted 33 lines · Aníbal Limón
From: Aníbal Limón <[email protected]>
This reverts commit
fdee07aadc1b5224a540c7e8893144207e1979cb.Causes build failures when is cross-compiling to aarch64,
| CGO_ENABLED=1 aarch64-linaro-linux-go build -i -tags " cgo
static_build" -ldflags "-w -extldflags -static -X main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X main.version=1.0.0-rc3 " -o runc .
...| /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link: running aarch64-linaro-linux-gcc failed: exit status 1 | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crt1.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crti.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crtbeginT.o: No such file or directory...
Signed-off-by Aníbal Limón <[email protected]>--- recipes-containers/runc/runc.inc | 3 +++ 1 file changed, 3 insertions(+)recipes-containers/runc/runc.inc +2
-0@@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''" inherit goarch do_compile() { + export GOARCH="${TARGET_GOARCH}" + export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" # Set GOPATH. See 'PACKAGERS.md'. Don't rely on # docker to download its dependencies but rather # use dependencies packaged independently.
recipes-containers/runc/runc.inc do_compile() { · line 40
Quoted 7 lines
recipes-containers/runc/runc.inc +1
-0@@ -32,6 +34,7 @@ do_compile() { (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" # Fix up symlink for go-cross compiler rm -f ${S}/src/import/vendor/src
It seems like we have conflicting changes :( Reverting this patch will break cross-compilation of runc-opencontainers for x86-64 with musl libc again.
I'll try cross-compiling both runc variants for arm, aarch64, x86 and x86-64 and see if I can find a solution that works for everything.
Signature · 2 lines
Paul Barker Togán Labs Ltd
Quoted 46 lines · Paul Barker
Quoted 33 lines · Aníbal Limón
From: Aníbal Limón <[email protected]>
This reverts commit
fdee07aadc1b5224a540c7e8893144207e1979cb.Causes build failures when is cross-compiling to aarch64,
| CGO_ENABLED=1 aarch64-linaro-linux-go build -i -tags " cgo
static_build" -ldflags "-w -extldflags -static -X main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X main.version=1.0.0-rc3 " -o runc .
...| /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link: running aarch64-linaro-linux-gcc failed: exit status 1 | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crt1.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crti.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crtbeginT.o: No such file or directory...
Signed-off-by Aníbal Limón <[email protected]>--- recipes-containers/runc/runc.inc | 3 +++ 1 file changed, 3 insertions(+)recipes-containers/runc/runc.inc +2
-0@@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''" inherit goarch do_compile() { + export GOARCH="${TARGET_GOARCH}" + export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" # Set GOPATH. See 'PACKAGERS.md'. Don't rely on # docker to download its dependencies but rather # use dependencies packaged independently.recipes-containers/runc/runc.inc do_compile() { · line 40
Quoted 7 lines
recipes-containers/runc/runc.inc +1
-0@@ -32,6 +34,7 @@ do_compile() { (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" # Fix up symlink for go-cross compiler rm -f ${S}/src/import/vendor/srcIt seems like we have conflicting changes :( Reverting this patch will break cross-compilation of runc-opencontainers for x86-64 with musl libc again.
Quoted 3 lines
I'll try cross-compiling both runc variants for arm, aarch64, x86 and x86-64 and see if I can find a solution that works for everything.
Agreed.
I'll hold off on any revert until I hear from your tests.
For the configs I'm using everything is building with the current set of changes.
Bruce
Quoted 3 lines
--
Paul Barker
Togán Labs Ltd
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 51 lines · Bruce Ashfield
Quoted 46 lines · Paul Barker
Quoted 33 lines · Aníbal Limón
From: Aníbal Limón <[email protected]>
This reverts commit
fdee07aadc1b5224a540c7e8893144207e1979cb.Causes build failures when is cross-compiling to aarch64,
| CGO_ENABLED=1 aarch64-linaro-linux-go build -i -tags " cgo
static_build" -ldflags "-w -extldflags -static -X main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X main.version=1.0.0-rc3 " -o runc .
...| /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link: running aarch64-linaro-linux-gcc failed: exit status 1 | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crt1.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crti.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crtbeginT.o: No such file or directory...
Signed-off-by Aníbal Limón <[email protected]>--- recipes-containers/runc/runc.inc | 3 +++ 1 file changed, 3 insertions(+)recipes-containers/runc/runc.inc +2
-0@@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''" inherit goarch do_compile() { + export GOARCH="${TARGET_GOARCH}" + export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" # Set GOPATH. See 'PACKAGERS.md'. Don't rely on # docker to download its dependencies but rather # use dependencies packaged independently.recipes-containers/runc/runc.inc do_compile() { · line 40
Quoted 7 lines
recipes-containers/runc/runc.inc +1
-0@@ -32,6 +34,7 @@ do_compile() { (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" # Fix up symlink for go-cross compiler rm -f ${S}/src/import/vendor/srcIt seems like we have conflicting changes :( Reverting this patch will break cross-compilation of runc-opencontainers for x86-64 with musl libc again.
Quoted 3 lines
I'll try cross-compiling both runc variants for arm, aarch64, x86 and x86-64 and see if I can find a solution that works for everything.
Quoted 9 lines
Agreed.
I'll hold off on any revert until I hear from your tests.
For the configs I'm using everything is building with the current set of changes.
Bruce
I can re-produce the failure by building runc-docker for raspberrypi3-64. However, runc-opencontainers builds successfully for raspberrypi3-64. So at worst we can add a do_compile_prepend() in the recipe for runc-docker (but not the common .inc file). However, the whole thing looks wrong, GOROOT shouldn't be pointing at the native sysroot at all. There's probably something strange going on in the runc-docker makefile.
I'm away for the next couple of days but will then get back to this.
Cheers,
Signature · 2 lines
Paul Barker Togán Labs Ltd
Quoted 22 lines · Paul Barker
Quoted 10 lines · Bruce Ashfield
Quoted 8 lines · Paul Barker
It seems like we have conflicting changes :( Reverting this patch will break cross-compilation of runc-opencontainers for x86-64 with musl libc again.
I'll try cross-compiling both runc variants for arm, aarch64, x86 and x86-64 and see if I can find a solution that works for everything.
Quoted 9 lines
Agreed.
I'll hold off on any revert until I hear from your tests.
For the configs I'm using everything is building with the current set of changes.
Bruce
Quoted 8 lines
I can re-produce the failure by building runc-docker for raspberrypi3-64. However, runc-opencontainers builds successfully for raspberrypi3-64. So at worst we can add a
do_compile_prepend()in the recipe for runc-docker (but not the common .inc file). However, the whole thing looks wrong, GOROOT shouldn't be pointing at the native sysroot at all. There's probably something strange going on in the runc-docker makefile.
I've found that the issue is with building the recvtty demo/reference application within runc-docker. That's under a contrib directory in the source tree and isn't a core part of the runc application. If I patch out the line in the Makefile which builds recvtty then the build succeeds for all platforms I build tested (qemux86, qemux86-64, raspberrypi, raspberrypi2, raspberrypi3, raspberrypi3-64).
So I'm going to propose we just patch out the compilation of recvtty for this recipe unless someone is actually using it. Aníbal, is this ok for you?
Thanks,
Signature · 2 lines
Paul Barker Togán Labs Ltd
Quoted 41 lines · Paul Barker
Quoted 3 lines · Paul Barker
Quoted 1 line · Bruce Ashfield
On Mon, Oct 9, 2017 at 5:56 PM, Paul Barker <[email protected]>
Quoted 19 lines · wrote:
Quoted 9 lines
Quoted 8 lines
It seems like we have conflicting changes :( Reverting this patch will break cross-compilation of runc-opencontainers for x86-64 with musl libc again.
I'll try cross-compiling both runc variants for arm, aarch64, x86 and x86-64 and see if I can find a solution that works for everything.
Quoted 9 lines
Agreed.
I'll hold off on any revert until I hear from your tests.
For the configs I'm using everything is building with the current set of changes.
Bruce
Quoted 8 lines
I can re-produce the failure by building runc-docker for raspberrypi3-64. However, runc-opencontainers builds successfully for raspberrypi3-64. So at worst we can add a
do_compile_prepend()in the recipe for runc-docker (but not the common .inc file). However, the whole thing looks wrong, GOROOT shouldn't be pointing at the native sysroot at all. There's probably something strange going on in the runc-docker makefile.I've found that the issue is with building the recvtty demo/reference application within runc-docker. That's under a contrib directory in the source tree and isn't a core part of the runc application. If I patch out the line in the
Makefilewhich builds recvtty then the build succeeds for all platforms I build tested (qemux86, qemux86-64, raspberrypi, raspberrypi2, raspberrypi3, raspberrypi3-64).
Quoted 4 lines
So I'm going to propose we just patch out the compilation of recvtty for this recipe unless someone is actually using it. Aníbal, is this ok for you?
Hi Paul,
For me is ok, i think the recvtty makefile needs to be fixed but since is a demo application i don't see any problem to disable the build of it.
Cheers,
Anibal
Quoted 7 lines
Thanks,
--
Paul Barker
Togán Labs Ltd