4 ms·
Glibc does not properly support static binaries, you need libc around even for static binaries mostly (eg dns resolution). Its annoying. You can make real stati
by justincormack 12y ago
Glibc does not properly support static binaries, you need libc around even for static binaries mostly (eg dns resolution). Its annoying. You can make real static binaries with Musl libc though, or on the BSDs.
- pjmlp 12y agoYes, but it doesn't change the fact how strange it is to see people amazed by having a language compiler supporting static compilation. Two decades ago it was the only option in most operating systems.
- justincormack 12y agoYes, I blame glibc for deprecating what should be perfectly normal...
- pjmlp 12y agoMay be. But it is an issue for the C developers that choose to link with it, need to sort out. Not an excuse for the lack of understanding, that static compilation is a standard feature that any language compiler to native code usually provides.
- ithkuil 12y agoWell currently this applies to Go as well: when linking to the "net" package it links to the system libc shared library for the same reason. You can build your binary with the netgo build tag, but you must take into consideration that your binary might not behave correctly when running on systems with customised name resolution (NSS) settings, such as nss-ldap etc.