Go version
go version go1.24.2 linux/arm64
Output of go env
in your module/workspace:
AR='ar'
CC='aarch64-unknown-linux-gnu-gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='aarch64-unknown-linux-gnu-g++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/staff/stijn/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/staff/stijn/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -pthread -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1289792922=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='arm64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/build/go/src/go.mod'
GOMODCACHE='/home/staff/stijn/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/staff/stijn/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/staff/stijn/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_arm64'
GOVCS=''
GOVERSION='go1.24.2'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
I'm experiencing random build failures when trying to build go on a bcachefs filesystem. There are also reports of go-based software failing to build on bcachefs.
https://github.com/koverstreet/bcachefs/issues/803 https://bugs.gentoo.org/953025
What did you see happen?
Build sometimes fails with go: unlinkat /build/go-build3469699815/b147: directory not empty
, but I've seen other random failures. This can be seen in the bcachefs upstream bug report.
Build sometimes fails with > google.golang.org/protobuf v1.35.1: dir has been modified (/var/tmp/portage/app-containers/docker-compose-2.32.3/work/go-mod/google.golang.org/protobuf@v1.35.1
I've also seen it fail like this:
++ ./cmd/dist/dist bootstrap -a -d --no-banner
Building Go toolchain1 using /usr/lib/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
/home/staff/stijn/go/src/go/build/build.go:1495:9: undefined: readGoInfo
/home/staff/stijn/go/src/go/build/build.go:1501:22: undefined: readComments
/home/staff/stijn/go/src/go/build/build.go:2057:15: undefined: getToolDir
What did you expect to see?
I expected go or the go-based to build normally.
I'm willing to spend time on tracking this down, but I'd appreciate some pointers where to start looking. I have never looked at the go build system code before. Thanks.
Comment From: gabyhelp
Related Issues
- build: the build of go bootstrap in case of compilation errors does not stop cleanly #45410 (closed)
- cmd/go: go build errors that don't correspond to source file until build cache is cleared #69179
- cmd/go: misleading error message when build cache runs out of disk space #60076
- cmd/dist: I/O error: read src/xxx.go: is a directory #35776 (closed)
- cmd/dist,cmd/compile: `unexpected stale targets` on freebsd-arm64-dmgk since 2022-08-23 #54729 (closed)
- Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.: unrecognized failures #64158 (closed)
- internal/poll: build failures during file copies from commit 40ced0c00b04a5b9832bb5b47c995c82854f26ae onward #54876 (closed)
- cmd/go: "file exists" errors when trying to fetch modules #36447 (closed)
- cmd/go: locating GOROOT fails when the `go` command is run from the cross-compiled `bin` subdirectory #62119 (closed)
- Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.: unrecognized failures #64131 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: gopherbot
Timed out in state WaitingForInfo. Closing.
(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)