diff options
author | Ricardo Ribalda Delgado <ricardo@ribalda.com> | 2019-06-21 10:06:02 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-21 15:32:36 +0100 |
commit | 1a82468d2d94b44cc122ee2172014d712e35563d (patch) | |
tree | 072265c51ded24b86f05d8b13b1508a67ead01ca /meta/recipes-devtools/go | |
parent | ed2a19f87e6e2d2a20d922f53c54632631fdcdc4 (diff) | |
download | poky-1a82468d2d94b44cc122ee2172014d712e35563d.tar.gz |
go: avoid host contamination by GOCACHE
By default GOCACHE is set to $HOME/.cache.
Fixes:
ERROR: go-cross-dbfp4-1.12.1-r0 do_compile: Function failed: do_compile (log file is located at /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120)
ERROR: Logfile of failure stored in: /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120
Log data follows:
| DEBUG: Executing shell function do_compile
| Building Go cmd/dist using /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/recipe-sysroot-native/usr/lib/go.
| failed to initialize build cache at /home/pokyuser/.cache/go-build: mkdir /home/pokyuser/.cache: permission denied
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120)
ERROR: Task (/workdir/repo/poky/meta/recipes-devtools/go/go-cross_1.12.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 23 tasks of which 16 didn't need to be rerun and 1 failed.
(From OE-Core rev: 9a6d208b9979035bbfc1def80fb6558db4bddb12)
Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go')
-rw-r--r-- | meta/recipes-devtools/go/go-cross.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-runtime.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-target.inc | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc index 29ce7f6e84..3d344a74d3 100644 --- a/meta/recipes-devtools/go/go-cross.inc +++ b/meta/recipes-devtools/go/go-cross.inc | |||
@@ -14,6 +14,7 @@ export GO386 = "${TARGET_GO386}" | |||
14 | export GOMIPS = "${TARGET_GOMIPS}" | 14 | export GOMIPS = "${TARGET_GOMIPS}" |
15 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" | 15 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" |
16 | export GOROOT_FINAL = "${libdir}/go" | 16 | export GOROOT_FINAL = "${libdir}/go" |
17 | export GOCACHE = "${B}/.cache" | ||
17 | CC = "${@d.getVar('BUILD_CC').strip()}" | 18 | CC = "${@d.getVar('BUILD_CC').strip()}" |
18 | 19 | ||
19 | do_configure[noexec] = "1" | 20 | do_configure[noexec] = "1" |
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc index c219aa3789..e282195619 100644 --- a/meta/recipes-devtools/go/go-runtime.inc +++ b/meta/recipes-devtools/go/go-runtime.inc | |||
@@ -15,6 +15,7 @@ export CGO_CFLAGS = "${CFLAGS}" | |||
15 | export CGO_CPPFLAGS = "${CPPFLAGS}" | 15 | export CGO_CPPFLAGS = "${CPPFLAGS}" |
16 | export CGO_CXXFLAGS = "${CXXFLAGS}" | 16 | export CGO_CXXFLAGS = "${CXXFLAGS}" |
17 | export CGO_LDFLAGS = "${LDFLAGS}" | 17 | export CGO_LDFLAGS = "${LDFLAGS}" |
18 | export GOCACHE = "${B}/.cache" | ||
18 | 19 | ||
19 | GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" | 20 | GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" |
20 | GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"' | 21 | GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"' |
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc index 379f87b498..91efd3e977 100644 --- a/meta/recipes-devtools/go/go-target.inc +++ b/meta/recipes-devtools/go/go-target.inc | |||
@@ -10,6 +10,7 @@ export GO386 = "${TARGET_GO386}" | |||
10 | export GOMIPS = "${TARGET_GOMIPS}" | 10 | export GOMIPS = "${TARGET_GOMIPS}" |
11 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" | 11 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" |
12 | export GOROOT_FINAL = "${libdir}/go" | 12 | export GOROOT_FINAL = "${libdir}/go" |
13 | export GOCACHE = "${B}/.cache" | ||
13 | GO_LDFLAGS = "" | 14 | GO_LDFLAGS = "" |
14 | GO_LDFLAGS_class-nativesdk = "-linkmode external" | 15 | GO_LDFLAGS_class-nativesdk = "-linkmode external" |
15 | export GO_LDFLAGS | 16 | export GO_LDFLAGS |