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

x/build/cmd/genbootstrap: bootstrap with go1.4 fails on certain builders #28483

Closed
tklauser opened this issue Oct 30, 2018 · 12 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@tklauser
Copy link
Member

tklauser commented Oct 30, 2018

The build on some builders using go1.4 to bootstrap fails with:

Building Go cmd/dist using /tmp/workdir/go1.4.
Building Go toolchain1 using /tmp/workdir/go1.4.
../../../go1.4/src/text/template/funcs.go:12:2: cannot find package "net/url" in any of:
	/tmp/workdir/go1.4/src/vendor/net/url (vendor tree)
	/tmp/workdir/go1.4/src/net/url (from $GOROOT)
	/tmp/workdir/go/pkg/bootstrap/src/net/url (from $GOPATH)
go tool dist: FAILED: /tmp/workdir/go1.4/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/...: exit status 1

openbsd-386-64: https://build.golang.org/log/c79fb02ba46df875ad35c621f96172d474d3ff4c
openbsd-amd64-64: https://build.golang.org/log/f50eaf129492daeedc42387ff93b3bcd6fbc6e41
solaris-amd64-smartosbuildlet: https://build.golang.org/log/5e7398620b2c542aa89c257c72f58d064c9ece49

However, building locally on OpenBSD 6.4 with the go1.4 tarball from https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz works just fine. Is there something wrong with go1.4 on these builders?

/cc @bradfitz @dmitshur

@gopherbot gopherbot added this to the Unreleased milestone Oct 30, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Oct 30, 2018
@tklauser
Copy link
Member Author

@ianlancetaylor
Copy link
Contributor

That's weird, Go 1.4 definitely has net/url.

@bradfitz
Copy link
Contributor

Also plan9-386:
https://build.golang.org/log/e63681117fca9b0a6d9b2b4c8580750213c4cd62

They all started failing at @ianlancetaylor's https://go-review.googlesource.com/c/go/+/144340 ("cmd/compile: add -lang flag to specify language version").

That CL did alter which imports were needed during bootstrap.

It makes cmd/compile/internal/gc depend on go/build which implicitly depends on net/url.

So maybe we just need to add net/url to some bootstrap slice/map in cmd/dist?

@bradfitz
Copy link
Contributor

To var bootstrapDirs probably. Will try.

@bradfitz
Copy link
Contributor

Actually, it gets messy quickly. go/build depends on a ton of things and many of them reach into the runtime for private symbols. I'm not able to find a set of additions to bootstrapDirs that successfully bootstraps. (I'm testing on a plan9-386 gomote somewhat arbitrarily, but any failing builder should do)

@bradfitz bradfitz changed the title x/build: bootstrap with go1.4 fails on certain builders cmd/compile: bootstrap with go1.4 fails on certain builders Oct 30, 2018
@bradfitz bradfitz modified the milestones: Unreleased, Go1.12 Oct 30, 2018
@bradfitz bradfitz added NeedsFix The path to resolution is known, but the work has not been done. and removed Builders x/build issues (builders, bots, dashboards) labels Oct 30, 2018
@ianlancetaylor
Copy link
Contributor

But since Go 1.4 does have net/url, and, for that matter, go/build, I don't understand what the problem is. Also, of course, it works for me, and I'm bootstrapping with Go 1.4. And it works on some of the builders but not others. So what is the difference?

@bradfitz bradfitz assigned bradfitz and unassigned ianlancetaylor Oct 30, 2018
@bradfitz bradfitz changed the title cmd/compile: bootstrap with go1.4 fails on certain builders x/build/cmd/genbootstrap: bootstrap with go1.4 fails on certain builders Oct 30, 2018
@bradfitz
Copy link
Contributor

New theory is that the problem is genbootstrap removing too much stuff. (We never previously needed "net" and it was removing "net/...")

@gopherbot
Copy link

Change https://golang.org/cl/145977 mentions this issue: cmd/genbootstrap: don't trim the Go 1.4 bootstrap archives so much

@katiehockman
Copy link
Contributor

The CL doesn't look like it fixed the issues. Still seeing the same errors for darwin arm64. Here's the latest build: https://build.golang.org/log/e8488a7ffa9a2c554c57606d2503653f2dbdaf12

@katiehockman katiehockman reopened this Oct 31, 2018
@bradfitz
Copy link
Contributor

@katiehockman, the CL itself doesn't fix things upon submitting it. It has to be run & deployed. I guess I forgot that column.

Also, that link is linux/arm64, not darwin/arm64.

You have any interest in learning how to deploy it?

@katiehockman
Copy link
Contributor

Ah thanks for the correction. I'm triaging a lot of build-related issues, so I must have gotten them mixed up.
Sure I'd be interested! I think @dmitshur was showing some build-related release processes to me recently, but I haven't deployed them before.

@bradfitz
Copy link
Contributor

bradfitz commented Nov 1, 2018

Actually I forgot how the packet builders were configured so in the process of reading the README, I just re-ran the build.sh Docker script and restarted the docker & rundockerbuildlet systemd services and fixed it. (And also ran a hacked-up cmd/retrybuilds with a new flaky phrase substring to retry those entries on the dahsboard)

But you may want to log into that host and look around if you're curious. The info is in the env/linux-arm64/packet README.

@bradfitz bradfitz closed this as completed Nov 1, 2018
@golang golang locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants