When I look at the trends in the broader linux/unix world I see a lot of technology just doing away with dynamic linking of executable code. Correct me if I am wrong but here are some examples:
- Rust by default statically links all dependent libs.
- Go (the google one) statically links everything by default.
- One of the killer features of the rapidly growing NixOS is how it ships each package with its own set of libs instead of installing all shared libs into the system folder. The executables may still be compiled with dynamic linking enabled but since they will only ever link to the libs that they are shipped with I consider this to effectively be a form of static linking. (Or at least this is how it was explained to me. I still have not used NixOS yet so I would love if someone could chime in start a more informed discussion.)
- The growing popularity of containers which also ship with their own set of libs independent from the system set.
- The shift of flatpak from being an alternative method of installing software that may not be supported by your distro to being THE preferred method of installing software by some people (e.g. some GNOME developers).
I like flatpak and its competitors. I don't really see the big advantage of one over the other besides flatpak being the most popular and widely supported. I do think it is a bit ironic and silly though how some flatpaks pull in other dependent flatpaks. Like damn are they gonna reinvent dependency hell or what.
I find it annoying how Rust and Go packages on Gentoo with the meson build system will check to see if their dependent libs are installed and then go ahead and redownload their own version of it anyways to statically link with. I don't understand this. I wish they could just use the library I already have installed.
What are some engineering problems that prevent the continued usage of plain old dynamic linking? Do programming languages need a more unified system of specifying ABI and maintaining compatibility through updates? Does the old Executable and Linkable Format (ELF) need an upgrade? Do object file formats need new features? Do the various runtime linkers used across different systems need to behave more similarly?
Share your thoughts, experiences, and opinions!






