Skip to content

Binary package missing "debug_info". #65063

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

Closed
tttoad opened this issue Jan 11, 2024 · 3 comments
Closed

Binary package missing "debug_info". #65063

tttoad opened this issue Jan 11, 2024 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@tttoad
Copy link

tttoad commented Jan 11, 2024

Go version

go version go1.21.5 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/toad/Library/Caches/go-build'
GOENV='/Users/toad/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/toad/work/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/toad/work'
GOPRIVATE=''
GOPROXY='https://goproxy.cn,direct'
GOROOT='/Users/toad/go/go1.21.5'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/toad/go/go1.21.5/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/toad/work/***/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-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/g1/tgmnlrdn3vxgv08kdgh9vpkw0000gn/T/go-build768557887=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

image

go build -o ./main -gcflags all="-N -l" ./cmd/servicemap/main.go

What did you see happen?

I need to use dlv for debugging, but I noticed that the built binary is missing "__zdebug_info".

What did you expect to see?

The binary package should have "__zdebug_info".
I'm not clear on how to troubleshoot this. Only this project is missing, maybe because of the cache ?
I upgraded the SDK. from 1.20.7 to 1.21.5.

@tttoad
Copy link
Author

tttoad commented Jan 11, 2024

I tried using go clean -cache.
The build product is still missing __zdebug_info.

@bcmills
Copy link
Contributor

bcmills commented Jan 11, 2024

Is this a duplicate of #65014?

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. compiler/runtime Issues related to the Go compiler and/or runtime. labels Jan 11, 2024
@tttoad
Copy link
Author

tttoad commented Jan 12, 2024

Yes, it's the same problem.
I don't use CGO in my project, it works when I use CGO_ENABLED=0.
This seems to be something that only happens on darwin, when I build within linux is works.

@tttoad tttoad closed this as completed Jan 12, 2024
@golang golang locked and limited conversation to collaborators Jan 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants