News for hackers. Stuff that matters.
Re:Go 1.21 will (likely) have a static toolchain on Linux by silisili on Saturday April 08, 2023 @03:27AM (#35491325)
In Go's case, because DNS is such a bear. Not the looking up part, but all the sources and behaviors behind where and how to lookup.

IIRC they couldn't even do it natively on MacOS due to system restrictions, unsure if that's still the case.

Re:Go 1.21 will (likely) have a static toolchain on Linux by cpach on Saturday April 08, 2023 @03:42AM (#35491406)
Native DNS lookups is possible in Go on macOS. But it seems the road to get there was not exactly smooth.
Re:Go 1.21 will (likely) have a static toolchain on Linux by mseepgood on Saturday April 08, 2023 @04:05AM (#35491507)
It's not difficult, and it was done like that for some time, but the macOS system call interface is not guaranteed to be stable (more like guaranteed to be unstable), so the correct thing on macOS is to go through libc (libSystem), which Go now does since 1.12.
Re:Go 1.21 will (likely) have a static toolchain on Linux by cpach on Saturday April 08, 2023 @04:56AM (#35491695)
Not exactly rocket science perhaps, but AFAICT there was some long-running tickets related to DNS lookups on macOS.
Re:Go 1.21 will (likely) have a static toolchain on Linux by jen20 on Saturday April 08, 2023 @11:39AM (#35494347)
For DNS specifically, this landed in Go 1.20: here is the change set [1].

A different change [2] had a similar effect of using the system facilities for certificate validation in 1.18.

In general, using the custom stuff “works” (until it doesn’t!) but results in janky programs that don’t behave with respect to split tunnel DNS and so forth - very common with cross compiled programs until recently.

[1]: https://go-review.googlesource.com/c/go/+/446178

[2]: https://go-review.googlesource.com/c/go/+/353132

Re:Go 1.21 will (likely) have a static toolchain on Linux by cpuguy83 on Saturday April 08, 2023 @10:31AM (#35493505)
Is dns lookup provided by the kernel on macOS? I'm pretty sure this would all be done in userspace anyway.

There is no "native" way to do this unless you consider libc (or libsystem) "native". There is no kernel interface to do dnd lookups just standard userspace tooling.