It depends. I've found for example, if i compile on Ubuntu or Debian, it will probably work on any Ubuntu, Debian, or Debian-based distro released at or newer than the one I compiled it on. There are other cross-compatible examples.

More broadly, there are things like manylinux and MUSL which allow cross-distro applications.

Containers fix this.

As long as the container bundles the right libc, the program should work.

Just like Python venv, The system is too broken that it's the only real practical fix

I agree - the model I use for why containers (Docker etc) exist is to abstract over Linux ABI incompatibility. I don't think they're a great solution, as it complicates software distribution. I should be able to distribute an executable and have it just work.

Linux isn't the source of the incompatibility. The kernel itself is very strict about not breaking userspace. Your userspace is breaking compatibility on its own, containers fix it by shipping the userspace components within the container, which only works because the kernel maintained compatibility. If the kernel broke compatibility you would need to use a VM so you can run a different kernel version.

That's what win32 is for...

Hah well yes for Windows. This is a mercy, but my mindset is still "Works on Windows, Linux and Mac". (The last being dropped for anything that requires Cuda...)

Win32 is the stable ABI for Linux, too.