Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: non-reproducible build causes spurious staleness #22514

Closed
rsc opened this issue Oct 31, 2017 · 2 comments
Closed

cmd/go: non-reproducible build causes spurious staleness #22514

rsc opened this issue Oct 31, 2017 · 2 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Oct 31, 2017

After CL 73212:

./make.bash
go list -f '{{.Stale}}' runtime/internal/sys
go install -a std cmd
go list -f '{{.Stale}}' runtime/internal/sys

The first go list says false, but the second go list says true. The extra install should not cause problems, yet it does. The implication appears to be that rebuilding runtime/internal/sys is not idempotent even though it appears up to date.

This can manifest as:

./make.bash
./run.bash

failing (but ./run.bash --no-rebuild is OK).

/cc @dr2chase

@rsc rsc added this to the Go1.10 milestone Oct 31, 2017
@rsc
Copy link
Contributor Author

rsc commented Oct 31, 2017

This appears to be the root cause:

$ ./make.bash
Building Go cmd/dist using /Users/rsc/go1.4.
Building Go toolchain1 using /Users/rsc/go1.4.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for darwin/amd64.
---
Installed Go for darwin/amd64 in /Users/rsc/go
Installed commands in /Users/rsc/go/bin
$ go tool buildid $(go list -f '{{.Target}}' runtime/cgo)
OUVe-ybZwJmCm_pggG7n/qIfGDvQfYfzrCamYpIlK
$ go install -a runtime/cgo
$ go tool buildid $(go list -f '{{.Target}}' runtime/cgo)
OUVe-ybZwJmCm_pggG7n/y44aQ68tiged52VYgNT-
$ 

I thought I'd eliminated all of those but apparently not.

@gopherbot
Copy link

Change https://golang.org/cl/74791 mentions this issue: cmd/go: trim objdir, not just workdir, from object files

@golang golang locked and limited conversation to collaborators Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants