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

debug image doesn't have debug symbols. #1338

Closed
cyriltovena opened this issue Nov 29, 2019 · 2 comments · Fixed by #1342
Closed

debug image doesn't have debug symbols. #1338

cyriltovena opened this issue Nov 29, 2019 · 2 comments · Fixed by #1342
Labels
component/packaging good first issue These are great first issues. If you are looking for a place to start, start here! keepalive An issue or PR that will be kept alive and never marked as stale.

Comments

@cyriltovena
Copy link
Contributor

The makefile target make loki-debug uses -w which removes symbols.

This is due to LD_FLAGS.

@cyriltovena cyriltovena added component/packaging good first issue These are great first issues. If you are looking for a place to start, start here! keepalive An issue or PR that will be kept alive and never marked as stale. labels Nov 29, 2019
@whothey
Copy link
Contributor

whothey commented Nov 30, 2019

Hi there,

Could I give it a try as my very first contribution?

I've managed it by removing the -w and -s flags, since -s strips the symbol table according to https://golang.org/pkg/cmd/link/internal/ld/#pkg-variables in the "Flags used by the linker" session.

Checked it through go tool nm ./cmd/loki/loki-debug, a giant list of symbols popped out.

I've also pushed the -w -s to the GO_FLAGS to prevent debug info in release binaries.

I'm just wondering if would be better to have an BASE_GO_LDFLAGS, to derive then DEBUG_GO_LDFLAGS and GO_LDFLAGS, but looks odd and overengineered.

@cyriltovena
Copy link
Contributor Author

For sure I’ll take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/packaging good first issue These are great first issues. If you are looking for a place to start, start here! keepalive An issue or PR that will be kept alive and never marked as stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants