3 ms·
You can statically link at least GTK applications (less sure about Qt, never tried), but many build systems don't support it very well and it requires some amou
by arp242 3y ago
You can statically link at least GTK applications (less sure about Qt, never tried), but many build systems don't support it very well and it requires some amount of hackery.
The best trade-off is probably "link against libc, statically link everything else". That gives you dlopen() and some security benefits. But again, build systems don't support it very well out of the box.
I think the outright hostility against static linking has been unfortunate, because now we have a whole bunch of "static linking, but with extra steps" systems to work around it. Dynamic linking is fine for many things, but it's obviously not always the best solution.
It's disappointing that essentially nothing really improved in the 10 years since Linus gave that talk. Okay, there's flatpak and appimage and snap which are an "improvement" of sorts, but it's all pretty complex and half the time when I wanted to run one it didn't work well.