go
go copied to clipboard
all: add freebsd/riscv64 port
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
CC @rsc
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
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.
I'm already updating golang.org/x/sys as part of https://github.com/golang/go/issues/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.
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?
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.
I want to be the third maintainer since the freebsd/riscv64 stage0 is up and ready.
Change https://go.dev/cl/416834 mentions this issue: unix: add freebsd/riscv64 support
Thanks to @MikaelUrankar, @dmgk, and @mengzhuo for volunteering to be maintainers.
Based on the discussion above, this proposal seems like a likely accept. — rsc for the proposal review group
No change in consensus, so accepted. 🎉 This issue now tracks the work of implementing the proposal. — rsc for the proposal review group
Change https://go.dev/cl/418814 mentions this issue: all: add FreeBSD riscv64 support
CC @golang/release.
Change https://go.dev/cl/425937 mentions this issue: build/dashboard: add freebsd-riscv64
Is it right for this issue to be closed now? go tool dist list at tip doesn't include freebsd/riscv64.
@dmitshur No, the riscv64 port is still not merged, please reopen.
Change https://go.dev/cl/431655 mentions this issue: syscall: add support for freebsd/riscv64
Change https://go.dev/cl/431656 mentions this issue: runtime: add support for freebsd/riscv64
Change https://go.dev/cl/431661 mentions this issue: cmd/link: skip tests on freebsd/riscv64 that requires internal cgo linking
Change https://go.dev/cl/431658 mentions this issue: cmd/nm, runtime/cgo: add cgo support for freebsd/riscv64
Change https://go.dev/cl/431657 mentions this issue: cmd/dist: enable cgo tests on freebsd/riscv64
Change https://go.dev/cl/431660 mentions this issue: cmd/link/internal/riscv64: add support for freebsd/riscv64
Change https://go.dev/cl/431659 mentions this issue: cmd/dist: add support for freebsd/riscv64
@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 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.
Change https://go.dev/cl/432656 mentions this issue: cmd/buildlet/stage0: add freebsd-riscv64-unmatched
Change https://go.dev/cl/432658 mentions this issue: cmd/buildlet: add freebsd-riscv64
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.
Change https://go.dev/cl/432756 mentions this issue: cmd/link: return correct default linker for the platform
@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.