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

Not usable with Go 1.18 due to outdated golang.org/x/sys/unix dependency #72

Closed
pscheid92 opened this issue Apr 16, 2022 · 0 comments · Fixed by #75
Closed

Not usable with Go 1.18 due to outdated golang.org/x/sys/unix dependency #72

pscheid92 opened this issue Apr 16, 2022 · 0 comments · Fixed by #75

Comments

@pscheid92
Copy link

TL;DR
We need to update the golang.org/x/sys/unix dependency.
There is already an open pull request to do that: #71

Description

Context
This error is due to a fixed bug in golang.org/x/sys/unix (see golang/go#49219).
To benefit from this bugfix, we have to update the version here.

Since github.com/mattn/go-isatty is a dependency for github.com/gin-gonic/gin, those are also affected (gin-gonic/gin#3082).

Workaround
When you see the below error, run go get -u golang.org/x/sys to force an upgrade to the newest golang.org/x/sys/unix version. This has to be done at least for every new project.

Reproduction

Steps

  • Copy usage example from README file
  • Try to build/run it with Go 1.18 or Go 1.18.1

Expectation
The project is built and runs.

Actual Behaviour
Build/run aborts with an error.

> go build .                

# golang.org/x/sys/unix
../../Go/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
../../Go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: too many errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant