5 ms·
> Might as well ship a pre-linked binary that just does system calls. I actually think that’s exactly what we should do. Containers are an over-engineered solu
by Wowfunhappy 6y ago
> Might as well ship a pre-linked binary that just does system calls.
I actually think that’s exactly what we should do. Containers are an over-engineered solution for a problem that never needed to exist.
Dynamic linking doesn’t work unless you can live inside a distro maintainer’s special bubble for all your software. If you can exist in that bubble, great—I really like Debian for certain use-cases—but if you can't, the benefits of dynamic linking everything are clearly outweighed by the drawbacks.
- rkagerer 6y agoI agree. Are there any major disadvantages to that, aside from size and having to wait for each application to update its own dependancies?
- nycticorax 6y agoThe 'horror story' people always mention, which is a special case of "having to wait for each application to update its own dependencies", is that if there's a security vulnerability in a much-used library, you have to wait for each application maintainer to update their application, rather than simply having the distribution maintainer update the shared library. I'm not sure I agree that this would be worse than the current situation...
- MiroF 6y agoAre there any major disadvantages to a nuclear winter, besides that everyone would die and the environment would be destroyed?
- nycticorax 6y agoI just honestly don't understand this. On Windows and Mac (the OSes that 99% of the planet uses on the desktop), this is exactly how things work. The OS provides a set of APIs. If an application author needs a library that isn't in the OS, they have to ship it themselves. If a vulnerability in that library comes to light, they have to fix it and ship an updated version of your application. If it's a commonly used library, a lot of application authors are going to have to ship updates. Why couldn't this work for a Linux-based OS? Honest question.
- mixmastamyk 6y agoThat way leads to high numbers of boxes with vulnerabilities, which may be "fine" for non-technical folks. That's not the audience linux serves however.
- nycticorax 6y agoI don't think it's at all clear that it would lead to high numbers of boxes with vulnerabilities. Is it clear that a Mac is more vulnerable than a desktop Linux box, if you control for for the technical sophistication of the person maintaining it? I don't think that's at all clear.
- mixmastamyk 6y agoWhile it's not guaranteed they'll be installed, the vast majority of linux desktops get security updates, including for all normally installed applications. That's a pretty big advantage over a manual update strategy.
- stryan 6y agoI think the point is it "could" work on Linux, but a significant portion of devs consider that to be be a bad method of solving the problem.
- saalweachter 6y agoIt does seem like there could be a, well, canonical set of common libraries of specified version-ranges for a particular version of a particular distribution which are dynamically linked and with updates pushed by the distro maintainer, and if the application developer needed something else it would be statically linked.
- zajio1am 6y agoOn Windows and Mac, there is Microsoft / Apple who decides what is set of OS APIs, and everything outside is external library. In Linux, there is no such authority and therefore no sharp line separating 'core OS' and 'external library'. It is just conglomerate of Linux kernel and independently developed tools and libraries (where each of them is more-or-less optional).
- marcthe12 6y agoNo plugins or switching implementations. This mainly affects stuff like opencl, opengl, vulkan, qt, Apache, PHP & PAM. A few this could be solved (esp PAM and GPU ones) by making the full thing work over IPC. Already opengl is a pain to work in generic containers.
- danieldk 6y agoDynamic linking doesn’t work unless you can live inside a distro maintainer’s special bubble for all your software. If you can exist in that bubble, great—I really like Debian for certain use-cases—but if you can't, the benefits of dynamic linking everything are clearly outweighed by the drawbacks. Good luck patching that security vulnerability in all those static binaries without proper dependency tracking ;). Not that I am on a particular side of the fence, both have their downsides. To me the problem are package managers from the '90ies that use a single global namespace, only allows UID 0 to install packages, and do not really provide reusable components. Modern packaging systems like Nix and Guix allow users to install packages. Packages are non-conflicting, since they do not use a global namespace (so, you can have multiple versions or different build options). They provide a language and library that allows third-parties to define their own packages. Not to say that they are the final say in packaging, but there is clearly a lot of room for innovation. Snap and Flatpak are copying the packaging model of macOS, iOS, and Android. This is a perfectly legitimate approach (and IMO the execution of Flatpak is far better). But it is not for everyone -- e.g. if you prefer a more traditional Unix environment.
- yxhuvud 6y ago> without proper dependency tracking Well, there is nothing that says you can't have proper dependency tracking just because something is statically linked. The infrastructure isn't currently there [x], but it definitely is something that languages and language package managers could with each other and provide. [x] But can be built, now that more and more languages have access to language package managers with proper dependency tracking. One way would be to create a standard for how to query a binary for what it depends on. Then a computer could have a central database of the dependencies of static binaries that is installed.
- danieldk 6y agoWell, there is nothing that says you can't have proper dependency tracking just because something is statically linked. Didn't say so. It is just easier with dynamic linking, because you can see what libraries (and versions) a binary is linked against. But can be built, now that more and more languages have access to language package managers with proper dependency tracking. Actually, approaches such as Nix' buildRustCrate (where every transitive crate dependency is represented as as a Nix derivation) + declarative package management offer this today. But with curl | bash or traditional package managers, which are most widely used today, this is kind of dependency tracking hard/ad-hoc. But can be built, now that more and more languages have access to language package managers with proper dependency tracking. But then a static C library is used and nobody knows where it came from. Even if you look at the Rust ecosystem, which generally does things well when it comes to dependency handling, crates are all over the place when it comes to native libraries. I have seen everything from crates that use a system library (or something discoverable via pkg-config), via crates that have the library sources as a git submodule and build them as part of the build-script, to crates that download precompiled library from some shared Dropbox link. Another fun example from another language ecosystem. numpy uses OpenBLAS. They compile their binary wheels on CI. However, OpenBLAS itself is retrieved as a precompiled binary from another project [1]. However, the rabbit hole goes deeper. In case OpenBLAS is built for macOS, a precompiled disk image is retrieved from yet another repository [2]. This disk image is added to that repository, but comes from yet another place. This is all sort of the opposite the lessons to take from Reflections on Trusting Trust and the bootstrapping that the Guix folks try to do. Anyway, with the mindset that most developers have, we will never have proper dependency tracking. [1] https://github.com/MacPython/openblas-libs https://github.com/MacPython/openblas-libs [2] https://github.com/MacPython/gfortran-install/tree/d430fe6e38b6c5149c53f775a4437964e2f7b883 https://github.com/MacPython/gfortran-install/tree/d430fe6e3... [3] http://coudert.name/software/gfortran-4.9.0-Mavericks.dmg http://coudert.name/software/gfortran-4.9.0-Mavericks.dmg.
- tracker1 6y agoIf you have a BSD app that uses an LGPL library, congratulations, your app is now (L)GPL... let alone a differently licensed other library, and now your app can no longer be distributed/licensed.