-
Notifications
You must be signed in to change notification settings - Fork 486
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
build: do not produce Windows binaries with netgo build tags #4672
Conversation
Go 1.19 adds Windows support for the native Go network stack, but doesn't include support for resolving DNS short names. Other projects, including Prometheus, have updated their build process to exclude the netgo build tags when producing Windows binaries to work around this behavior. Fixes grafana#4665.
91c6de1
to
3f89af3
Compare
dist/grafana-agent-darwin-arm64: GOOS := darwin | ||
dist/grafana-agent-darwin-arm64: GOARCH := arm64 | ||
dist/grafana-agent-darwin-arm64: generate-ui | ||
$(PACKAGING_VARS) AGENT_BINARY=$@ $(MAKE) -f $(PARENT_MAKEFILE) agent | ||
|
||
# NOTE(rfratto): do not use netgo when building Windows binaries, which | ||
# prevents DNS short names from being resovable. See grafana/agent#4665. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add a TODO to revert this change when the underlying Go issue is resolved?
golang/go#57757
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's the same issue, is it? I don't see any mention of the hosts file in the issue or the Prometheus issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a generic TODO comment, since I don't think this is the same issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I think you're right and it's not the same issue. But it's probably another issue which needs to be resolved before we use netgo on windows. Anyway, thank you for adding the TODO.
Go 1.19 adds Windows support for the native Go network stack, but doesn't include support for resolving DNS short names. Other projects, including Prometheus, have updated their build process to exclude the netgo build tags when producing Windows binaries to work around this behavior. Fixes #4665.
Go 1.19 adds Windows support for the native Go network stack, but doesn't include support for resolving DNS short names. Other projects, including Prometheus, have updated their build process to exclude the netgo build tags when producing Windows binaries to work around this behavior. Fixes #4665.
Go 1.19 adds Windows support for the native Go network stack, but doesn't include support for resolving DNS short names.
Other projects, including Prometheus, have updated their build process to exclude the netgo build tags when producing Windows binaries to work around this behavior.
Fixes #4665