From dfceafea9fa1291de4a9f3fb748e7be5b423d370 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Thu, 11 Apr 2019 22:20:04 -0400 Subject: cri-o: fixup build After oe-core commits 5f48939e2640 [goarch.bbclass: use MACHINEOVERRIDES and simplify go_map_arm()] 6300c4a83f7c [go.bbclass:Export more GO* environment variables] we see a build failure with cri-o: | go build runtime/cgo: attempting to install package runtime/cgo into read-only GOROOT | Makefile:112: recipe for target 'conmon/config.h' failed | make: *** [conmon/config.h] Error 1 to avoid this we should not overwrite the GO* environment being setup by the go.bbclass, so we drop most of our GO* exports here. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- recipes-containers/cri-o/cri-o_git.bb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb index 2af3c125..cac55368 100644 --- a/recipes-containers/cri-o/cri-o_git.bb +++ b/recipes-containers/cri-o/cri-o_git.bb @@ -53,18 +53,8 @@ inherit pkgconfig EXTRA_OEMAKE="BUILDTAGS=''" do_compile() { - export GOARCH="${TARGET_GOARCH}" - export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" export GOPATH="${S}/src/import:${S}/src/import/vendor" - # Pass the needed cflags/ldflags so that cgo - # can find the needed headers files and libraries - export CGO_ENABLED="1" - export CFLAGS="" - export LDFLAGS="" - export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" - export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" - # link fixups for compilation rm -f ${S}/src/import/vendor/src ln -sf ./ ${S}/src/import/vendor/src @@ -82,15 +72,6 @@ do_compile() { ln -sf ../../../../version ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/version ln -sf ../../../../lib ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/lib - 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" - - # Pass the needed cflags/ldflags so that cgo - # can find the needed headers files and libraries - export CGO_ENABLED="1" - export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" - export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" - cd ${S}/src/import oe_runmake binaries -- cgit v1.2.3-54-g00ecf