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

all: add freebsd/riscv64 port #53466

Open
dmgk opened this issue Jun 20, 2022 · 34 comments
Open

all: add freebsd/riscv64 port #53466

dmgk opened this issue Jun 20, 2022 · 34 comments

Comments

@dmgk
Copy link
Member

dmgk commented Jun 20, 2022

This issue is intended to serve both as a proposal and to track the progress of adding the freebsd/riscv64 port.

The majority of porting work is done, there's an out-of-tree port at https://github.com/MikaelUrankar/go/tree/freebsd_riscv64 which builds and passes all run.bash tests, including cgo (tested under QEMU and on Unmatched).

@mengzhuo has graciously agreed to setup and maintain the freebsd/riscv64 builder (on SiFive Unmatched) and @MikaelUrankar has agreed to be the port maintainer.

cc @golang/freebsd @golang/riscv64 @mengzhuo @MikaelUrankar

@dmgk dmgk added the Proposal label Jun 20, 2022
@mengzhuo mengzhuo added OS-FreeBSD arch-riscv Issues solely affecting the riscv64 architecture. labels Jun 21, 2022
@mengzhuo
Copy link
Contributor

mengzhuo commented Jun 22, 2022

CC @rsc

@ianlancetaylor ianlancetaylor changed the title all: add freebsd/riscv64 port proposal: all: add freebsd/riscv64 port Jun 22, 2022
@gopherbot gopherbot added this to the Proposal milestone Jun 22, 2022
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Jun 22, 2022
@rsc
Copy link
Contributor

rsc commented Jun 22, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc rsc moved this from Incoming to Active in Proposals (old) Jun 22, 2022
@mengzhuo
Copy link
Contributor

mengzhuo commented Jun 27, 2022

I tried to install the prometheus node_exporter and got undefined errors from golang.org/x/sys

I think we should update golang.org/x/sys and other x/ moduels first and leave alone the Go main develope cycle.

@paulzhol
Copy link
Member

paulzhol commented Jun 27, 2022

I'm already updating golang.org/x/sys as part of #53280. It is indeed horribly out of date. For example Time_t on freebsd/arm is still 32-bit. It was switched to 64-bit more than 16 years ago (I guess it originates directly from the syscall package).
There ptrace constants which are defined only on the x86 arches, not available on both ARMs (because these were probably not generated on actual hosts).
I shudder to think of what state the golang.org/x/net/route is in. std still carries a hand copied if_data8 and if_msghdr8 types.

@rsc
Copy link
Contributor

rsc commented Jun 29, 2022

The new port policy (#53383) will require two maintainers for the port. Assuming that is accepted, is there anyone else who would be willing to be a second maintainer for freebsd/riscv64?

@dmgk
Copy link
Member Author

dmgk commented Jul 1, 2022

Assuming nobody else volunteers, I'll be willing to be a second maintainer for the freebsd/riscv64 (can we have more than two?). I think more people will be interested when this port is closer to be merged.

@mengzhuo
Copy link
Contributor

mengzhuo commented Jul 1, 2022

I want to be the third maintainer since the freebsd/riscv64 stage0 is up and ready.

@gopherbot
Copy link

gopherbot commented Jul 11, 2022

Change https://go.dev/cl/416834 mentions this issue: unix: add freebsd/riscv64 support

gopherbot pushed a commit to golang/sys that referenced this issue Jul 12, 2022
For golang/go#53466

Change-Id: If5a4dc674cb1856ac580fb87d8030d50fa7c95dd
Reviewed-on: https://go-review.googlesource.com/c/sys/+/416834
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
@rsc
Copy link
Contributor

rsc commented Jul 13, 2022

Thanks to @MikaelUrankar, @dmgk, and @mengzhuo for volunteering to be maintainers.

@rsc
Copy link
Contributor

rsc commented Jul 13, 2022

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

@rsc rsc moved this from Active to Likely Accept in Proposals (old) Jul 13, 2022
@rsc rsc moved this from Likely Accept to Accepted in Proposals (old) Jul 20, 2022
@rsc
Copy link
Contributor

rsc commented Jul 20, 2022

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

@rsc rsc changed the title proposal: all: add freebsd/riscv64 port all: add freebsd/riscv64 port Jul 20, 2022
@rsc rsc modified the milestones: Proposal, Backlog Jul 20, 2022
@gopherbot
Copy link

gopherbot commented Jul 21, 2022

Change https://go.dev/cl/418814 mentions this issue: all: add FreeBSD riscv64 support

@dmitshur
Copy link
Contributor

dmitshur commented Aug 8, 2022

CC @golang/release.

gopherbot pushed a commit to golang/net that referenced this issue Aug 9, 2022
For golang/go#53466

Change-Id: Ibbeab43923bdd6b455a28c627832e676b401b4f4
Reviewed-on: https://go-review.googlesource.com/c/net/+/418814
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
@gopherbot
Copy link

gopherbot commented Aug 26, 2022

Change https://go.dev/cl/425937 mentions this issue: build/dashboard: add freebsd-riscv64

@dmitshur dmitshur added this to the Go1.20 milestone Aug 30, 2022
@dmitshur
Copy link
Contributor

dmitshur commented Aug 30, 2022

Is it right for this issue to be closed now? go tool dist list at tip doesn't include freebsd/riscv64.

@heschi heschi reopened this Aug 30, 2022
@dmgk
Copy link
Member Author

dmgk commented Aug 30, 2022

@dmitshur No, the riscv64 port is still not merged, please reopen.

@gopherbot
Copy link

gopherbot commented Sep 18, 2022

Change https://go.dev/cl/431655 mentions this issue: syscall: add support for freebsd/riscv64

@gopherbot
Copy link

gopherbot commented Sep 18, 2022

Change https://go.dev/cl/431656 mentions this issue: runtime: add support for freebsd/riscv64

@gopherbot
Copy link

gopherbot commented Sep 18, 2022

Change https://go.dev/cl/431661 mentions this issue: cmd/link: skip tests on freebsd/riscv64 that requires internal cgo linking

@gopherbot
Copy link

gopherbot commented Sep 18, 2022

Change https://go.dev/cl/431658 mentions this issue: cmd/nm, runtime/cgo: add cgo support for freebsd/riscv64

@gopherbot
Copy link

gopherbot commented Sep 18, 2022

Change https://go.dev/cl/431657 mentions this issue: cmd/dist: enable cgo tests on freebsd/riscv64

@gopherbot
Copy link

gopherbot commented Sep 18, 2022

Change https://go.dev/cl/431660 mentions this issue: cmd/link/internal/riscv64: add support for freebsd/riscv64

@gopherbot
Copy link

gopherbot commented Sep 18, 2022

Change https://go.dev/cl/431659 mentions this issue: cmd/dist: add support for freebsd/riscv64

@4a6f656c
Copy link
Contributor

4a6f656c commented Sep 22, 2022

@mengzhuo the freebsd/riscv64 builder entry exists on the build dashboard, however the builder does not appear to be online (farmer.golang.org says "host-freebsd-riscv64-unmatched: 0/0 (1 missing)" - are we able to resolve this?

@mengzhuo
Copy link
Contributor

mengzhuo commented Sep 22, 2022

@mengzhuo the freebsd/riscv64 builder entry exists on the build dashboard, however the builder does not appear to be online (farmer.golang.org says "host-freebsd-riscv64-unmatched: 0/0 (1 missing)" - are we able to resolve this?

It's running (stage0, buildlet are modified by hand).
However it can't download the buildlet from GCP repo for now.
I will submit those CLs today.

@gopherbot
Copy link

gopherbot commented Sep 22, 2022

Change https://go.dev/cl/432656 mentions this issue: cmd/buildlet/stage0: add freebsd-riscv64-unmatched

@gopherbot
Copy link

gopherbot commented Sep 22, 2022

Change https://go.dev/cl/432658 mentions this issue: cmd/buildlet: add freebsd-riscv64

@4a6f656c
Copy link
Contributor

4a6f656c commented Sep 22, 2022

It's running (stage0, buildlet are modified by hand). However it can't download the buildlet from GCP repo for now. I will submit those CLs today.

@mengzhuo per step 6 on https://github.com/golang/go/wiki/DashboardBuilders#how-to-set-up-a-builder (and the "WIP ports" comment at the bottom), you should be able to build and run the stage1 buildlet locally - I'm not sure that it can be built/made available for download until the port has already been upstreamed.

@gopherbot
Copy link

gopherbot commented Sep 22, 2022

Change https://go.dev/cl/432756 mentions this issue: cmd/link: return correct default linker for the platform

gopherbot pushed a commit to golang/build that referenced this issue Sep 23, 2022
For golang/go#53466

Change-Id: I7fac91b7d4d8e31f922f3e2342bd198c60dbf54a
Reviewed-on: https://go-review.googlesource.com/c/build/+/432656
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
gopherbot pushed a commit to golang/build that referenced this issue Sep 23, 2022
For golang/go#53466

Change-Id: Ibe1355980422cd9c4ddb1029b09046f8bcc41a5a
Reviewed-on: https://go-review.googlesource.com/c/build/+/432658
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
@mengzhuo
Copy link
Contributor

mengzhuo commented Sep 24, 2022

@4a6f656c
It looks like we have to wait the port complete.

2022/09/24 09:50:07 Not on GCE; not remounting root filesystem.
2022/09/24 09:50:10 Dialing coordinator farmer.golang.org:443 ...
2022/09/24 09:50:20 dialing proxy "uplink.golangcn.org:8123" ...
2022/09/24 09:50:20 Dialed coordinator farmer.golang.org:443.
2022/09/24 09:50:20 Doing TLS handshake with coordinator (verifying hostname "farmer.golang.org")...
2022/09/24 09:50:21 Registering reverse mode with coordinator...
2022/09/24 09:50:21 Connected to coordinator; reverse dialing active
2022/09/24 09:50:21 Dialing coordinator farmer.golang.org:443 ...
2022/09/24 09:50:31 Dialing coordinator farmer.golang.org:443 ...
2022/09/24 09:50:31 dialing proxy "uplink.golangcn.org:8123" ...
2022/09/24 09:50:31 dialing proxy "uplink.golangcn.org:8123" ...
2022/09/24 09:50:31 Dialed coordinator farmer.golang.org:443.
2022/09/24 09:50:31 Doing TLS handshake with coordinator (verifying hostname "farmer.golang.org")...
2022/09/24 09:50:31 Dialed coordinator farmer.golang.org:443.
2022/09/24 09:50:31 Doing TLS handshake with coordinator (verifying hostname "farmer.golang.org")...
2022/09/24 09:50:32 Removing .
2022/09/24 09:50:32 writetgz: untarring Request.Body into /tmp/workdir-host-freebsd-riscv64-unmatched/go
2022/09/24 09:50:32 extracted tarball into /tmp/workdir-host-freebsd-riscv64-unmatched/go: 1 files, 1 dirs (1.503999ms)
2022/09/24 09:50:32 Dialing coordinator farmer.golang.org:443 ...
2022/09/24 09:50:32 dialing proxy "uplink.golangcn.org:8123" ...
2022/09/24 09:50:33 Dialed coordinator farmer.golang.org:443.
2022/09/24 09:50:33 Doing TLS handshake with coordinator (verifying hostname "farmer.golang.org")...
2022/09/24 09:50:33 writetgz: failed to fetch tgz URL https://storage.googleapis.com/go-builder-data/gobootstrap-freebsd-riscv64-go1.17.13.tar.gz: status=403 Forbidden
2022/09/24 09:50:33 writetgz: untarring Request.Body into /tmp/workdir-host-freebsd-riscv64-unmatched/go
2022/09/24 09:50:54 extracted tarball into /tmp/workdir-host-freebsd-riscv64-unmatched/go: 11349 files, 1241 dirs (20.368625001s)
2022/09/24 09:50:54 Halting in 1 second.
2022/09/24 09:50:54 http.Serve on reverse connection complete: revdial: Listener closed
2022/09/24 09:50:54 buildlet reverse mode exiting.

@4a6f656c
Copy link
Contributor

4a6f656c commented Sep 24, 2022

@mengzhuo AIUI the builder needs to be running prior to the port landing (at least this was historically the case and it makes sense as you can see what is failing/what changes as CLs land). Prior to the recent changes for the builders at the start of this cycle (golang/build@76065a2), they used to use local bootstraps (rather than downloading them) - I'm not sure how you can work around this, but hopefully @rsc can advise.

@4a6f656c
Copy link
Contributor

4a6f656c commented Sep 24, 2022

@mengzhuo AIUI the builder needs to be running prior to the port landing (at least this was historically the case and it makes sense as you can see what is failing/what changes as CLs land). Prior to the recent changes for the builders at the start of this cycle (golang/build@76065a2), they used to use local bootstraps (rather than downloading them) - I'm not sure how you can work around this, but hopefully @rsc can advise.

This may require GoBootstrap: "none" (https://github.com/golang/build/blob/master/dashboard/builders.go#L134) to be added to the builder config (as an aside, it would be helpful if the new process was documented on https://github.com/golang/go/wiki/DashboardBuilders#how-to-set-up-a-builder)

@gopherbot
Copy link

gopherbot commented Sep 26, 2022

Change https://go.dev/cl/434295 mentions this issue: dashboard: freebsd-riscv64 bootstrap from local

gopherbot pushed a commit to golang/build that referenced this issue Sep 27, 2022
The port of freebsd-riscv64 is still working in progresss
means bootstrap binary from GCP is unavailable for now.

For golang/go#53466

Change-Id: I81ee945e0f0bc95be980e1f2a3d5f61c42e37f28
Reviewed-on: https://go-review.googlesource.com/c/build/+/434295
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
gopherbot pushed a commit that referenced this issue Sep 28, 2022
Updates #53466

Change-Id: I42ca5f1d0f20b5ecfcfba70d298566b6c851fefc
Reviewed-on: https://go-review.googlesource.com/c/go/+/431656
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
gopherbot pushed a commit that referenced this issue Sep 28, 2022
Updates #53466

Change-Id: I17a41adb93c22fa84a7bdcec9d8c65001c5a8ba9
Reviewed-on: https://go-review.googlesource.com/c/go/+/431657
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Sep 28, 2022
Updates #53466

Change-Id: I08ea279c905e265a579b6b3e23aee012165beaee
Reviewed-on: https://go-review.googlesource.com/c/go/+/431658
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
@gopherbot
Copy link

gopherbot commented Sep 28, 2022

Change https://go.dev/cl/435897 mentions this issue: dashboard: set known issue on freebsd-riscv64 builder

gopherbot pushed a commit to golang/build that referenced this issue Sep 28, 2022
The port is not yet complete, and the builder hasn't started to pass.
Mark that on the dashboard with a known issue.

For golang/go#53466.

Change-Id: Ifaef69956ce64981bcaf95defd73b253cde67dfe
Reviewed-on: https://go-review.googlesource.com/c/build/+/435897
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Sep 29, 2022
Updates #53466

Change-Id: I3c156400a105e711d6da0980854c08bf2f7e415a
Reviewed-on: https://go-review.googlesource.com/c/go/+/431655
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Mikaël Urankar <mikael.urankar@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Accepted
Development

No branches or pull requests

8 participants