Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Yes, 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.


Yes, I blame glibc for deprecating what should be perfectly normal...


May 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.


Well 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: