* [krogoth][PATCH] docker: override GOROOT at build time
@ 2018-01-30 18:02 Fabio Berton
2018-01-30 22:12 ` Bruce Ashfield
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Berton @ 2018-01-30 18:02 UTC (permalink / raw)
To: meta-virtualization; +Cc: Bruce Ashfield
From: Yunguo Wei <yunguo.wei@windriver.com>
Usually $GOROOT is set by go tool, but if sstate is specified, $GOROOT
is set to the path in the first project. If docker is built in the
another project(with same SSTATE_DIR) later, and the first project is removed,
the following error will be seen:
| go: cannot find GOROOT directory:
/path/to/previous/project/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/x86_64-wrs-linux/go
This commit is overriding $GOROOT stored in the go tool in sstate cache,
making sure it is set to the correct path in current project.
See more information here: https://golang.org/doc/install#install
Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
(cherry picked from commit 01aa8f18196d76d4554649c47348fb68277574c5)
---
recipes-containers/docker/docker_git.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index 42a336e..898957b 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -80,6 +80,7 @@ do_compile() {
mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+ export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
cd -
# Pass the needed cflags/ldflags so that cgo
--
2.14.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [krogoth][PATCH] docker: override GOROOT at build time
2018-01-30 18:02 [krogoth][PATCH] docker: override GOROOT at build time Fabio Berton
@ 2018-01-30 22:12 ` Bruce Ashfield
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2018-01-30 22:12 UTC (permalink / raw)
To: Fabio Berton, meta-virtualization
On 2018-01-30 1:02 PM, Fabio Berton wrote:
> From: Yunguo Wei <yunguo.wei@windriver.com>
>
> Usually $GOROOT is set by go tool, but if sstate is specified, $GOROOT
> is set to the path in the first project. If docker is built in the
> another project(with same SSTATE_DIR) later, and the first project is removed,
> the following error will be seen:
>
> | go: cannot find GOROOT directory:
> /path/to/previous/project/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/x86_64-wrs-linux/go
>
> This commit is overriding $GOROOT stored in the go tool in sstate cache,
> making sure it is set to the correct path in current project.
>
> See more information here: https://golang.org/doc/install#install
>
merged to krogoth
Bruce
> Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> (cherry picked from commit 01aa8f18196d76d4554649c47348fb68277574c5)
> ---
> recipes-containers/docker/docker_git.bb | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
> index 42a336e..898957b 100644
> --- a/recipes-containers/docker/docker_git.bb
> +++ b/recipes-containers/docker/docker_git.bb
> @@ -80,6 +80,7 @@ do_compile() {
> mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
> ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
> export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
> + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
> cd -
>
> # Pass the needed cflags/ldflags so that cgo
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-30 22:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 18:02 [krogoth][PATCH] docker: override GOROOT at build time Fabio Berton
2018-01-30 22:12 ` Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.