3 ms·
Statically link everything? Including glibc?
by dataflow 4y ago
Statically link everything? Including glibc?
- melissalobos 4y ago> Including glibc? Any reasonable person doing this would use Musl of course.
- tedunangst 4y agoAnd then you discover your program can't resolve hostnames because "DNS responses shouldn't be that big".
- ducktective 4y agoCan you explain how musl is related to this DNS resolving problem?
- brettdong 4y agohttps://news.ycombinator.com/item?id=28312935 https://news.ycombinator.com/item?id=28312935
- speed_spread 4y agoBut honestly, they really shouldn't.
- ajvs 4y agoAppImage is sufficient.
- ranger_danger 4y agonope, it still requires at least the glibc version that the appimage was compiled against. snaps, flatpaks nor appimage solve the long-standing glibc versioning issue that plagues portable Linux binaries. the closest I've seen to fixing this issue is https://github.com/wheybags/glibc_version_header https://github.com/wheybags/glibc_version_header
- account42 4y ago> the closest I've seen to fixing this issue is https://github.com/wheybags/glibc_version_header https://github.com/wheybags/glibc_version_header Or just compile against an older glibc version. Plenty of tools to setup sysroots for that, e.g. https://wiki.gentoo.org/wiki/Crossdev https://wiki.gentoo.org/wiki/Crossdev
- deleted 4y ago[deleted]
- kazinator 4y agoTrick question: glibc doesn't support that. Trying to statically link with glibc is a fool's errand.
- account42 4y agoglibc doesn't support static linking, but you can fully static link with another libc if that is what you wanted to do. Not that it is needed for forward-compatible Linux binaries since newer glibc versions are backwards compatible so dynamically linking the oldest one you want to support works fine. Would be nice if glibc/gcc supported targetting older versions directly without having to have an older copy installed but that is a convenience issue.
- jcelerier 4y agoWhen trying to statically link everything, glibc is not as much a problem as GPU drivers are if you want binaries that work on more than one system