Go version
go1.22.4
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/vagrant/.cache/go-build'
GOENV='/home/vagrant/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/vagrant/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/vagrant/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build646739744=/tmp/go-build -gno-record-gcc-switches'
What did you do?
We're trying to build go lib reproducible. https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15331 Upstream build runs on ubuntu-latest runner and our build runs on debian bookworm image. The build script is https://github.com/cbeuw/Cloak-android/blob/master/app/src/build.sh.
What did you see happen?
The build is mostly reproducible except that the shstrtab section is different. Our build on Debian has a weird shstrtab section in which the header names have weird order. The upstream build on Ubuntu has .hash
in shstrtab while there is no such header in elf.
What did you expect to see?
The build is reproducible.
Comment From: seankhliao
That sounds like a C toolchain issue
Comment From: linsui
OK, then what can I do to make go use the correct C toolchain?