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

Use netgo for static build #1577

Merged
merged 2 commits into from
Sep 11, 2017
Merged

Use netgo for static build #1577

merged 2 commits into from
Sep 11, 2017

Conversation

yongtang
Copy link
Contributor

This fix adds netgo to tags for static build so that the following warning could be addressed:

/tmp/go-link-355596637/000000.o: In function `_cgo_b0c710f30cfd_C2func_getaddrinfo':
/tmp/go-build/net/_obj/cgo-gcc-prolog:46: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

The above warning appears when building make static with go 1.9.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

@tianon
Copy link
Member

tianon commented Aug 30, 2017

I'd recommend also using -installsuffix (-installsuffix netgo, for example) when using netgo (see golang/go#9369 (comment)).

@yongtang
Copy link
Contributor Author

Thanks @tianon for pointing to -installsuffix ! The PR has been updated.

@thaJeztah
Copy link
Member

ping @crosbymichael any idea who to ping here to get this moving?

@crosbymichael
Copy link
Member

@thaJeztah a passing build is first

@thaJeztah
Copy link
Member

oh, dang, sorry 😊

@yongtang can you have a look why CI is failing?

This fix adds `netgo` to tags for static build so that
the following warning could be addressed:
```
/tmp/go-link-355596637/000000.o: In function `_cgo_b0c710f30cfd_C2func_getaddrinfo':
/tmp/go-build/net/_obj/cgo-gcc-prolog:46: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
```

The above warning appears when building `make static` with
go 1.9.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix adds `-installsuffix netgo` in static build in combination
of `-tags netgo`. See following for the reason:
golang/go#9369 (comment)

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
@yongtang
Copy link
Contributor Author

@crosbymichael @thaJeztah The PR has been rebased and now tests passed. Please take a look and let me know if there are any issues.

@crosbymichael
Copy link
Member

crosbymichael commented Sep 11, 2017

LGTM

Approved with PullApprove

1 similar comment
@cyphar
Copy link
Member

cyphar commented Sep 11, 2017

LGTM

Approved with PullApprove

@cyphar cyphar merged commit ec42eaa into opencontainers:master Sep 11, 2017
cyphar added a commit that referenced this pull request Sep 11, 2017
  Add `-installsuffix netgo` in static build
  Use `netgo` for static build

LGTMs: @crosbymichael @cyphar
Closes #1577
@thaJeztah
Copy link
Member

Thanks!

@yongtang yongtang deleted the netgo branch September 11, 2017 22:05
yongtang added a commit to yongtang/docker that referenced this pull request Sep 26, 2017
This fix updates runc to 0351df1c5a66838d0c392b4ac4cf9450de844e2d

With this fix the warnings generated by netgo and dlopen by go 1.9
are addressed.

See
- opencontainers/runc#1577
- opencontainers/runc#1579

This fix is part of the efforts for go 1.9 (moby#33892)

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
andrewhsu pushed a commit to docker-archive/docker-ce that referenced this pull request Sep 27, 2017
This fix updates runc to 0351df1c5a66838d0c392b4ac4cf9450de844e2d

With this fix the warnings generated by netgo and dlopen by go 1.9
are addressed.

See
- opencontainers/runc#1577
- opencontainers/runc#1579

This fix is part of the efforts for go 1.9 (#33892)

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e0ff1d1
Component: engine
salah-khan pushed a commit to salah-khan/moby that referenced this pull request Nov 15, 2017
This fix updates runc to 0351df1c5a66838d0c392b4ac4cf9450de844e2d

With this fix the warnings generated by netgo and dlopen by go 1.9
are addressed.

See
- opencontainers/runc#1577
- opencontainers/runc#1579

This fix is part of the efforts for go 1.9 (moby#33892)

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
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.

5 participants