* [Buildroot] [PATCH v1 2/3] package/go-bootstrap-stage3: add stage3 for go1.22 support
2024-03-07 1:51 [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13 Christian Stewart via buildroot
@ 2024-03-07 1:51 ` Christian Stewart via buildroot
2024-03-25 22:36 ` Arnout Vandecappelle via buildroot
2024-03-07 1:51 ` [Buildroot] [PATCH v1 3/3] package/go: bump to version go1.22.1 Christian Stewart via buildroot
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Christian Stewart via buildroot @ 2024-03-07 1:51 UTC (permalink / raw)
To: buildroot
Cc: Christian Stewart, Anisse Astier, Thomas Petazzoni,
Yann E . MORIN
Add a third bootstrap stage with Go1.21.x necessary for go1.22 bootstrap.
go-bootstrap-stage1 is Go1.4.x, the final version to support bootstrap using a C
compiler (later versions require the Go compiler for bootstrapping).
See: https://go.dev/doc/install/source#bootstrapFromSource
go-bootstrap-stage2 is Go 1.19.13, the last version to support bootstrap using
the Go1.4.x compiler.
go-bootstrap-stage3 is Go 1.21.8, the last version to support bootstrap using
the Go1.19.13 compiler. Go 1.20 requires a minimum of go 1.17.13 to bootstrap.
See: https://go.dev/doc/go1.20#bootstrap
This patch is in preparation for bumping the host-go package to >go1.22.x, which
requires a minimum of Go1.20.x for bootstrap.
See: https://go.dev/doc/go1.22#bootstrap
Signed-off-by: Christian Stewart <christian@aperture.us>
---
DEVELOPERS | 1 +
package/Config.in.host | 1 +
package/go-bootstrap-stage3/Config.in.host | 4 ++
.../go-bootstrap-stage3.hash | 3 ++
.../go-bootstrap-stage3.mk | 53 +++++++++++++++++++
5 files changed, 62 insertions(+)
create mode 100644 package/go-bootstrap-stage3/Config.in.host
create mode 100644 package/go-bootstrap-stage3/go-bootstrap-stage3.hash
create mode 100644 package/go-bootstrap-stage3/go-bootstrap-stage3.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index a6364cdd44..abcf29b2fc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -595,6 +595,7 @@ F: package/fuse-overlayfs/
F: package/go/
F: package/go-bootstrap-stage1/
F: package/go-bootstrap-stage2/
+F: package/go-bootstrap-stage3/
F: package/gocryptfs/
F: package/mbpfan/
F: package/moby-buildkit/
diff --git a/package/Config.in.host b/package/Config.in.host
index f03ca16b7b..9543a22ffc 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -46,6 +46,7 @@ menu "Host utilities"
source "package/go/Config.in.host"
source "package/go-bootstrap-stage1/Config.in.host"
source "package/go-bootstrap-stage2/Config.in.host"
+ source "package/go-bootstrap-stage3/Config.in.host"
source "package/google-breakpad/Config.in.host"
source "package/gptfdisk/Config.in.host"
source "package/imagemagick/Config.in.host"
diff --git a/package/go-bootstrap-stage3/Config.in.host b/package/go-bootstrap-stage3/Config.in.host
new file mode 100644
index 0000000000..1714c2fb15
--- /dev/null
+++ b/package/go-bootstrap-stage3/Config.in.host
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
+ bool
+ default y
+ depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS
diff --git a/package/go-bootstrap-stage3/go-bootstrap-stage3.hash b/package/go-bootstrap-stage3/go-bootstrap-stage3.hash
new file mode 100644
index 0000000000..b1aed10c7c
--- /dev/null
+++ b/package/go-bootstrap-stage3/go-bootstrap-stage3.hash
@@ -0,0 +1,3 @@
+# From https://go.dev/dl
+sha256 dc806cf75a87e1414b5b4c3dcb9dd3e9cc98f4cfccec42b7af617d5a658a3c43 go1.21.8.src.tar.gz
+sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE
diff --git a/package/go-bootstrap-stage3/go-bootstrap-stage3.mk b/package/go-bootstrap-stage3/go-bootstrap-stage3.mk
new file mode 100644
index 0000000000..553256bcb8
--- /dev/null
+++ b/package/go-bootstrap-stage3/go-bootstrap-stage3.mk
@@ -0,0 +1,53 @@
+################################################################################
+#
+# go-bootstrap-stage3
+#
+################################################################################
+
+# Use last Go version that go-bootstrap-stage2 can build: v1.21.x
+# See https://go.dev/doc/go1.22#bootstrap
+GO_BOOTSTRAP_STAGE3_VERSION = 1.21.8
+GO_BOOTSTRAP_STAGE3_SITE = https://storage.googleapis.com/golang
+GO_BOOTSTRAP_STAGE3_SOURCE = go$(GO_BOOTSTRAP_STAGE3_VERSION).src.tar.gz
+
+GO_BOOTSTRAP_STAGE3_LICENSE = BSD-3-Clause
+GO_BOOTSTRAP_STAGE3_LICENSE_FILES = LICENSE
+
+# Use go-bootstrap-stage2 to bootstrap.
+HOST_GO_BOOTSTRAP_STAGE3_DEPENDENCIES = host-go-bootstrap-stage2
+
+HOST_GO_BOOTSTRAP_STAGE3_ROOT = $(HOST_DIR)/lib/go-$(GO_BOOTSTRAP_STAGE3_VERSION)
+
+# The go build system is not compatible with ccache, so use
+# HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685.
+HOST_GO_BOOTSTRAP_STAGE3_MAKE_ENV = \
+ GO111MODULE=off \
+ GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE2_ROOT) \
+ GOROOT_FINAL=$(HOST_GO_BOOTSTRAP_STAGE3_ROOT) \
+ GOROOT="$(@D)" \
+ GOBIN="$(@D)/bin" \
+ GOOS=linux \
+ CC=$(HOSTCC_NOCCACHE) \
+ CXX=$(HOSTCXX_NOCCACHE) \
+ CGO_ENABLED=0
+
+define HOST_GO_BOOTSTRAP_STAGE3_BUILD_CMDS
+ cd $(@D)/src && \
+ $(HOST_GO_BOOTSTRAP_STAGE3_MAKE_ENV) ./make.bash $(if $(VERBOSE),-v)
+endef
+
+define HOST_GO_BOOTSTRAP_STAGE3_INSTALL_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/bin/go
+ $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/bin/gofmt
+
+ cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/
+
+ mkdir -p $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/pkg
+ cp -a $(@D)/pkg/include $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/pkg/
+ cp -a $(@D)/pkg/tool $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/pkg/
+
+ # The Go sources must be installed to the host/ tree for the Go stdlib.
+ cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/
+endef
+
+$(eval $(host-generic-package))
--
2.44.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [Buildroot] [PATCH v1 2/3] package/go-bootstrap-stage3: add stage3 for go1.22 support
2024-03-07 1:51 ` [Buildroot] [PATCH v1 2/3] package/go-bootstrap-stage3: add stage3 for go1.22 support Christian Stewart via buildroot
@ 2024-03-25 22:36 ` Arnout Vandecappelle via buildroot
2024-03-25 22:54 ` Christian Stewart via buildroot
0 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-03-25 22:36 UTC (permalink / raw)
To: Christian Stewart, buildroot
Cc: Anisse Astier, Thomas Petazzoni, Yann E . MORIN
On 07/03/2024 02:51, Christian Stewart via buildroot wrote:
> Add a third bootstrap stage with Go1.21.x necessary for go1.22 bootstrap.
>
> go-bootstrap-stage1 is Go1.4.x, the final version to support bootstrap using a C
> compiler (later versions require the Go compiler for bootstrapping).
>
> See: https://go.dev/doc/install/source#bootstrapFromSource
>
> go-bootstrap-stage2 is Go 1.19.13, the last version to support bootstrap using
> the Go1.4.x compiler.
>
> go-bootstrap-stage3 is Go 1.21.8, the last version to support bootstrap using
> the Go1.19.13 compiler. Go 1.20 requires a minimum of go 1.17.13 to bootstrap.
>
> See: https://go.dev/doc/go1.20#bootstrap
>
> This patch is in preparation for bumping the host-go package to >go1.22.x, which
> requires a minimum of Go1.20.x for bootstrap.
>
> See: https://go.dev/doc/go1.22#bootstrap
>
> Signed-off-by: Christian Stewart <christian@aperture.us>
> ---
> DEVELOPERS | 1 +
> package/Config.in.host | 1 +
> package/go-bootstrap-stage3/Config.in.host | 4 ++
> .../go-bootstrap-stage3.hash | 3 ++
> .../go-bootstrap-stage3.mk | 53 +++++++++++++++++++
> 5 files changed, 62 insertions(+)
> create mode 100644 package/go-bootstrap-stage3/Config.in.host
> create mode 100644 package/go-bootstrap-stage3/go-bootstrap-stage3.hash
> create mode 100644 package/go-bootstrap-stage3/go-bootstrap-stage3.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index a6364cdd44..abcf29b2fc 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -595,6 +595,7 @@ F: package/fuse-overlayfs/
> F: package/go/
> F: package/go-bootstrap-stage1/
> F: package/go-bootstrap-stage2/
> +F: package/go-bootstrap-stage3/
> F: package/gocryptfs/
> F: package/mbpfan/
> F: package/moby-buildkit/
> diff --git a/package/Config.in.host b/package/Config.in.host
> index f03ca16b7b..9543a22ffc 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -46,6 +46,7 @@ menu "Host utilities"
> source "package/go/Config.in.host"
> source "package/go-bootstrap-stage1/Config.in.host"
> source "package/go-bootstrap-stage2/Config.in.host"
> + source "package/go-bootstrap-stage3/Config.in.host"
> source "package/google-breakpad/Config.in.host"
> source "package/gptfdisk/Config.in.host"
> source "package/imagemagick/Config.in.host"
> diff --git a/package/go-bootstrap-stage3/Config.in.host b/package/go-bootstrap-stage3/Config.in.host
> new file mode 100644
> index 0000000000..1714c2fb15
> --- /dev/null
> +++ b/package/go-bootstrap-stage3/Config.in.host
> @@ -0,0 +1,4 @@
> +config BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
> + bool
> + default y
> + depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS
> diff --git a/package/go-bootstrap-stage3/go-bootstrap-stage3.hash b/package/go-bootstrap-stage3/go-bootstrap-stage3.hash
> new file mode 100644
> index 0000000000..b1aed10c7c
> --- /dev/null
> +++ b/package/go-bootstrap-stage3/go-bootstrap-stage3.hash
> @@ -0,0 +1,3 @@
> +# From https://go.dev/dl
> +sha256 dc806cf75a87e1414b5b4c3dcb9dd3e9cc98f4cfccec42b7af617d5a658a3c43 go1.21.8.src.tar.gz
> +sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE
> diff --git a/package/go-bootstrap-stage3/go-bootstrap-stage3.mk b/package/go-bootstrap-stage3/go-bootstrap-stage3.mk
> new file mode 100644
> index 0000000000..553256bcb8
> --- /dev/null
> +++ b/package/go-bootstrap-stage3/go-bootstrap-stage3.mk
> @@ -0,0 +1,53 @@
> +################################################################################
> +#
> +# go-bootstrap-stage3
> +#
> +################################################################################
> +
> +# Use last Go version that go-bootstrap-stage2 can build: v1.21.x
> +# See https://go.dev/doc/go1.22#bootstrap
> +GO_BOOTSTRAP_STAGE3_VERSION = 1.21.8
> +GO_BOOTSTRAP_STAGE3_SITE = https://storage.googleapis.com/golang
> +GO_BOOTSTRAP_STAGE3_SOURCE = go$(GO_BOOTSTRAP_STAGE3_VERSION).src.tar.gz
> +
> +GO_BOOTSTRAP_STAGE3_LICENSE = BSD-3-Clause
> +GO_BOOTSTRAP_STAGE3_LICENSE_FILES = LICENSE
> +
> +# Use go-bootstrap-stage2 to bootstrap.
> +HOST_GO_BOOTSTRAP_STAGE3_DEPENDENCIES = host-go-bootstrap-stage2
> +
> +HOST_GO_BOOTSTRAP_STAGE3_ROOT = $(HOST_DIR)/lib/go-$(GO_BOOTSTRAP_STAGE3_VERSION)
> +
> +# The go build system is not compatible with ccache, so use
> +# HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685.
> +HOST_GO_BOOTSTRAP_STAGE3_MAKE_ENV = \
> + GO111MODULE=off \
> + GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE2_ROOT) \
> + GOROOT_FINAL=$(HOST_GO_BOOTSTRAP_STAGE3_ROOT) \
> + GOROOT="$(@D)" \
> + GOBIN="$(@D)/bin" \
> + GOOS=linux \
> + CC=$(HOSTCC_NOCCACHE) \
> + CXX=$(HOSTCXX_NOCCACHE) \
> + CGO_ENABLED=0
When trying to build in the context of the runtime tests, I get this error:
cd /home/tmp/brtest/TestMender/build/host-go-bootstrap-stage3-1.21.8/src &&
GO111MODULE=off GOROOT_BOOTSTRAP=/home/tmp/brtest/TestMender/host/lib/go-1.19.13
GOROOT_FINAL=/home/tmp/brtest/TestMender/host/lib/go-1.21.8
GOROOT="/home/tmp/brtest/TestMender/build/host-go-bootstrap-stage3-1.21.8"
GOBIN="/home/tmp/brtest/TestMender/build/host-go-bootstrap-stage3-1.21.8/bin"
GOOS=linux CC=/usr/bin/gcc CXX=/usr/bin/g++ CGO_ENABLED=0 ./make.bash
Building Go cmd/dist using /home/tmp/brtest/TestMender/host/lib/go-1.19.13.
(go1.19.13 linux/amd64)
build cache is required, but could not be located: GOCACHE is not defined and
neither $XDG_CACHE_HOME nor $HOME are defined
I suspect that we need either GOCACHE=$(HOST_GO_HOST_CACHE) or GOCACHE=(some
other path). I tested with the first option and that seems to work. So I made
that change and committed. Let's see if the autobuilders complain...
Regards,
Arnout
> +
> +define HOST_GO_BOOTSTRAP_STAGE3_BUILD_CMDS
> + cd $(@D)/src && \
> + $(HOST_GO_BOOTSTRAP_STAGE3_MAKE_ENV) ./make.bash $(if $(VERBOSE),-v)
> +endef
> +
> +define HOST_GO_BOOTSTRAP_STAGE3_INSTALL_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/bin/go
> + $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/bin/gofmt
> +
> + cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/
> +
> + mkdir -p $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/pkg
> + cp -a $(@D)/pkg/include $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/pkg/
> + cp -a $(@D)/pkg/tool $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/pkg/
> +
> + # The Go sources must be installed to the host/ tree for the Go stdlib.
> + cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_STAGE3_ROOT)/
> +endef
> +
> +$(eval $(host-generic-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v1 2/3] package/go-bootstrap-stage3: add stage3 for go1.22 support
2024-03-25 22:36 ` Arnout Vandecappelle via buildroot
@ 2024-03-25 22:54 ` Christian Stewart via buildroot
0 siblings, 0 replies; 12+ messages in thread
From: Christian Stewart via buildroot @ 2024-03-25 22:54 UTC (permalink / raw)
To: Arnout Vandecappelle
Cc: Yann E . MORIN, Anisse Astier, Thomas Petazzoni, buildroot
Hi Arnout,
On Mon, Mar 25, 2024 at 3:36 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> When trying to build in the context of the runtime tests, I get this error:
>
> cd /home/tmp/brtest/TestMender/build/host-go-bootstrap-stage3-1.21.8/src &&
> GO111MODULE=off GOROOT_BOOTSTRAP=/home/tmp/brtest/TestMender/host/lib/go-1.19.13
> GOROOT_FINAL=/home/tmp/brtest/TestMender/host/lib/go-1.21.8
> GOROOT="/home/tmp/brtest/TestMender/build/host-go-bootstrap-stage3-1.21.8"
> GOBIN="/home/tmp/brtest/TestMender/build/host-go-bootstrap-stage3-1.21.8/bin"
> GOOS=linux CC=/usr/bin/gcc CXX=/usr/bin/g++ CGO_ENABLED=0 ./make.bash
> Building Go cmd/dist using /home/tmp/brtest/TestMender/host/lib/go-1.19.13.
> (go1.19.13 linux/amd64)
> build cache is required, but could not be located: GOCACHE is not defined and
> neither $XDG_CACHE_HOME nor $HOME are defined
>
> I suspect that we need either GOCACHE=$(HOST_GO_HOST_CACHE) or GOCACHE=(some
> other path). I tested with the first option and that seems to work. So I made
> that change and committed. Let's see if the autobuilders complain...
Sounds like the right fix to me, thanks!
Christian
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v1 3/3] package/go: bump to version go1.22.1
2024-03-07 1:51 [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13 Christian Stewart via buildroot
2024-03-07 1:51 ` [Buildroot] [PATCH v1 2/3] package/go-bootstrap-stage3: add stage3 for go1.22 support Christian Stewart via buildroot
@ 2024-03-07 1:51 ` Christian Stewart via buildroot
2024-03-25 22:36 ` [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13 Arnout Vandecappelle via buildroot
2024-05-14 8:23 ` Thomas Petazzoni via buildroot
3 siblings, 0 replies; 12+ messages in thread
From: Christian Stewart via buildroot @ 2024-03-07 1:51 UTC (permalink / raw)
To: buildroot
Cc: Christian Stewart, Anisse Astier, Thomas Petazzoni,
Yann E . MORIN
Upgrade Go to the latest v1.22.x point release, go1.22.1.
This requires go-bootstrap-stage3 at version go1.21.8:
See: https://go.dev/doc/go1.22#bootstrap
https://go.dev/doc/devel/release#go1.22.1
Signed-off-by: Christian Stewart <christian@aperture.us>
---
package/go/Config.in.host | 4 ++--
package/go/go.hash | 2 +-
package/go/go.mk | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package/go/Config.in.host b/package/go/Config.in.host
index b87b862cec..0d89e875ad 100644
--- a/package/go/Config.in.host
+++ b/package/go/Config.in.host
@@ -2,7 +2,7 @@
config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
bool
default y
- depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
# See https://go.dev/doc/install/source#environment
# See src/go/build/syslist.go for the list of supported architectures
depends on (BR2_arm && BR2_TOOLCHAIN_SUPPORTS_PIE) || BR2_aarch64 \
@@ -30,4 +30,4 @@ config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
bool
default y
- depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
diff --git a/package/go/go.hash b/package/go/go.hash
index b1aed10c7c..06d8776db2 100644
--- a/package/go/go.hash
+++ b/package/go/go.hash
@@ -1,3 +1,3 @@
# From https://go.dev/dl
-sha256 dc806cf75a87e1414b5b4c3dcb9dd3e9cc98f4cfccec42b7af617d5a658a3c43 go1.21.8.src.tar.gz
+sha256 79c9b91d7f109515a25fc3ecdaad125d67e6bdb54f6d4d98580f46799caea321 go1.22.1.src.tar.gz
sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE
diff --git a/package/go/go.mk b/package/go/go.mk
index 3ca055b25d..a8ec5d95a0 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -4,7 +4,7 @@
#
################################################################################
-GO_VERSION = 1.21.8
+GO_VERSION = 1.22.1
GO_SITE = https://storage.googleapis.com/golang
GO_SOURCE = go$(GO_VERSION).src.tar.gz
@@ -12,7 +12,7 @@ GO_LICENSE = BSD-3-Clause
GO_LICENSE_FILES = LICENSE
GO_CPE_ID_VENDOR = golang
-HOST_GO_DEPENDENCIES = host-go-bootstrap-stage2
+HOST_GO_DEPENDENCIES = host-go-bootstrap-stage3
HOST_GO_GOPATH = $(HOST_DIR)/share/go-path
HOST_GO_HOST_CACHE = $(HOST_DIR)/share/host-go-cache
HOST_GO_ROOT = $(HOST_DIR)/lib/go
@@ -128,7 +128,7 @@ HOST_GO_HOST_ENV = \
HOST_GO_MAKE_ENV = \
GO111MODULE=off \
GOCACHE=$(HOST_GO_HOST_CACHE) \
- GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE2_ROOT) \
+ GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE3_ROOT) \
GOROOT_FINAL=$(HOST_GO_ROOT) \
GOROOT="$(@D)" \
GOBIN="$(@D)/bin" \
--
2.44.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13
2024-03-07 1:51 [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13 Christian Stewart via buildroot
2024-03-07 1:51 ` [Buildroot] [PATCH v1 2/3] package/go-bootstrap-stage3: add stage3 for go1.22 support Christian Stewart via buildroot
2024-03-07 1:51 ` [Buildroot] [PATCH v1 3/3] package/go: bump to version go1.22.1 Christian Stewart via buildroot
@ 2024-03-25 22:36 ` Arnout Vandecappelle via buildroot
2024-04-27 17:29 ` Peter Korsgaard
2024-05-14 8:23 ` Thomas Petazzoni via buildroot
3 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-03-25 22:36 UTC (permalink / raw)
To: Christian Stewart, buildroot
Cc: Anisse Astier, Thomas Petazzoni, Yann E . MORIN
On 07/03/2024 02:51, Christian Stewart via buildroot wrote:
> Update to the latest 1.19.x version available.
>
> Signed-off-by: Christian Stewart <christian@aperture.us>
Applied all 3 to master, thanks, with a modification to patch 2 (see separate
mail).
Regards,
Arnout
> ---
> package/go-bootstrap-stage2/go-bootstrap-stage2.hash | 2 +-
> package/go-bootstrap-stage2/go-bootstrap-stage2.mk | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/go-bootstrap-stage2/go-bootstrap-stage2.hash b/package/go-bootstrap-stage2/go-bootstrap-stage2.hash
> index 6d4c718a40..d61663cac9 100644
> --- a/package/go-bootstrap-stage2/go-bootstrap-stage2.hash
> +++ b/package/go-bootstrap-stage2/go-bootstrap-stage2.hash
> @@ -1,3 +1,3 @@
> # From https://go.dev/dl
> -sha256 e25c9ab72d811142b7f41ff6da5165fec2d1be5feec3ef2c66bc0bdecb431489 go1.19.11.src.tar.gz
> +sha256 ccf36b53fb0024a017353c3ddb22c1f00bc7a8073c6aac79042da24ee34434d3 go1.19.13.src.tar.gz
> sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE
> diff --git a/package/go-bootstrap-stage2/go-bootstrap-stage2.mk b/package/go-bootstrap-stage2/go-bootstrap-stage2.mk
> index 72f3200a2e..98bf624b57 100644
> --- a/package/go-bootstrap-stage2/go-bootstrap-stage2.mk
> +++ b/package/go-bootstrap-stage2/go-bootstrap-stage2.mk
> @@ -6,7 +6,7 @@
>
> # Use last Go version that go-bootstrap-stage1 can build: v1.19.x
> # See https://golang.org/doc/install/source#bootstrapFromSource
> -GO_BOOTSTRAP_STAGE2_VERSION = 1.19.11
> +GO_BOOTSTRAP_STAGE2_VERSION = 1.19.13
> GO_BOOTSTRAP_STAGE2_SITE = https://storage.googleapis.com/golang
> GO_BOOTSTRAP_STAGE2_SOURCE = go$(GO_BOOTSTRAP_STAGE2_VERSION).src.tar.gz
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13
2024-03-07 1:51 [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13 Christian Stewart via buildroot
` (2 preceding siblings ...)
2024-03-25 22:36 ` [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13 Arnout Vandecappelle via buildroot
@ 2024-05-14 8:23 ` Thomas Petazzoni via buildroot
2024-05-14 11:39 ` Christian Stewart via buildroot
3 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-14 8:23 UTC (permalink / raw)
To: Christian Stewart via buildroot
Cc: Anisse Astier, Christian Stewart, Yann E . MORIN
Hello Christian,
On Wed, 6 Mar 2024 17:51:05 -0800
Christian Stewart via buildroot <buildroot@buildroot.org> wrote:
> Update to the latest 1.19.x version available.
>
> Signed-off-by: Christian Stewart <christian@aperture.us>
> ---
> package/go-bootstrap-stage2/go-bootstrap-stage2.hash | 2 +-
> package/go-bootstrap-stage2/go-bootstrap-stage2.mk | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
I don't think it's this patch causing the issue, but we have a Go build
failure in our Gitlab CI:
https://gitlab.com/buildroot.org/buildroot/-/jobs/6833307823
Could you have a look?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13
2024-05-14 8:23 ` Thomas Petazzoni via buildroot
@ 2024-05-14 11:39 ` Christian Stewart via buildroot
2024-05-14 23:38 ` Christian Stewart via buildroot
0 siblings, 1 reply; 12+ messages in thread
From: Christian Stewart via buildroot @ 2024-05-14 11:39 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Anisse Astier, Yann E . MORIN, Christian Stewart via buildroot
[-- Attachment #1.1: Type: text/plain, Size: 896 bytes --]
Hi Thomas,
On Tue, May 14, 2024, 1:23 AM Thomas Petazzoni <thomas.petazzoni@bootlin.com>
wrote:
> Hello Christian,
>
> On Wed, 6 Mar 2024 17:51:05 -0800
> Christian Stewart via buildroot <buildroot@buildroot.org> wrote:
>
> > Update to the latest 1.19.x version available.
> >
> > Signed-off-by: Christian Stewart <christian@aperture.us>
> > ---
> > package/go-bootstrap-stage2/go-bootstrap-stage2.hash | 2 +-
> > package/go-bootstrap-stage2/go-bootstrap-stage2.mk | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
>
> I don't think it's this patch causing the issue, but we have a Go build
> failure in our Gitlab CI:
>
> https://gitlab.com/buildroot.org/buildroot/-/jobs/6833307823
>
> Could you have a look?
>
This looks like we need to pass -buildvcs=false to Go. I'll have a look at
submitting a patch for this.
Thanks,
Christian Stewart
[-- Attachment #1.2: Type: text/html, Size: 1734 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13
2024-05-14 11:39 ` Christian Stewart via buildroot
@ 2024-05-14 23:38 ` Christian Stewart via buildroot
2024-05-16 7:07 ` Romain Naour
0 siblings, 1 reply; 12+ messages in thread
From: Christian Stewart via buildroot @ 2024-05-14 23:38 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Anisse Astier, Yann E . MORIN, Christian Stewart via buildroot
Hi Thomas,
On Tue, May 14, 2024 at 4:39 AM Christian Stewart <christian@aperture.us> wrote:
> On Tue, May 14, 2024, 1:23 AM Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
>>
>> I don't think it's this patch causing the issue, but we have a Go build
>> failure in our Gitlab CI:
>>
>> https://gitlab.com/buildroot.org/buildroot/-/jobs/6833307823
>>
>> Could you have a look?
>
> This looks like we need to pass -buildvcs=false to Go. I'll have a look at submitting a patch for this.
I found this commit in Go which fixed & added a test to ensure that
-buildvcs=false is set when GOROOT_BOOTSTRAP is set (which it was in
the failing job).
commit 42a46206b97ca7cf4246d3c1230a70cf42ad5bb0
Author: Bryan C. Mills <bcmills@google.com>
Date: Fri Sep 9 17:29:12 2022 -0400
cmd/go: omit VCS stamping during bootstrap
cmd/dist can't easily hard-code -buildvcs=false because not all
versions of cmd/go supported for bootstrapping recognize that flag.
However, we don't want to stamp the bootstrap binaries: the stamping
is redundant with the VERSION file writted during bootstrapping (which
is why it is normally omitted for standard-library packages and
commands), and it may also interfere with building the Go repo from a
source tarball or zip file.
Fixes #54852.
Change-Id: If223f094af137c4c202d6bf622619bd2da397ec4
Reviewed-on: https://go-review.googlesource.com/c/go/+/432435
See: https://github.com/golang/go/commit/42a46206b97ca7cf4246d3c1230a70cf42ad5bb0
However it seems that bootstrap step is failing due to -buildvcs=false
not being set.
I will try to debug further. This could be a Go regression.
Best regards,
Christian Stewart
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13
2024-05-14 23:38 ` Christian Stewart via buildroot
@ 2024-05-16 7:07 ` Romain Naour
2024-05-16 9:06 ` Christian Stewart via buildroot
0 siblings, 1 reply; 12+ messages in thread
From: Romain Naour @ 2024-05-16 7:07 UTC (permalink / raw)
To: Christian Stewart, Thomas Petazzoni
Cc: Christian Stewart via buildroot, Anisse Astier, Yann E . MORIN
Hello Christian, All,
Le 15/05/2024 à 01:38, Christian Stewart via buildroot a écrit :
> Hi Thomas,
>
> On Tue, May 14, 2024 at 4:39 AM Christian Stewart <christian@aperture.us> wrote:
>> On Tue, May 14, 2024, 1:23 AM Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
>>>
>>> I don't think it's this patch causing the issue, but we have a Go build
>>> failure in our Gitlab CI:
>>>
>>> https://gitlab.com/buildroot.org/buildroot/-/jobs/6833307823
>>>
>>> Could you have a look?
>>
>> This looks like we need to pass -buildvcs=false to Go. I'll have a look at submitting a patch for this.
>
> I found this commit in Go which fixed & added a test to ensure that
> -buildvcs=false is set when GOROOT_BOOTSTRAP is set (which it was in
> the failing job).
>
> commit 42a46206b97ca7cf4246d3c1230a70cf42ad5bb0
> Author: Bryan C. Mills <bcmills@google.com>
> Date: Fri Sep 9 17:29:12 2022 -0400
>
> cmd/go: omit VCS stamping during bootstrap
>
> cmd/dist can't easily hard-code -buildvcs=false because not all
> versions of cmd/go supported for bootstrapping recognize that flag.
>
> However, we don't want to stamp the bootstrap binaries: the stamping
> is redundant with the VERSION file writted during bootstrapping (which
> is why it is normally omitted for standard-library packages and
> commands), and it may also interfere with building the Go repo from a
> source tarball or zip file.
>
> Fixes #54852.
>
> Change-Id: If223f094af137c4c202d6bf622619bd2da397ec4
> Reviewed-on: https://go-review.googlesource.com/c/go/+/432435
>
> See: https://github.com/golang/go/commit/42a46206b97ca7cf4246d3c1230a70cf42ad5bb0
>
> However it seems that bootstrap step is failing due to -buildvcs=false
> not being set.
>
> I will try to debug further. This could be a Go regression.
I tried to reproduce using docker-run script but the build succeed.
Actually this issue remind me the issue we had with newer git release and how
gitlab checks out the repository:
https://gitlab.com/buildroot.org/buildroot/-/commit/a016b693f7830f3c8ae815851d3204b8b6e99821
Indeed, within gitlab-ci build context the build fail due to the ownership of
the (buildroot) git tree.
is go ignore the .gitconfig file somehow ?
Anyway, go should not try to use git to retrieve some info since we are not in
the go repository.
I applied the same patch "fix go-bootstrap when parent dir contains invalid
.git" from [1] to go-bootstrap-stage3
[1]
https://gitlab.com/buildroot.org/buildroot/-/commit/bc8e70a08ba083d978c828e31442a7645c9099d7
And the build succeed on gitlab-ci:
https://gitlab.com/kubu93/buildroot/-/jobs/6860670292
Best regards,
Romain
>
> Best regards,
> Christian Stewart
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v1 1/3] package/go-bootstrap-stage2: bump version to go1.19.13
2024-05-16 7:07 ` Romain Naour
@ 2024-05-16 9:06 ` Christian Stewart via buildroot
0 siblings, 0 replies; 12+ messages in thread
From: Christian Stewart via buildroot @ 2024-05-16 9:06 UTC (permalink / raw)
To: Romain Naour
Cc: Christian Stewart via buildroot, Anisse Astier, Thomas Petazzoni,
Yann E . MORIN
[-- Attachment #1.1: Type: text/plain, Size: 1030 bytes --]
Romain,
On Thu, May 16, 2024, 12:07 AM Romain Naour <romain.naour@smile.fr> wrote:
> Hello Christian, All,
>
> Le 15/05/2024 à 01:38, Christian Stewart via buildroot a écrit :
> Anyway, go should not try to use git to retrieve some info since we are
> not in
> the go repository.
>
> I applied the same patch "fix go-bootstrap when parent dir contains invalid
> .git" from [1] to go-bootstrap-stage3
>
> [1]
>
> https://gitlab.com/buildroot.org/buildroot/-/commit/bc8e70a08ba083d978c828e31442a7645c9099d7
>
> And the build succeed on gitlab-ci:
> https://gitlab.com/kubu93/buildroot/-/jobs/6860670292
>
> Best regards,
> Romain
>
Ah yes, a year ago (July 2023) I encountered this issue, added the patch to
buildroot, sent the patch upstream:
https://go-review.googlesource.com/c/go/+/513835#message-3e06cf20e68b78655fd3aa2af4a192e45bb29e63
- had review comments on that CL, but never got around to updating /
resubmitting it :(
Good to know that worked!
Best regards,
Christian Stewart
[-- Attachment #1.2: Type: text/html, Size: 1867 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread