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

Pass the netgo tag when building static binaries #1038

Closed
wants to merge 1 commit into from

Conversation

cyli
Copy link
Contributor

@cyli cyli commented Nov 15, 2016

  • When building static binaries with CGO, cgo unix network segfaults
  • When building dynamically linked binaries with CGO, everything is fine
  • When building static binaries with CGO but with netgo enabled, dns lookups seem fine

So add the netgo tag when building static binaries.

prometheus/alertmanager#304
golang/go#7857

Copy link
Contributor

@riyazdf riyazdf left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for fixing this! verified fix while pairing with @cyli

@@ -2,6 +2,7 @@

## [v0.5.1](https://github.com/docker/notary/releases/tag/v0.5.1) 11/14/2016
+ If no `records` parameter is provided in a request for the changefeed, a default value of 100 is used.
+ Fix build tags for static notary client binaries in linux
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking nit: can we add this PR number to the changelog? I think we forgot to do it for the previous entry as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah right, will do

@riyazdf
Copy link
Contributor

riyazdf commented Nov 16, 2016

also for noting: this closes #1037 and #1022.

I'm working on a v0.4.3 with this fix as well since we haven't released v0.5.x

- When building static binaries with CGO, cgo unix network segfaults
- When building dynamically linked binaries with CGO, everything is fine
- When building static binaries with CGO but with -tags netgo passed, everything is fine

So update our cross and static builds to include netgo.

prometheus/alertmanager#304
golang/go#7857

Signed-off-by: Ying Li <[email protected]>
@cyli
Copy link
Contributor Author

cyli commented Nov 16, 2016

Have filed golang/go#17935 to see if it's an issue in go

Copy link
Contributor

@endophage endophage left a comment

Choose a reason for hiding this comment

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

LGTM

@cyli
Copy link
Contributor Author

cyli commented Jan 5, 2017

Superseded by #1072

@cyli cyli closed this Jan 5, 2017
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.

3 participants