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/sys/unix: go:linkname must refer to declared function or variable #51091

Closed
weberc2-tempus opened this issue Feb 9, 2022 · 4 comments
Closed

Comments

@weberc2-tempus
Copy link

weberc2-tempus commented Feb 9, 2022

What version of Go are you using (go version)?

$ go version
go version go1.18beta2 darwin/amd64

Does this issue reproduce with the latest release?

no, this seems to only affect go1.18beta1 and go1.18beta2.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/craig.weber/Library/Caches/go-build"
GOENV="/Users/craig.weber/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/craig.weber/.gvm/pkgsets/go1.18beta2/global/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/craig.weber/.gvm/pkgsets/go1.18beta2/global"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/craig.weber/.gvm/gos/go1.18beta2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/craig.weber/.gvm/gos/go1.18beta2/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18beta2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/craig.weber/repos/github.com/weberc2/mono/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0s/gk8b_5s14_59cb4c6l6l0c6c35y91d/T/go-build1997345125=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ go install github.com/segmentio/golines@latest

What did you expect to see?

No errors.

What did you see instead?

# golang.org/x/sys/unix
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/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
../../../../.gvm/pkgsets/go1.18beta2/global/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
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
../../../../.gvm/pkgsets/go1.18beta2/global/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: too many errors
@gopherbot gopherbot added this to the Unreleased milestone Feb 9, 2022
@ianlancetaylor
Copy link
Member

You need to arrange to use a newer version of golang.org/x/sys. The 2019-10-24 version doesn't work with Go1.18beta2. Use the latest version instead.

@4cecoder
Copy link

You need to arrange to use a newer version of golang.org/x/sys. The 2019-10-24 version doesn't work with Go1.18beta2. Use the latest version instead.

how do you install a newer version of golang.org/x/sys?

@ianlancetaylor
Copy link
Member

For example, "go get -u golang.org/x/sys/unix".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants
@ianlancetaylor @gopherbot @weberc2-tempus @4cecoder and others