3 ms·
Exactly. The issue is not static vs dynamic; it's bundled vs unbundled. You could probably even do an "unbundled" statically linked system, e.g. imagine Debian
by IshKebab 5y ago
Exactly. The issue is not static vs dynamic; it's bundled vs unbundled.
You could probably even do an "unbundled" statically linked system, e.g. imagine Debian but everything is statically linked. Doesn't matter that everything is statically linked - if there's a vulnerability in libpng you can still easily update dependencies. Just uses more network / disk space.
- Wowfunhappy 5y agoI agree, but if you're bundling the dependencies why not just statically link them too? I've never understood the way macOS does it (dynamic linking, but app bundles ship with the libraries they need included).
- ziml77 5y agoIn some cases it's required such as if you're using a closed-source library that doesn't provide a static version or if you're calling LGPL code from non-GPL-compatible code.
- alkonaut 5y agoThis is also how windows apps always worked. It’s good for deployment because an update might not touch more than a few files. Also not all language ecosystems support static linking at all, e.g .NET
- dragonwriter 5y ago> Also not all language ecosystems support static linking at all, e.g .NET The “language ecosystem” of .NET supports static linking via .NET Native, doesn't it?
- mastax 5y ago.NET native is a dead end technology that only supported old UWP apps. There's the new single file builds but those just concatenate the dynamic libs together into one file. There's also the new .NET linker for trimmed builds, but that requires special annotations from many libs to work.
- xg15 5y agoNot a mac user, but one upside I can see is that this forces apps to at least declare which libraries they are using. If everything is statically linked, it might be hard to figure out where on the system a vulnerable library is being used at all.
- dralley 5y ago> Doesn't matter that everything is statically linked - if there's a vulnerability in libpng you can still easily update dependencies. Just uses more network / disk space. It's not that simple * Someone, somewhere - probably distro volunteers - have to manage this process of rebuilding dozens, hundreds, or thousands of packages, and knowing which packages need to be updated to begin with. The amount of work required from distros (again, mostly volunteers) would be an order of magnitude greater even if the process was automated. * Likewise, the amount of resources needed to rebuild all of those packages, and distribute them, would be orders of magnitude greater. * The amount of extra work (both for humans and computers) required would delay the rollout of patches. * And in the real world, a lot of users don't have limitless network bandwidth and disk space. * And auditing systems for security vulnerabilities would be geometrically more difficult. Now you need to track a recursive bill of materials for every package on the system. If there's a security bug in libc or something along those lines - which are fairly common- distros would need to rebuild practically every package in the OS. It's all well and good to talk about how it would be no big deal but I think if it was ever actually implemented no user would accept that trade-off.
- IshKebab 5y ago> Someone, somewhere - probably distro volunteers - have to manage this process of rebuilding dozens, hundreds, or thousands of packages, and knowing which packages need to be updated to begin with. Packages list their dependencies. You don't have to figure it out manually; that would be insane. Distros have automated build farms for all this stuff.
- dralley 5y agoAs I said, even with automation, there's a surprising amount of manual effort required.