Live data from Hacker News

Loss32: Let's Build a Win32/Linux

loss32.org

171–180 of 493 posts

Re: Loss32: Let's Build a Win32/Linux

#171
post #106
post #65

Earlier quoted context omitted.

It's really just glibc

It's really just not. GTK is on its fourth major version. Wayland broke backwards compatibility with tons of apps.

The difference is that you can statically link GTK+, and it'll work. You can't statically link glibc, if you want to be able to resolve hostnames or users, because of NSS modules.

Re: Loss32: Let's Build a Win32/Linux

#172
post #50

This might offend some people but even Linus Torvalds thinks that the ABI compatibility is not good enough in Linux distros, and this is one of the main reasons Linux is not popular on the desktop. https://www.youtube.com/watch?v=5PmHRSeA2c8&t=283s

This might be why OpenBSD looks attractive to some. Its kernel and all the different applications are fully integrated with each other -- no distros! It also tries to be simple, I believe, which makes it more secure and overall less buggy.

To be honest, I think OSes are boring, and should have been that way since maybe 1995. The basic notions:

  multi-processing, context switching, tree-like file systems, multiple users, access privileges,
haven't changed since 1970, and the more modern GUI stuff hasn't changed since at least the early '90s. Some design elements, like

  tree-like file systems, WIMP GUIs, per-user privileges, the fuzziness of what an
  "operating system" even is and its role,
are perhaps even arbitrary, but can serve as a mature foundation for better-concieved ideas, such as:

  ZFS (which implements in a very well-engineered manner a tree-like data storage that's
  been standard since the '60s) can serve as a founation for
  Postgres (which implements a better-conceived relational design)
I'm wondering why OSS - which according to one of its acolytes, makes all bugs shallow - couldn't make its flagship OS more stable and boring. It's produced an

  anarchy of packaging systems, breaking upgrades and updates,
  unstable glibc, desktop environments that are different and changing seemingly
  for the sake of it, sound that's kept breaking, power management iffiness, etc.

Re: Loss32: Let's Build a Win32/Linux

#174
post #79
post #50

This might offend some people but even Linus Torvalds thinks that the ABI compatibility is not good enough in Linux distros, and this is one of the main reasons Linux is not popular on the desktop. https://www.youtube.com/watch?v=5PmHRSeA2c8&t=283s

To quote a friend; "Glibc is a waste of a perfectly good stable kernel ABI"

Kind of funny to realize, the NT kernel ABI isn’t even all that stable itself; it is just wrapped in a set of very stable userland exposures (Win32, UWP, etc.), and it’s those exposures that Windows executables are relying on. A theoretical Windows PE binary that was 100% statically linked (and so directly contained NT syscalls) wouldn’t be at-all portable between different Windows versions.

Linux with glibc is the complete opposite; there really does exist old Linux software that static-links in everything down to libc, just interacting with the kernel through syscalls—and it does (almost always) still work to run such software on a modern Linux, even when the software is 10-20 years old.

I guess this is why Linux containers are such a thing: you’re taking a dynamically-linked Linux binary and pinning it to a particular entire userland, such that when you run the old software, it calls into the old glibc. Containers work, because they ultimately ground out in the same set of stable kernel ABI calls.

(Which, now that I think of it, makes me wonder how exactly Windows containers work. I’m guessing each one brings its own NTOSKRNL, that gets spun up under HyperV if the host kernel ABI doesn’t match the guest?)

Re: Loss32: Let's Build a Win32/Linux

#176
post #79

Earlier quoted context omitted.

To quote a friend; "Glibc is a waste of a perfectly good stable kernel ABI"

At least glibc uses versioned symbols. Hundreds of other widely-used open source libraries don't.

Versioned glibc symbols are part of the reason that binaries aren't portable across Linux distributions and time.

Re: Loss32: Let's Build a Win32/Linux

#177
post #85
post #67

Earlier quoted context omitted.

I agree 100% with Linus. I can run a WinXP exe on Win10 or 11 almost every time, but on Linux I often have to chase down versions that still work with the latest Mint or Ubuntu distros. Stuff that worked before just breaks, especially if the app isn’t in the repo.

That’s actually an intentional nudge to make the software packaged by the distro, which usually implies that they are open source. Who needs ABI compatibility when your software is OSS? You only need API compatibility at that point.

Everyone is mentioning ABI, but this is really an API problem, so "you only need API compatibility at that point" is a very big understatement.

Re: Loss32: Let's Build a Win32/Linux

#178
post #50

This might offend some people but even Linus Torvalds thinks that the ABI compatibility is not good enough in Linux distros, and this is one of the main reasons Linux is not popular on the desktop. https://www.youtube.com/watch?v=5PmHRSeA2c8&t=283s

Isn't the kernel responsible for the ABI?

Re: Loss32: Let's Build a Win32/Linux

#179
post #167
post #97

Earlier quoted context omitted.

Can't we just freeze glibc, at least from an API version perspective?

The problem is not the APIs, it's symbol versions. You will routinely get loader errors when running software compiled against a newer glibc than what a system provides, even if the caller does not use any "new" APIs. glibc-based toolchains are ultimately missing a GLIBC_MIN_DEPLOYMENT_TARGET definition that gets passed to the linker so it knows which minimum version of glibc your software supports, similar to how Ap…

In principle you can patch your binary to accept the old local version, though I don't remember ever getting it to work right. Anyway here it is for the brave or foolhardy, here's the gist:

  patchelf --set-interpreter /lib/ld-linux-x86-64.so.2 "$APP"
  patchelf --set-rpath /lib "$APP"

Re: Loss32: Let's Build a Win32/Linux

#180
post #102
post #90

Can somebody explain: 1. The exact problem with the Linux ABI 2. What causes it (the issues that makes it such a challenge) 3. How it changed over the years, and its current state 4. Any serious attempts to resolve it I've been on Linux for may be 2 decades at this point. I haven't noticed any issues with ABI so far, perhaps because I use everything from the distro repo or build and install them using the package man…

The model of patching+recompiling the world for every OS release is a terrible hack that devs hate and that users hate. 99% of all people hate it because it's a crap model. Devs hate middlemen who silently fuck up their software and leave upstream with the mess, users hate being restricted to whatever software was cool and current two years ago. If they use a rolling distro, they hate the constant brokenness that com…

> If they use a rolling distro, they hate the constant brokenness that comes with it.

Never happens for me on Arch, which I've run as my primary desktop for 15 years.

Post reply on HN