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

Build kuberlr releases with CGO_ENABLED=1 #27

Open
jandubois opened this issue Jul 22, 2022 · 3 comments
Open

Build kuberlr releases with CGO_ENABLED=1 #27

jandubois opened this issue Jul 22, 2022 · 3 comments

Comments

@jandubois
Copy link
Contributor

The Go runtime only has a limited DNS resolver that does not support e.g. split-DNS configuration with a corporate VPN setup.

This doesn't matter much on Linux, where things are handled by 127.0.0.53 (systemd-resolved), but on macOS (and I think Windows) using the native resolver would be much preferable.

@flavio
Copy link
Owner

flavio commented Aug 2, 2022

Wouldn't that make the final binary less portable?

@jandubois
Copy link
Contributor Author

jandubois commented Aug 31, 2022

Wouldn't that make the final binary less portable?

Sorry, was just on vacation most of August. 😄

I think portability is only an issue on Linux; I would expect things to just work on macOS and Windows, even when you build with CGO_ENABLED=1. Given that this isn't needed on systems using systemd-resolved I think it makes sense to compile the Linux version with CGO_ENABLED=0 as before.

We can build our own binaries for Rancher Desktop if you want to keep things as they are, but it would be easier for us if we can just download bits from your releases page...

@flavio
Copy link
Owner

flavio commented Aug 31, 2022

I looks like goreleaser and CGO=1 is not that easy... https://goreleaser.com/cookbooks/cgo-and-crosscompiling/

However, I would be fine to have only linux built with CGO disabled, as long as you can verify that everything works fine with Windwos and macOS

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

No branches or pull requests

2 participants