4 ms·
> I guess I just don’t see the use case where this is compelling. If I write a handy Unix utility in C, I’ll just keep the source code around, and compile it as
by tgamblin 5y ago
> I guess I just don’t see the use case where this is compelling. If I write a handy Unix utility in C, I’ll just keep the source code around, and compile it as needed.
Isn't this exactly why you don't see the use case? You're willing to compile.
As someone working on a cross-platform, cross-language packaging tool (https://github.com/spack/spack https://github.com/spack/spack), it's very appealing to not have to build for every OS and Linux distro. Currently we build binaries per-OS/per-distro. This would eliminate a couple dimensions from our combinatorial builds.
We still care a lot about non-x86_64 architectures, so that's still an issue, but the work here is great for distributors of binaries. It seems like it has the potential to replace more cumbersome techniques like manylinux (https://github.com/pypa/manylinux https://github.com/pypa/manylinux).
- iainmerrick 5y agoCurrently we build binaries per-OS/per-distro. What varies between Linux distros, for your purposes? Different libc? I would naively assume it’s all just ELF so it shouldn’t be that big a deal to make a portable Linux binary. That seems separate from swizzling ELF/Mach-O/PE, specializing the binary on first run(!), etc, which is all super cool but something I’d be wary of relying on as a solid platform. Maybe I’m being too cautious, though! Reading the Cosmopolitan docs, it has some really clever optimizations, and I think I’d be more excited about simply a small and fast libc over the flashier APE parts.
- tgamblin 5y agoSee https://www.python.org/dev/peps/pep-0513/#key-causes-of-inter-linux-binary-incompatibility https://www.python.org/dev/peps/pep-0513/#key-causes-of-inte.... Software built with a newer glibc is not compatible with software built with an older glibc. You can't just build an EFL binary on an arbitrary distro. Moreover, and probably more notably for cosmopolitan, binaries built with glibc aren't compatible with BSD libc or musl. IIUC, cosmopolitan works across the BSDs and musl-based Linux distros, as well.
- jart 5y agoCosmopolitan is RHEL5 compatible so you can have the manylinux1 holy grail. I love you for posting here. You get it. It's all about reducing the dimensionality of your support vector. No one wants combinatorial explosions of toolchain triplets leading to broken builds and broken hearts.
- smasher164 5y agoWould you not get the same effect by statically linking to MUSL? I could see some problems with NSS, but there are workarounds there as well with nsss.