4 ms·
This was a good idea when it was part of the Application Bundle spec (or even 68k/ppc fat Mac applications), and it's still a good idea. That's why I doubt it'
by AnIdiotOnTheNet 8y ago
This was a good idea when it was part of the Application Bundle spec (or even 68k/ppc fat Mac applications), and it's still a good idea.
That's why I doubt it'll get much traction[0]. ELFs still don't even have an accepted embedded icon standard FFS.
Anyways, imagine what the world would be like if fat binaries were the norm and your OS guaranteed support for a "virtual architecture" that you could also compile to, that had the same interface to the OS as any native application. Then you could publish a binary containing native versions for all existing architectures and be assured that it would also work for all future ports of the OS to other architectures without the need for recompilation.
You could basically do this today with Linux, actually. Just pick one of QEMU's many targets to standardize on (and of course also standardize on a base platform of libraries with a stable ABI) and use it with the dynamic syscall translation.
[0] Turns out I was right, as this is an abandoned project. I wish I wasn't able to predict such things via pure pessimism.
- bjpbakker 8y ago> ELFs still don't even have an accepted embedded icon standard FFS Also Apple does not embed icons in their binaries. Their app bundles are not binaries, they are a directory structure. The icon is just another file, just like the _actual_ executable(s). > you could publish a binary containing native versions for all existing architectures This sort of ignores the hardest part of shipping binaries; linked libraries. Dynamic linking everything is simply not always feasible. Not to mention libc. Also I don't really understand why anyone on Linux would want this. The fact that I can recompile all of the software I use, is a really important feature to me and not a distribution problem. I can see why Apple wanted this to simplify distribution via their Appstore, but IMO that's mostly to work-around their specific distribution problems. I don't see any of those problems on Linux. (edit: wording, see below)
- jhbadger 8y agoThe current Apple application structure (the .app directories that originated in NextStep) isn't what the previous poster was referring to -- the binaries in traditional (pre-OSX) MacOS weren't like this but actual files that could run on either Motorola 68000-series chips or (in the 1990s) IBM's Power PC chips.
- 0x8BADF00D 8y agoApple does not use ELF for their binaries, MacOS ld will produce mach-o format.
- bjpbakker 8y agoRight, I worded that quite strange. Thanks for the feedback!
- pedrocr 8y ago>Also I don't really understand why anyone on Linux would want this. The fact that I can recompile all of the software I use, is a really important feature to me and not a distribution problem. I can see why Apple wanted this to simplify distribution via their Appstore, but IMO that's mostly to work-around their specific distribution problems. I don't see any of those problems on Linux. Couldn't agree more and yet Snap and Flatpack exist. It's probably so that third-parties can package closed-source stuff for all distros easily. These days one of the first things I do on a fresh Ubuntu install is get rid of snapd because they use it for things where it's useless (e.g., gnome-calculator). If someday they stop packaging the apps directly I'll probably finally go back to Debian.
- AnIdiotOnTheNet 8y agoIt isn't just for closed source stuff. Some developers actually care about the user experience and don't want to have to tell people "sorry, you have to wait until someone comes along and decides to package that for your distro, or compile it from source!".
- rjzzleep 8y ago> I can see why Apple wanted this to simplify distribution via their Appstore, but IMO that's mostly to work-around their specific distribution problems. I don't see any of those problems on Linux. This predates the Appstore by a huge margin. They added universal binaries to make the transition between 32bit and 64bit seamless. And it worked really well actually. Soon after tools popped up to reduce the binary sizes by stripping out the 64 or 32 bit part of it. The other part that's a bit special is that apple has these special variables @executable_path, @loader_path, @rpath in linker options with an install_name_tool that allowed(s?) you to rewrite the system path to an application specific one, which allowed you to bundle the necessary libraries with a linker path that's relative to the executable or app resource path. I think this has gotten better recently, but pretty much everyone struggled with this at the beginning. In linux it was basically outsourced to system packaging. So the developers outsourced it to the distro, whereas in Mac environment because of the lack of said packaging, the burden was placed on whoever is distributing software. Making people think twice about what they link.
- classichasclass 8y ago> They added universal binaries to make the transition between 32bit and 64bit seamless. Not just 32 vs 64-bit, but entire architectures. Mach-O universal binaries originated at NeXT, where at one time a binary could (and many did) run on SPARC, PA-RISC, x86 and 68K. On http://www.nextcomputers.org/NeXTfiles/Software http://www.nextcomputers.org/NeXTfiles/Software you can see this in their filename convention: the "NIHS" tag tells you which architectures (NeXT 68K, Intel, HP, SPARC). The binary format carried over into OS X, where it was secretly leveraged as part of Marklar for many years. In fact, Universal even on OS X really meant PowerPC and i386 at the beginning of the Intel age. It eventually morphed into the present meaning. I even maintained a fat binary with ppc750, ppc7400 (that is, non-AltiVec and AltiVec) and i386 versions.
- Crinus 8y ago> Their app bundles are not binaries, they are a directory structure. Yes, but on Linux no file manager understands directories as bundles (except perhaps GNUstep's GWorkspace). > Also I don't really understand why anyone on Linux would want this. Because they want to distribute binaries themselves or via a 3rd party distribution site (ie. not part of a linux distribution) without having the user compile the code themselves (either out of convenience or because they do not want or cannot distribute the source code). Having said that this is mainly useful in case you want to distribute a single binary that supports multiple architectures. Almost everything is distributed in archives (even self-extracting archives can be shell scripts - although annoyingly enough, software like GNOME's file manager make this harder) so you can use a shell script to launch the proper binary without kernel support.
- AnIdiotOnTheNet 8y ago> Yes, but on Linux no file manager understands directories as bundles (except perhaps GNUstep's GWorkspace). And the ROX Filer, which sadly hasn't been an active project for many years.
- Crinus 8y agoWhich wouldn't really be much of a problem for its users if it wasn't gtk breaking backwards compatibility between 2 and 3 (but that is another painful topic).
- AnIdiotOnTheNet 8y ago> Also Apple does not embed icons in their binaries. Their app bundles are not binaries, they are a directory structure. The icon is just another file, just like the _actual_ executable(s). Pedantry. You could mount an ELF as a filesystem if you had any desire to. Structures are just structures. > This sort of ignores the hardest part of shipping binaries; linked libraries. Time has shown that dynamic linking all the things is a terrible idea on many fronts anyway. Why do you think there's all this Docker around and compiling statically is on an upward trend? The solution is simple: DLLs for base platform stuff that provides interfaces to the OS and common stuff, statically compile everything else. Then the OS just ships a "virtual arch" version of the platform DLLs in addition to native on every arch. The reason the Linux Community don't want this sort of thing is that, frankly, they just hate stability. I mean, the Kernel is stable (driver ABI excepted), but basically nothing outside of that is.
- admax88q 8y ago> The reason the Linux Community don't want this sort of thing is that, frankly, they just hate stability. I'd argue that the reason the Linux Community doesn't want this is that it introduces maintenance burdens on the community that only really serves to support corporations shipping proprietary software. I really don't care about making proprietary software easier on linux, but I do care about linux having to carry the baggage of backwards compatability like Windows has had to handle just so that Google can deliver Chrome as a binary more reliably.
- deleted 8y ago[deleted]
- bjpbakker 8y ago> reason the Linux Community don't want this sort of thing is that, frankly, they just hate stability And yet I fearlessly upgrade my Linux system at any time. With OSX you first have to check if the software you use is at all compatible, especially if you use proprietary software..
- 8y ago
- admax88q 8y ago> The fact that I can recompile all of the software I use, is a really important feature to me and not a distribution problem. I've always found this to be an interesting observation about free software. So many complicated things like FatELF, dll-hell are just straight up _not_ and issue when you're working in a source code world where you just compile the software for the machine you're using it on. Most of the efforts around FatELF, FlatPak, etc seem to be to be driven by the desires of corporations who want to ship proprietary software on linux, and as such need better standardization at the binary level rather than the software level. It's a win for Free Software in my mind, that we shouldn't typically have to worry about this added complexity. Just ship source code, and distributions can ship binaries compiled for each specific configuration that they choose to support.
- AnIdiotOnTheNet 8y ago> So many complicated things like FatELF, dll-hell are just straight up _not_ and issue when you're working in a source code world where you just compile the software for the machine you're using it on. Said like someone who has never actually had to compile someone else's software. Why do you think so many projects these days have started shipping Docker containers of their build environment? Why are there things like autoconf?
- Crinus 8y agoNote that source code access and FOSS are orthogonal. AFAIK in older Unix systems software you'd buy would often be in source code form. In fact at the past severa lLinux distributions had a lot of such software. As an example Slackware distributes a shareware image viewer/manipulator called xv (which was very popular once upon a time): http://www.trilon.com/xv/ http://www.trilon.com/xv/ It is the license that makes something FOSS, not being able to compile/modify the source code.
- CJefferson 8y agoWell, except I work on a large open source project and we have to blacklist random versions of gmp and gcc out code doesn't work with due to bugs. And, we can't reasonably test with every version of the compiler and libraries, so we just have to wait for bug reports, then try to find out what's wrong. Whereas I pick one set of all the tools, make a docker image, and then run 60 cpu days of tests. No Linux distro is going to do that much testing.
- mrpippy 8y ago> Also Apple does not embed icons in their binaries. Their app bundles are not binaries, they are a directory structure. The icon is just another file, just like the _actual_ executable(s) You actually can put an icon into the resource fork of a Mach-O binary, and it’ll show up in the Finder and Dock (assuming the executable turns itself into a GUI app). It’s an uncommon thing to do, but Qemu uses it, and unfortunately I don’t think there’s another way to embed an icon in a bare Mach-O binary
- pedrocr 8y ago>Then you could publish a binary containing native versions for all existing architectures and be assured that it would also work for all future ports of the OS to other architectures without the need for recompilation. This may be a closed vs open-source applications split which would then explain the Windows/OSX vs Linux split that seems to happen. On Windows/OSX the property that you can run the same build forever because everything is backwards compatible is appreciated. On Linux most people are downloading a distro that includes most or all the software they will be running. So you don't care if the old app build still works in the new OS because there's not even that distinction between what are apps and what is the OS. Once you're in that frame of reference having an icon standard in ELF doesn't add anything. What I really care about is that the whole Debian archive continues to be available and maintained so stuff doesn't bitrot. Other people have other tastes of course (hence snap/flatpack) but apparently not enough have wanted and worked on it for it to happen.
- AnIdiotOnTheNet 8y ago> On Windows/OSX the property that you can run the same build forever because everything is backwards compatible is appreciated. On Linux most people are downloading a distro that includes most or all the software they will be running. One of these two methodologies requires an army of middlemen compiling and packaging applications for people. And if a middleman didn't compile it, well, fuck you I guess. It's a nightmare for users who want to run things no one has packaged yet and its a nightmare for developers who just want to ship their product to a user. It's the reason Flatpak, Snap, and AppImage exist. > Other people have other tastes of course (hence snap/flatpack) but apparently not enough have wanted and worked on it for it to happen. Not enough people in the Linux Desktop Community, you mean. Which might be why that community is so tiny.
- pedrocr 8y agoI could argue the other side, as there's definitely value in a well assembled distro. But I won't because you're essentially complaining about what other people do with their own time. If you don't like it don't use it. Complaining about it with insults is a crappy thing to do and one of the reasons open-source maintainers burn out.
- Hello71 8y agoisn't that just Java
- AnIdiotOnTheNet 8y agoNo, Java is a language and virtual machine coupled together that abstracts away the entire underlying platform. The point of the "virtual architecture" I describe is to keep the OS un-abstracted and only abstract away the hardware architecture underneath it.
- classichasclass 8y ago> your OS guaranteed support for a "virtual architecture" IBM i (the OS formerly known as OS/400) and TIMI say hi. Under the hood it gets transparently recompiled to the target architecture. "Customers were able to save programs off their CISC AS/400s, restore them on their new RISC AS/400s, and the programs would run. Not only did they run, but they were fully 64-bit programs." https://en.wikipedia.org/wiki/IBM_System_i#Instruction_set https://en.wikipedia.org/wiki/IBM_System_i#Instruction_set https://koeln.ccc.de/ablage/as400/as400concepts.xml https://koeln.ccc.de/ablage/as400/as400concepts.xml