Skip to content

Conversation

tianon
Copy link
Member

@tianon tianon commented Aug 22, 2025

Changes:

Changes:

- docker-library/golang@0531844: Merge pull request docker-library/golang#571 from infosiftr/all-that-glitters-is-not-gold
- docker-library/golang@8426bbb: Explicitly install `gold` on `arm64`
@tianon tianon requested a review from a team as a code owner August 22, 2025 17:01
Copy link

Diff for 5d5efd6:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 17a12f7..76f9611 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -14,7 +14,7 @@ Directory: 1.24/alpine3.22
 
 Tags: 1.24.6-bookworm, 1.24-bookworm
 Architectures: amd64, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: c057a3a509ebb027cbba79248252dc6d6cde799c
+GitCommit: 8426bbb144ff4507d189ca12ee7e09c3545717ac
 Directory: 1.24/bookworm
 
 Tags: 1.24.6-nanoserver-ltsc2022, 1.24-nanoserver-ltsc2022
@@ -36,7 +36,7 @@ Constraints: nanoserver-ltsc2025, windowsservercore-ltsc2025
 Tags: 1.24.6-trixie, 1.24-trixie
 SharedTags: 1.24.6, 1.24
 Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 86aa8cede992eb96d9aea9038208be9384af71be
+GitCommit: 8426bbb144ff4507d189ca12ee7e09c3545717ac
 Directory: 1.24/trixie
 
 Tags: 1.24.6-windowsservercore-ltsc2022, 1.24-windowsservercore-ltsc2022
@@ -67,7 +67,7 @@ Directory: 1.25/alpine3.22
 
 Tags: 1.25.0-bookworm, 1.25-bookworm, 1-bookworm, bookworm
 Architectures: amd64, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 87f680b3862188425a9ad4a0a544f3c94f903b15
+GitCommit: 8426bbb144ff4507d189ca12ee7e09c3545717ac
 Directory: 1.25/bookworm
 
 Tags: 1.25.0-nanoserver-ltsc2022, 1.25-nanoserver-ltsc2022, 1-nanoserver-ltsc2022, nanoserver-ltsc2022
@@ -89,7 +89,7 @@ Constraints: nanoserver-ltsc2025, windowsservercore-ltsc2025
 Tags: 1.25.0-trixie, 1.25-trixie, 1-trixie, trixie
 SharedTags: 1.25.0, 1.25, 1, latest
 Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 87f680b3862188425a9ad4a0a544f3c94f903b15
+GitCommit: 8426bbb144ff4507d189ca12ee7e09c3545717ac
 Directory: 1.25/trixie
 
 Tags: 1.25.0-windowsservercore-ltsc2022, 1.25-windowsservercore-ltsc2022, 1-windowsservercore-ltsc2022, windowsservercore-ltsc2022
@@ -120,11 +120,11 @@ Directory: tip/alpine3.22
 
 Tags: tip-20250815-bookworm, tip-bookworm
 Architectures: amd64, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: b5b0e8d0c9bd602ed49202e3b1471fb77f896231
+GitCommit: 8426bbb144ff4507d189ca12ee7e09c3545717ac
 Directory: tip/bookworm
 
 Tags: tip-20250815-trixie, tip-trixie
 SharedTags: tip-20250815, tip
 Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: b5b0e8d0c9bd602ed49202e3b1471fb77f896231
+GitCommit: 8426bbb144ff4507d189ca12ee7e09c3545717ac
 Directory: tip/trixie
diff --git a/golang_1.24-bookworm/Dockerfile b/golang_1.24-bookworm/Dockerfile
index 348aa6c..da6a729 100644
--- a/golang_1.24-bookworm/Dockerfile
+++ b/golang_1.24-bookworm/Dockerfile
@@ -114,6 +114,16 @@ RUN set -eux; \
 		make \
 		pkg-config \
 	; \
+# go depends on "gold" explicitly on arm64
+# https://github.com/docker-library/golang/issues/570 (go depends on "gold" explicitly on arm64)
+# https://github.com/golang/go/issues/22040
+# ... and as of trixie, "gold" is removed from the "binutils" package:
+# > WARNING: gold is being removed from binutils, and is deprecated upstream.
+# (and available as "binutils-gold" which is also a virtual on bookworm so we can reasonably be explicit everywhere)
+	dpkgArch="$(dpkg --print-architecture)"; \
+	if [ "$dpkgArch" = 'arm64' ]; then \
+		apt-get install -y --no-install-recommends binutils-gold; \
+	fi; \
 	rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.24.6
diff --git a/golang_1.24-trixie/Dockerfile b/golang_1.24-trixie/Dockerfile
index fe6900f..b122f97 100644
--- a/golang_1.24-trixie/Dockerfile
+++ b/golang_1.24-trixie/Dockerfile
@@ -114,6 +114,16 @@ RUN set -eux; \
 		make \
 		pkg-config \
 	; \
+# go depends on "gold" explicitly on arm64
+# https://github.com/docker-library/golang/issues/570 (go depends on "gold" explicitly on arm64)
+# https://github.com/golang/go/issues/22040
+# ... and as of trixie, "gold" is removed from the "binutils" package:
+# > WARNING: gold is being removed from binutils, and is deprecated upstream.
+# (and available as "binutils-gold" which is also a virtual on bookworm so we can reasonably be explicit everywhere)
+	dpkgArch="$(dpkg --print-architecture)"; \
+	if [ "$dpkgArch" = 'arm64' ]; then \
+		apt-get install -y --no-install-recommends binutils-gold; \
+	fi; \
 	rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.24.6
diff --git a/golang_bookworm/Dockerfile b/golang_bookworm/Dockerfile
index 518de67..cc92a72 100644
--- a/golang_bookworm/Dockerfile
+++ b/golang_bookworm/Dockerfile
@@ -114,6 +114,16 @@ RUN set -eux; \
 		make \
 		pkg-config \
 	; \
+# go depends on "gold" explicitly on arm64
+# https://github.com/docker-library/golang/issues/570 (go depends on "gold" explicitly on arm64)
+# https://github.com/golang/go/issues/22040
+# ... and as of trixie, "gold" is removed from the "binutils" package:
+# > WARNING: gold is being removed from binutils, and is deprecated upstream.
+# (and available as "binutils-gold" which is also a virtual on bookworm so we can reasonably be explicit everywhere)
+	dpkgArch="$(dpkg --print-architecture)"; \
+	if [ "$dpkgArch" = 'arm64' ]; then \
+		apt-get install -y --no-install-recommends binutils-gold; \
+	fi; \
 	rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.25.0
diff --git a/golang_tip-bookworm/Dockerfile b/golang_tip-bookworm/Dockerfile
index b4ba6f7..5407563 100644
--- a/golang_tip-bookworm/Dockerfile
+++ b/golang_tip-bookworm/Dockerfile
@@ -119,6 +119,16 @@ RUN set -eux; \
 		make \
 		pkg-config \
 	; \
+# go depends on "gold" explicitly on arm64
+# https://github.com/docker-library/golang/issues/570 (go depends on "gold" explicitly on arm64)
+# https://github.com/golang/go/issues/22040
+# ... and as of trixie, "gold" is removed from the "binutils" package:
+# > WARNING: gold is being removed from binutils, and is deprecated upstream.
+# (and available as "binutils-gold" which is also a virtual on bookworm so we can reasonably be explicit everywhere)
+	dpkgArch="$(dpkg --print-architecture)"; \
+	if [ "$dpkgArch" = 'arm64' ]; then \
+		apt-get install -y --no-install-recommends binutils-gold; \
+	fi; \
 	rm -rf /var/lib/apt/lists/*
 
 # don't auto-upgrade the gotoolchain
diff --git a/golang_tip-trixie/Dockerfile b/golang_tip-trixie/Dockerfile
index 5c3f9c0..a5e156c 100644
--- a/golang_tip-trixie/Dockerfile
+++ b/golang_tip-trixie/Dockerfile
@@ -119,6 +119,16 @@ RUN set -eux; \
 		make \
 		pkg-config \
 	; \
+# go depends on "gold" explicitly on arm64
+# https://github.com/docker-library/golang/issues/570 (go depends on "gold" explicitly on arm64)
+# https://github.com/golang/go/issues/22040
+# ... and as of trixie, "gold" is removed from the "binutils" package:
+# > WARNING: gold is being removed from binutils, and is deprecated upstream.
+# (and available as "binutils-gold" which is also a virtual on bookworm so we can reasonably be explicit everywhere)
+	dpkgArch="$(dpkg --print-architecture)"; \
+	if [ "$dpkgArch" = 'arm64' ]; then \
+		apt-get install -y --no-install-recommends binutils-gold; \
+	fi; \
 	rm -rf /var/lib/apt/lists/*
 
 # don't auto-upgrade the gotoolchain
diff --git a/golang_trixie/Dockerfile b/golang_trixie/Dockerfile
index 725faff..a794303 100644
--- a/golang_trixie/Dockerfile
+++ b/golang_trixie/Dockerfile
@@ -114,6 +114,16 @@ RUN set -eux; \
 		make \
 		pkg-config \
 	; \
+# go depends on "gold" explicitly on arm64
+# https://github.com/docker-library/golang/issues/570 (go depends on "gold" explicitly on arm64)
+# https://github.com/golang/go/issues/22040
+# ... and as of trixie, "gold" is removed from the "binutils" package:
+# > WARNING: gold is being removed from binutils, and is deprecated upstream.
+# (and available as "binutils-gold" which is also a virtual on bookworm so we can reasonably be explicit everywhere)
+	dpkgArch="$(dpkg --print-architecture)"; \
+	if [ "$dpkgArch" = 'arm64' ]; then \
+		apt-get install -y --no-install-recommends binutils-gold; \
+	fi; \
 	rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.25.0

Relevant Maintainers:

@yosifkit yosifkit merged commit 067c13d into docker-library:master Aug 22, 2025
17 checks passed
@yosifkit yosifkit deleted the golang branch August 22, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants