5 ms·
> If the program is statically linked, then nothing can happen - either it works or it doesn't. With dynamic linking, changes are possible by changing which lib
by foobar33333 5y ago
> If the program is statically linked, then nothing can happen - either it works or it doesn't. With dynamic linking, changes are possible by changing which library is loaded.
These problems are almost purely caused by dynamic linking though. The devs release something that was tested on some old version of ubuntu and now on your new fedora, things work different and the program is broken. While with static linking, it all just works.
- jacquesm 5y agoIt's not the program that is broken, it is the environment that is broken.
- foobar33333 5y agoIf by broken you mean having the latest features and security patches. Dynamically linked binaries are very fragile and not portable.
- necovek 5y agoLatest features and security patches rarely go hand-in-hand: it's usually latest features and new security bugs instead. Developers want to maintain a single branch because that's much cheaper, not because it's the ultimate solution to all the problems of maintaining software.
- necovek 5y agoYou seem to be assuming that a statically linked library won't have a subtle, edge-case bug, when in fact, it doesn't just work. Even that could be env-related, so maybe it surfaced once you moved to a new Fedora release. Basically, the problems are pretty much the same with either approach, one has a more complex runtime environment, other has a more complex upgrade story. While I'd agree with Linus' take on shared libraries, I'd still say that "statically linked libraries are not a good thing in general either" (the stress is on general).