-
-
Notifications
You must be signed in to change notification settings - Fork 110
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 Caddy statically without CGO #17
Comments
Looks like it's not actually being disabled, try doing the same thing without Docker. Sorry though, I don't use Docker so I don't know how to help. Try asking on our forums instead. If this is a bug in xcaddy we can reopen this though. |
This is definitely not related to Docker though. Can you try on your machine: CGO_ENABLED=0 xcaddy build v2.0.0
ldd caddy To see if it's actually built statically? Thanks! |
@qdm12 What is the output for you? (I don't have ldd on my Mac so I need to find a workaround in the meantime.) |
Maybe try on osx: otool -L caddy I can compile it if I have gcc installed (even with CGO_ENABLED=0). Running Note that compiling Go programs (and caddy 1.0.x) statically works apart from that so my guess is it has something to do with xcaddy 🤔 I will try building Caddy 2 statically without xcaddy to make sure it's on xcaddy's side. |
@qdm12 Thanks for the tip, that made it pretty quick. Try the latest from master if you please? |
Yep it works! Thanks!! 👍 EDIT: What was the cause in the end, out of curiosity? |
Hello,
When trying to build Caddy statically (with
CGO_ENABLED=0
and withoutgcc
), using:I obtain the errors:
Any idea how I can solve that? Or is this related to xcaddy? Or one of the dependencies?
Thanks!
The text was updated successfully, but these errors were encountered: