From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Peter Korsgaard <peter@korsgaard.com>
Cc: Anisse Astier <anisse@astier.eu>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/go: set GOCACHE for download post-process
Date: Mon, 16 Jan 2023 21:26:11 +0100 [thread overview]
Message-ID: <20230116202611.GE2770@scaer> (raw)
In-Reply-To: <20230116105032.1890904-1-peter@korsgaard.com>
Peter, All,
On 2023-01-16 11:50 +0100, Peter Korsgaard spake thusly:
> The go mod vendor call in support/download/go-post-process accesses the go
> cache, so pass GOCACHE= in the environment to ensure our cache directory is
> used.
>
> The go cache defaults to ~/.cache/go-build if not set, so this fixes builds
> where that location (or GOCACHE if set in the environment) is not writable:
>
> rm -rf ~/.cache/go-build
> chmod -w ~/.cache
> make docker-compose-source
> ..
> failed to initialize build cache at /home/peko/.cache/go-build: mkdir /home/peko/.cache/go-build: permission denied
> make[1]: *** [package/pkg-generic.mk:189: /home/peko/source/buildroot/output/build/docker-compose-2.14.0/.stamp_downloaded] Error 1
>
> We use two different cache directories for target and host builds, but the
> download/vendoring should be independent of the architecture, so use the
> target variant even for host-only packages for simplicity.
>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/go/go.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/go/go.mk b/package/go/go.mk
> index d3ed07f03b..c4f72d403c 100644
> --- a/package/go/go.mk
> +++ b/package/go/go.mk
> @@ -25,6 +25,7 @@ HOST_GO_COMMON_ENV = \
> GOFLAGS=-mod=vendor \
> GOROOT="$(HOST_GO_ROOT)" \
> GOPATH="$(HOST_GO_GOPATH)" \
> + GOCACHE="$(HOST_GO_TARGET_CACHE)" \
> GOPROXY=off \
> PATH=$(BR_PATH) \
> GOBIN= \
> @@ -75,7 +76,6 @@ HOST_GO_TARGET_ENV = \
> $(HOST_GO_COMMON_ENV) \
> GOOS="linux" \
> GOARCH=$(GO_GOARCH) \
> - GOCACHE="$(HOST_GO_TARGET_CACHE)" \
> CC="$(TARGET_CC)" \
> CXX="$(TARGET_CXX)" \
> CGO_CFLAGS="$(TARGET_CFLAGS)" \
> --
> 2.30.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-01-16 20:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 10:50 [Buildroot] [PATCH 1/2] package/go: set GOCACHE for download post-process Peter Korsgaard
2023-01-16 10:50 ` [Buildroot] [PATCH 2/2] package/go: explicitly set GOMODCACHE Peter Korsgaard
2023-01-16 20:30 ` Yann E. MORIN
2023-01-16 20:52 ` Peter Korsgaard
2023-01-16 20:38 ` Christian Stewart via buildroot
2023-01-16 20:55 ` Peter Korsgaard
2023-01-16 21:35 ` Christian Stewart via buildroot
2023-01-17 9:27 ` Peter Korsgaard
2023-01-16 20:26 ` Yann E. MORIN [this message]
2023-01-16 20:36 ` [Buildroot] [PATCH 1/2] package/go: set GOCACHE for download post-process Christian Stewart via buildroot
2023-01-16 20:56 ` Peter Korsgaard
2023-01-17 9:27 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230116202611.GE2770@scaer \
--to=yann.morin.1998@free.fr \
--cc=anisse@astier.eu \
--cc=buildroot@buildroot.org \
--cc=peter@korsgaard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox