←back to thread

201 points generichuman | 2 comments | | HN request time: 0.427s | source
Show context
Jeaye ◴[] No.43552616[source]
I don't understand why they don't just statically link their binaries. First, they said this:

> Even if you managed to statically link GLIBC—or used an alternative like musl—your application would be unable to load any dynamic libraries at runtime.

But then they immediately said they actually statically link all of their deps aside from libc.

> Instead, we take a different approach: statically linking everything we can.

If they're statically linking everything other than libc, then using musl or statically linking glibc will finish the job. Unless they have some need for loading share libs at runtime which they didn't already have linked into their binary (i.e. manual dlopen), this solves the portability problem on Linux.

What am I missing (assuming I know of the security implications of statically linked binaries -- which they didn't mention as a concern)?

replies(6): >>43552647 #>>43552652 #>>43552691 #>>43552703 #>>43552800 #>>43552822 #
AshamedCaptain ◴[] No.43552703[source]
And please, statically linking everything is NOT a solution -- the only reason I can run some games from 20 years ago still on my recent Linux is because they didn't decide to stupidly statically link everything, so I at least _can_ replace the libraries with hooks that make the games work with newer versions.
replies(3): >>43552726 #>>43552747 #>>43552785 #
evidencetamper ◴[] No.43552785[source]
As long as the library is available.

Neither static nor dynamic linking is looking to solve the 20 year old binaries issue, so both will have different issues.

But I think it's easier for me to find a 20 year old ISO of a Red Hat/Slackware where I can simply run the statically linked binary. Dependency hell for older distros become really difficult when the older packages are not archived anywhere anymore.

replies(3): >>43552889 #>>43553213 #>>43553862 #
1. terinjokes ◴[] No.43553213[source]
I've recently had to do this (to bisect when a change introduced a superficial bug into a 20-year-old program). I think "simply run" is viewing Linux of that era through rose-tinted glasses.

Even for simple 2D "Super VGA" you're needing to choose the correct XFree86 implementation and still tweak your Xorg configuration. The emulated hardware also has bugs, since most of the focus is now on virtio drivers.

(The 20-year-old program was linked against libsdl, which amusingly means on my modern system it supports Wayland with no issues.)

replies(1): >>43555536 #
2. AshamedCaptain ◴[] No.43555536[source]
Plus there are other advantages that I always say should never be discounted, such as desktop integration, that you get when you can replace the toolkit (dynamic) libraries rather than just "running everything in a VM". Running everything in a VM is a poor excuse for backwards compatibility.