Unofficial Hacker News companion — get notified on comment replies, and more.

All software sucks (2007) (opens external site)

167 points by archargelod 9 hours ago harmful.cat-v.org 199 comments (opens Hacker News) Vote (opens Hacker News)

View full thread · View on Hacker News

Comment thread (5)

  1. I would love someone smarter than me to lay out some reasons why musl is less harmful than glibc - I don't understand this one. I ask because I rely on both for various things.
    Replies (1)
    1. Depending on how you look at it, glibc was so bad that it created Docker.

      Add overlay filesystems to Linux kernel just to statically bundle or link glibc against glibc's express efforts to undermine static linking. Just tar it all up and ship it.

      Docker also basically added TCP port and UDP port linking information to ELF with compose files.

      Aside: Traefik solves the problem of OpenSSL refusing to play nice with shell pipelines like where SSH just slots in.

      Replies (1)
      1. > glibc was so bad that it created Docker

        This has nothing to do with glibc, everyone simply copied SUN/Solaris dynamic Linking system. It is 'bad' the same way on effectively every OS; windows, BSDs, Linux, and proprietary Unixes. The implementation was very short sighted, had very few opinions/options/systems to handle name-spacing, isolation, permission boundaries, and versioning. Isolating 1 tree of dynamic libraries from the other requires either hard system boundaries (namespaces/containers/jails or vms) or super weird system hacks (nixos) neither which addresses the core issues of the standard.

        It is only more recently that Apple & Microsoft have taken steps to address this. The solution for Linux/Unix was always chroot/jail/namespace, from the onset. Docker just this accessible.

        ---

        glibc is bad in a million other ways, mostly to do with just down right weird extensions, state management, and preserving harmful behavior in non-standard & barely used extensions for the sake of 'backward compatibility'.

        Replies (2)
        1. For NSS and iconv glibc explicitly drags in dynamic linking for startup on whatever system it is on. And for many areas where people wanted static linking and now use musl libc, the blocker, the only blocker for static linking was glibc. Apparently, FreeBSD system libc handles static linking just fine. Glibc is actively hostile to static linking and its developers are very open about that.

          Golang went so far as to directly call Linux syscalls. Which doesn't work anywhere else, because only Linux keeps its syscall ABI relatively stable.

          Chroot was too complicated for most people, the same way Docker user namespace mapping is causing problems now, just with file system paths and breaking out of chroots.

          FreeBSD jails seem reminiscent of IBM logical partitions, because each jail ID has its own userid 0 and group id 0 and filesystem root. But most software that people want to actually run is shipped on Debian not FreeBSD.

          If you want a static linking experience on Debian without shipping an entire Debian VM, then the answer is Docker and the empirical blocker for just typing `gcc -static` is glibc.

          Glibc was so much against dynamic linking that now Docker (a.k.a. Linux namespaces, groups) exists to get around that.

        2. > It is only more recently that Apple & Microsoft have taken steps to address this

          I'm curious - what are these steps? Are they a new optional system or something intended as a full replacement?