logoalt Hacker News

jeroenhd • yesterday at 9:37 PM • 2 replies • view on HN

I had to run a Linux binary compiled for Ubuntu 10.something a few years ago. I couldn't get the drivers to work properly in libvirt and getting the binary to run on modern Linux was practically impossible, even with 32 bit support installed.

The downside of dynamically linked binaries: every tool of medium complexity needs a close-enough version of a common library, and once those get upgraded, the tool dies.

Most statically compiled version should work with a compatible enough libc, but I haven't seen many old programs like that.

Wine, on the other hand, runs tools from the 90s just fine, as long as they're 32 bit.


Replies

account42 • today at 11:56 AM

You don't need to go full static linking. Just bundle every library that doesn't have string backwards guarantees or rather bundle everything except base system libraires. The same is also how things work on Windows (and thus Wine really). Wine won't be able to run a binary that links to some random libpng or whatever that the compiler found in your System32. The only difference is that Microsoft makes an SDK that gives your some idea of whats a system library you can rely on as well as the ability to target older versions than the system you are building on. The latter can be done on Linux as well but there is no-pre made SDK so the easiest solution ends up being a VM or chroot with older libraries.

boomlinde • today at 7:46 AM

AFAIK Wine will run 16-bit applications just fine now, through WoW64.