5 ms·
This seems interesting even regardless of go. Is it realistic to create an executable which would work on very different kinds of Linux distros? e.g. 32-bit an
by einpoklum 9mo ago
This seems interesting even regardless of go. Is it realistic to create an executable which would work on very different kinds of Linux distros? e.g. 32-bit and 64-bit? Or maybe some general framework/library for building an arbitrary program at least for "any libc"?
- deleted 9mo ago[deleted]
- quesomaster9000 9mo agoCosmopolitan goes one further: [binaries] that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS on AMD64 and ARM64 https://justine.lol/cosmopolitan/ https://justine.lol/cosmopolitan/
- oguz-ismail2 9mo ago>Linux if you configure binfmt_misc >Windows if you disable Windows Defender >OpenBSD only older versions
- account42 9mo agoYeah while APE is a technically impressive trick, these issues far outweigh the minor convenience of having a single binary. For most cases, a single Windows exe that targets the oldest version you want to support plus a single Glibc binary that dynamically links against the oldest version you want to support and so on is still the best option.
- yjftsjthsd-h 9mo ago>> Linux > if you configure binfmt_misc I don't think that's a requirement, it'll just fall back to the shell script bootstrap without it.
- oguz-ismail2 9mo agoOn some distros, yes. On others it'll fire up Wine for whatever reason
- yjftsjthsd-h 9mo agoOkay, yes, if you configure binfmt_misc for WINE and not APE then PE-compatible binaries will get run with WINE and not APE. That feels unfair.
- oguz-ismail2 9mo ago>if you configure binfmt_misc for WINE It came preconfigured on Ubuntu 20.04 and 22.04, don't know about newer versions.
- dontdoxxme 9mo agoClearly a joke if it uses the .lol tld.
- account42 9mo agoIt's his personal website lol.
- hyperbolablabla 9mo agoJustine identifies as a woman.
- hofrogs 9mo ago"identifies as" is an unnecessarily dismissive choice of words. She is a woman.
- hyperbolablabla 9mo agoMy statement was a fact, and in my opinion not politically loaded, yet respectful to Justine. I chose my words carefully.
- sambuccid 9mo agoAppimage exists that packs linux applications into a single executable file that you just download and open. It works on most linux distros
- greyw 9mo agoI vaguely remember that Appimage-based programs would fail for me because of fuse and glibc symbol version incompatibilties. Gave up them afterwards. If I need to tweak dependencies might as well deal with the packet manager of my distro.
- iberator 9mo agoYup. Just compile it as static executable. Static binaries are very undervalued imo.
- flohofwoe 9mo agoThe "just" is doing a lot of heavylifting here (as detailed in the article), especially for anything that's not a trivial cmdline tool.
- qznc 9mo agoAck. I went down that rabbit hole to "just" build a static Python: https://beza1e1.tuxen.de/python_bazel.html https://beza1e1.tuxen.de/python_bazel.html
- Xraider72 9mo agoIn my experience it seems to be an issue caused by optimizations in legacy code that relied on dlopen to implement a plugin system, or help with startup, since you could lazy load said plugins on demand and start faster. If you forego the requirement of a runtime plugin system, is there anything realistically preventing greenfield projects from just being fully statically linked, assuming their dependencies dont rely on dlopen ?
- flohofwoe 9mo agoIt becomes tricky when you need to use system DLLs like X11 or GL/Vulkan (so you need to use the 'hacks' described in the article to work around that) - the problem is that those system DLLs then bring a dynamically linked glibc into the process, so suddenly you have two C stdlibs running side by side and the question is whether this works just fine or causes subtle breakage under the hood (e.g. the reason why MUSL doesn't implement dlopen). E.g. in my experience: command line tools are fine to link statically with MUSL, but as soon as you need a window and 3D rendering it's not worth the hassle.
- account42 9mo ago
- deleted 9mo ago[deleted]