-
Notifications
You must be signed in to change notification settings - Fork 80
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
promu failing to produce static binaries #60
Comments
Adding Instead we could run the standard If you need a static binary I suggest you run |
Yep, while I did not know about the side-effects of using The goal here is that
I also ran |
This is because when we use Even he we don't specify |
Umm, wait. Let me backup a little here. Don't you think static binaries should be the default? |
@sdurrheimer I'm confused.. So what's the right way to enable static builds? It seems like there are scenarios where not setting CGO_ENABLED will make it build dynamically linked while setting CGO_ENABLED=0 explicitly gives you a statically linked binary. Even if |
Unfortunately, this is the current golang behavior. It depends on the project's code. I don't know how to force golang to build statically besides setting |
Compiling Prometheus via promu produces a dynamic build. But using
CGO_ENABLED=0
env var produces a static one.promu should natively produce a static binary.
Ref: prometheus/prometheus#2460
The text was updated successfully, but these errors were encountered: