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

Publish statically linked go binary #19365

Closed
mcandre opened this issue Mar 2, 2017 · 2 comments
Closed

Publish statically linked go binary #19365

mcandre opened this issue Mar 2, 2017 · 2 comments

Comments

@mcandre
Copy link

mcandre commented Mar 2, 2017

I'm trying to install Go 1.7.5 on Alpine from the official binary tarball. However, file shows that this binary is dynamically linked to /lib64/ld-linux-x86-64.so.2 (glibc), which makes it difficult to run this binary on embedded Linux systems.

Perhaps Go could publish these binaries as statically linked?

Perhaps Go could publish musl-linked binaries in addition to glibc-linked binaries?

@ianlancetaylor
Copy link
Member

To be honest, I think the right choice here is for people interested in Alpine to build their own binary distributions and make them available. We don't want to provide statically linked binaries by default, as the resulting go tool will not support go get in some configurations. We don't want to provide binaries for a wide range of different systems and configurations, because that is more work for us installing and maintaining the systems required to build them. And, frankly, we're going to make mistakes, and that is even more work. We provide binary downloads as a convenience for the largest sets of users. We can't provide binary downloads for all users.

@ALTree
Copy link
Member

ALTree commented Mar 2, 2017

Thanks for the report.

This is a dup of #18773 [Official Go binary does not work in Alpine Linux (not statically linked)], where they're asking pretty much the same thing:

we thought it would be good to have a statically-linked binary available

You are also suggesting another alternative (publish musl-linked binaries), but I think it would be better to keep all the discussion related to this issue on #18773; so I'm closing this. Feel free to write about publishing musl-linked bins on that issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants