4 ms·
It is not impossible to link glibc statically, and in older versions of libc this did occur. However, the Linux community at the time decided that the tradeoff
by rkeene2 9y ago
It is not impossible to link glibc statically, and in older versions of libc this did occur. However, the Linux community at the time decided that the tradeoff of disallowing the system NSS to be modular was too great -- Go developers disregard this and don't believe anyone does anything other than the defaults.
Even still, it's possible to compile glibc such that those NSS modules are statically linkable. See here for further information: https://stackoverflow.com/questions/3430400/linux-static-linking-is-dead https://stackoverflow.com/questions/3430400/linux-static-lin...
However, in 1992 it was entirely possible to statically link an application to libc4 and have it have no run-time dependencies other than the kernel ABI.
- justincormack 9y agoIt is now with Musl libc
- dullgiulio 9y agoGo doesn't disregard anything. It tried to parse NSS configuration, if there is no Go implementation available for the user conf it parsed, it falls back to glibc.
- rkeene2 9y agoOnly if you use "cgo", otherwise it doesn't have access to the run-time linker.
- dullgiulio 9y agoNo, by default.