Skip to content

Conversation

@umanwizard
Copy link
Contributor

Without this flag, Go will silently determine whether to enable Cgo or not based on whether a program called "gcc" exists in the PATH. This is a bad default that leads to very difficult-to-understand error messages when it's not available.


build:
go build -o parca-agent -buildvcs=false -ldflags="-extldflags=-static" -tags osusergo,netgo
CGO_ENABLED=1 go build -o parca-agent -buildvcs=false -ldflags="-extldflags=-static" -tags osusergo,netgo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just export CGO_ENABLED = 1 higher up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants