-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/unix: go get golang.org/x/sys/unix (still) broken on arm64 #16065
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
Comments
CC @kortschak I actually do not know what tests are done on the subrepos. @kortschak You can build yourself for a different architecture by simply typing
When I do that on my amd64 system I do indeed see
|
@iant, Ugh. I am mortified, this is what you get for almost never using the new built-in. Thanks for the tip. CL sent. |
Unfortunately, that would not have picked up the error though - I'm building on 1.6.2 here, which does not recognise the arm64 GOARCH. |
CL https://golang.org/cl/24120 mentions this issue. |
No, just a typo. Sorry. |
CL https://golang.org/cl/24121 mentions this issue. |
I am running the
Any idea if this fix has been included in the 1.7.4 build, because the current status of this issue is still |
@narJH27, it's Unreleased because golang.org/x/sys/unix does not ship with Go releases. You need to update your copy of golang.org/x/sys/unix on disk. |
@bradfitz I am unsure as to how to go about this update as I am new to Go. Can you please guide me on how to do so? |
For questions about Go, see https://golang.org/wiki/Questions. But the short summary is "go get -u golang.org/x/sys/unix". If you have problems, see https://golang.org/wiki/Questions. |
Thanks for the ppoll fix! Unfortunately:
go version
)?go 1.6.1
go env
)?GOARCH="arm64"
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GO15VENDOREXPERIMENT="1"
CC="gcc"
CGO_ENABLED="1"
go get golang.org/x/sys/unix
Successful completion
# golang.org/x/sys/unix
src/golang.org/x/sys/unix/syscall_linux_arm64.go:185: cannot use new(*Timespec) (type **Timespec) as type *Timespec in assignment
src/golang.org/x/sys/unix/syscall_linux_arm64.go:186: cannot use timeout * 1e+06 (type int) as type int64 in argument to NsecToTimespec
I can get it to build with the following patch:
diff --git a/unix/syscall_linux_arm64.go b/unix/syscall_linux_arm64.go
index 4211cf6..4b6ff2a 100644
--- a/unix/syscall_linux_arm64.go
+++ b/unix/syscall_linux_arm64.go
@@ -182,8 +182,8 @@ const (
func Poll(fds []PollFd, timeout int) (n int, err error) {
var ts *Timespec
if timeout >= 0 {
- ts = new(*Timespec)
- *ts = NsecToTimespec(timeout * 1e6)
+ ts = new(Timespec)
+ *ts = NsecToTimespec(int64(timeout) * 1e6)
}
if len(fds) == 0 {
return ppoll(nil, 0, ts, nil)
Does the gopherbot not do compile tests for each GOARCH?
The text was updated successfully, but these errors were encountered: