golang/go

cmd/dist: building with GOFIPS140=latest fails with unexpected stale targets

FiloSottile opened this issue · 3 comments

Go version

go version go1.24rc1 darwin/arm64

Output of go env in your module/workspace:

GONOPROXY='github.com/FiloSottile/*,filippo.io/*'
GOPROXY='https://proxy.golang.org'

What did you do?

GOFIPS140=latest ./make.bash

What did you see happen?

go tool dist: unexpected stale targets reported by /Users/filippo/go+go1.24/pkg/tool/darwin_arm64/go_bootstrap list -gcflags="" -ldflags="" for [cmd/asm cmd/cgo cmd/compile cmd/link cmd/preprofile] (consider rerunning with GOMAXPROCS=1 GODEBUG=gocachehash=1):
	STALE cmd/asm: not installed but available in build cache
	STALE cmd/cgo: not installed but available in build cache
	STALE cmd/compile: not installed but available in build cache
	STALE cmd/link: not installed but available in build cache
	STALE cmd/preprofile: not installed but available in build cache

Full log https://gist.github.com/FiloSottile/503e0c566fb76ec4decf5a753da72efd

What did you expect to see?

A successful build resulting in a toolchain with GOFIPS140=latest baked in, per #70200.

Like all the other target configuration variables (for example, GOOS, GOARCH, GOARM, CC, CGO_ENABLED, ...), the GOFIPS140 setting during make.bash is "baked" into the toolchain as the default setting for builds with that toolchain.

/cc @rsc

rsc commented

I see the problem. The solution not as much, but I'll figure it out.

Change https://go.dev/cl/637116 mentions this issue: cmd/go: drop fips140 build ID hacks