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
cmd/link: failed to debug while succeeding to compile and start server #58330
Comments
For detailed chat history between me and crdb community members, plz refer to cockroachdb/cockroach#96148. I'm looking forward to your replies sincerely!!! |
In addition, I just tried to remote debug in GoLand which needs gops. I tried to install go ps and failed.
|
The program you are trying to install is "gopls", For debuggers, you want either delve or glv:
They're somewhat more Go-savvy and Go-specific than gdb or lldb. |
Thanks for reply.
Summary:
|
Thanks for the report. It would be helpful if you could relate which xcode version you are using. |
OK, I have an arm64 mac with the right version of the OS installed, I made a few attempts to reproduce, but no luck so far. Based the linker failure mode, my best guess would be that the C/C++ compiler is emitting something that is making the Go linker unhappy, so until I can set things up on my machine to use exactly that version of clang, I won't be able to repro. Please do post more info about what version of xcode you have installed, thanks. |
xcode, gcc, g++, clang version as following
|
|
Well, I am stumped. I have set up an arm64 macbook so that it has the same configuration as the one you've reported, but I can't seem to reproduce the failure you're seeing at all (things build fine).
Have you tried this on other machines with similar setups? |
After re-init my Mac for several times, and re-install dev chain, finally I can debug now.Thanks for your reply! |
这个问题怎么解决的呢 有谁知道吗 |
更新工具链 并 重试 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, I switch to latest go version by executing
brew install go
, and I still can't debug crdb while I can compile whole project.What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
cd $GOPATH/src/github.com/cockroachdb/cockroach
./dev gen go
./dev gen bazel
./dev gen cgo
./dev build short
start-single-node --listen-addr=127.0.0.1:26257 --http-addr=127.0.0.1:8081 --store /Users/adzfolc/Workspace/crdbdata --insecure
brew install go
, andcockroach
compile by go shows different go version fromgo version
.cockroach
like belowAnd I can connect the server, and executing queries normally.
What did you expect to see?
What did you see instead?
cockroach
normally.cockroach debug keys path --values
cockroachdb/cockroach#96148. There are detailed chat history between me and crdb community members.The text was updated successfully, but these errors were encountered: