Uh oh!
There was an error while loading. Please reload this page.
multi arch support - #25
Conversation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Looks like the base go image ( Repro with $ docker run --rm -t --platform linux/s390x golang:bullseye go envUnable to find image 'golang:bullseye' locallybullseye: Pulling from library/golangcf58bfabf9fb: Pull completece515b66a74a: Pull complete36bf6be09afa: Pull completeff4c0b442ebb: Pull completede9b6d274b98: Pull complete85cd147201cd: Pull completee1b78db19f94: Pull completeDigest: sha256:d92ddd8ad9d960c67dc34cffc2ed7b0ef399be2549505bf5ef94a7f4ca016a05Status: Downloaded newer image for golang:bullseyeGO111MODULE=""GOARCH="s390x"GOBIN=""GOCACHE="/root/.cache/go-build"GOENV="/root/.config/go/env"GOEXE=""GOEXPERIMENT=""GOFLAGS=""GOHOSTARCH="s390x"GOHOSTOS="linux"GOINSECURE=""GOMODCACHE="/go/pkg/mod"GONOPROXY=""GONOSUMDB=""GOOS="linux"GOPATH="/go"GOPRIVATE=""GOPROXY="https://proxy.golang.org,direct"GOROOT="/usr/local/go"GOSUMDB="sum.golang.org"GOTMPDIR=""GOTOOLDIR="/usr/local/go/pkg/tool/linux_s390x"GOVCS=""GOVERSION="go1.19.1"GCCGO="gccgo"AR="ar"CC="s390x-linux-gnu-gcc"CXX="g++"CGO_ENABLED="1"GOMOD="/dev/null"GOWORK=""CGO_CFLAGS="-g -O2"CGO_CPPFLAGS=""CGO_CXXFLAGS="-g -O2"CGO_FFLAGS="-g -O2"CGO_LDFLAGS="-g -O2"PKG_CONFIG="pkg-config"GOGCCFLAGS="-fPIC -m64 -march=z196 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build671129115=/tmp/go-build -gno-record-gcc-switches"Looks good with other platforms. I guess that's because for Edit: Hum doesn't look like it: https://github.com/docker-library/golang/blob/2a6ba509d511d58eeb14b81888133745bfe7ef5b/1.18/bullseye/Dockerfile#L56. Maybe you have an idea @tianon? cc @thaJeztah |
tianon
commented
Sep 23, 2022
Sorry, not sure I understand what's the failure/problem is? The --- /dev/fd/63 2022-09-23 12:42:00.406387513 -0700+++ /dev/fd/62 2022-09-23 12:42:00.406387513 -0700@@ -1,12 +1,12 @@
GO111MODULE=""
-GOARCH="amd64"+GOARCH="s390x"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
-GOHOSTARCH="amd64"+GOHOSTARCH="s390x"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
@@ -19,13 +19,12 @@
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
-GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"+GOTOOLDIR="/usr/local/go/pkg/tool/linux_s390x"
GOVCS=""
GOVERSION="go1.19.1"
GCCGO="gccgo"
-GOAMD64="v1"
AR="ar"
-CC="gcc"+CC="s390x-linux-gnu-gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
@@ -36,4 +35,4 @@
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
-GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3686874489=/tmp/go-build -gno-record-gcc-switches"+GOGCCFLAGS="-fPIC -m64 -march=z196 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4014933557=/tmp/go-build -gno-record-gcc-switches"(https://packages.debian.org/search?searchon=contents&keywords=s390x-linux-gnu-gcc) |
Thanks for looking into it @tianon
The issue is the following when building on native s390x platform (rhel dist) with
Imo it should be Looks to be already reported 👀: golang/go#16443 (comment) |
crazy-max
commented
Sep 23, 2022
Looks to work now with this hack: But don't really like it 😅 |
tianon
commented
Sep 23, 2022
golang/go#53383 (comment) is a more recent (and still open!) discussion of the same 👀 |
crazy-max
commented
Sep 23, 2022
Ah yes indeed spot on! |
evaluating compatible platforms of target package with ones provided by each project. if PKG_SUPPORTED_PLATFORMS is empty, we assume we want to build all platforms supported by the project (static pkg) Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
thaJeztah
commented
Sep 26, 2022
So IIUC, the problem is that the Golang team uses cross-compiling, and because of that their cross-compile toolchain is baked into the code at compile time? |
crazy-max
commented
Sep 26, 2022
@thaJeztah Yes |
Uh oh!
There was an error while loading. Please reload this page.