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/tools/gopls: gopls and other tool installs fail on 2021 M1 Max Mac #66012

Closed
salorsino opened this issue Feb 28, 2024 · 4 comments
Closed

x/tools/gopls: gopls and other tool installs fail on 2021 M1 Max Mac #66012

salorsino opened this issue Feb 28, 2024 · 4 comments
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@salorsino
Copy link

gopls version

latest

go env

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/pseg/Library/Caches/go-build'
GOENV='/Users/pseg/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/pseg/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/pseg/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/pseg/Desktop/Code/learn-go/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-

What did you do?

I enabled the Go VS Code extension and I get errors that I have to install gopls and other tools, so when I try to install it, I keep getting an error, and I have no intellisense or any features in my editor.

What did you see happen?

2024-02-28 16:51:25.923 [info] Tools environment: GOPATH=/Users/pseg/go
2024-02-28 16:51:25.923 [info] Installing 5 tools at /Users/pseg/go/bin
2024-02-28 16:51:25.923 [info] gopls
2024-02-28 16:51:25.923 [info] gotests
2024-02-28 16:51:25.923 [info] goplay
2024-02-28 16:51:25.923 [info] dlv
2024-02-28 16:51:25.923 [info] staticcheck
2024-02-28 16:51:25.923 [info]
2024-02-28 16:51:26.759 [info] Installing golang.org/x/tools/gopls@latest FAILED
2024-02-28 16:51:26.759 [info] {
"code": 1,
"killed": false,
"signal": null,
"cmd": "/usr/local/go/bin/go install -v golang.org/x/tools/gopls@latest",
"stdout": "",
"stderr": "# golang.org/x/tools/gopls\n/usr/local/go/pkg/tool/darwin_arm64/link: running clang failed: exit status 1\nld: Undefined symbols:\n _darwin_arm_init_mach_exception_handler, referenced from:\n _x_cgo_init in 000005.o\n _darwin_arm_init_thread_exception_port, referenced from:\n _threadentry in 000005.o\n _x_cgo_init in 000005.o\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n\n"
}

What did you expect to see?

Successful install

Editor and settings

No response

Logs

No response

@salorsino salorsino added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Feb 28, 2024
@gopherbot gopherbot added this to the Unreleased milestone Feb 28, 2024
@simulationguest
Copy link

simulationguest commented Feb 28, 2024

See #62432 (comment) for a solution

@salorsino
Copy link
Author

See #62432 (comment) for a solution

This didn't work unfortuntately

@adonovan
Copy link
Member

adonovan commented Mar 7, 2024

Hmm, that is surprising. Perhaps you could try the following commands and share their output with me:

$ go version
$ go install golang.org/x/tools/gopls@v0.15.1
$ go version $(which gopls)

@findleyr findleyr added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 11, 2024
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants