go-delve / delve

Delve is a debugger for the Go programming language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install failing on arm64 M1 machine

DavidSolus opened this issue · comments

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.

If this is about source listing not showing up (or breakpoints not being
accepted) while running in a container please read our
FAQ
first.

  1. What version of Delve are you using (dlv version)? 1.21.2
  2. What version of Go are you using? (go version)? go version go1.21.5 darwin/arm64
  3. What operating system and processor architecture are you using? ARM64 M1 MacOS Sonoma 14.1
  4. What did you do? Ran go get github.com/go-delve/delve/cmd/dlv in Dockerfile
  5. What did you expect to see? For it to install correctly
  6. What did you see instead?
5.942 /go/pkg/mod/github.com/go-delve/delve@v1.21.2/pkg/proc/internal/ebpf/dummy.go:11:2: C source files not allowed when not using cgo or SWIG: trace.bpf.c
5.942 /go/pkg/mod/github.com/go-delve/delve@v1.21.2/service/debugger/debugger.go:32:2: found packages native (dump_linux.go) and your_operating_system_is_not_supported_by_delve (support_sentinel.go) in /go/pkg/mod/github.com/go-delve/delve@v1.21.2/pkg/proc/native
------
failed to solve: process "/bin/sh -c go get github.com/go-delve/delve/cmd/dlv     && go get github.com/githubnemo/CompileDaemon" did not complete successfully: exit code: 1
make: *** [all] Error 17

Reference: ivorscott/go-delve-reload#24

There are several problems with the values of GOOS and GOARCH you have set, pkg/proc/internal/ebpf wouldn't be built if GOOS wasn't linux and the support sentinel wouldn't complain if GOARCH wasn't also wrong.

Closing, no feedback.