Ryan Gordon Wants To Bring Universal Binaries To Linux
wisesifu writes "One of the interesting features of Mac OS X is its 'universal binaries' feature that allows a single binary file to run natively on both PowerPC and Intel x86 platforms. While this comes at a cost of a larger binary file, it's convenient on the end-user and on software vendors for distributing their applications. While Linux has lacked such support for fat binaries, Ryan Gordon has decided this should be changed."
after the diminse of NeXTStep!
(c)Innovation!!(tm)(R)
Could this technology also help binaries to link against multiple versions of standard libraries (glibc, libstdc++)?
Ask PPC owners that want to get the latest version of OS X.
If you have access to the source, you can always compile a version for your platform. The 'fat binary' principle is only useful for non-free applications, where the end-user can't compile the application himself and has to use the binary provided by the vendor.
Since most apps for Linux are free and the source is available, this feature isn't as useful as it is on the Mac. Not that it shouldn't be created, but it makes sense to me why it took a while before someone started developing this for Linux.
Pretty good is actually pretty bad.
Some people may claim that Linux may have some shortcomings but certainly the way that distributions handle support for multiple platforms and also the availability of binaries targeted at a certain platform surely isn't one of them. Linux already runs on a long list of platforms and software distributions already handle themselves quite nicely by building platform-specific packages, which also include all sorts of platform-specific binaries the applications will ever need. So, besides the empty "but Apple has them" rational, exactly what drives the need for universal binaries on linux?
Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
We don't need the universal binary, so much as we need the "1-file install" idea that MacOS has. This would greatly simplify installing a standalone application.
For those of you who don't know, if you download an app for MacOSX (say, Firefox) you are presented with one icon to drag into your "Applications" folder. This is really a payload, a "Firefox.app" directory that contains the program and its [static?] libraries. But to the user, you have dragged a single "file" or "app" into your "Applications" folder - thus, installing it.
It's dead simple. We need something like this in Linux.
Sofwtare vendors? This only makes life easier for _closed source_ software makers. For everyone else this is a solution looking for a problem as package management and repositories don't really have a problem with different arches and versions.
I'm not saying this is useless (people do want to run closed source software), but the kernel, glibc and other patches better be good and non-invasive if this guy wants them to land...
The binary is compiled twice. The way OS X packages its applications is the the Application that Icon that you click on isn't a File but a Folder with a predefined structure. So there there is a PPC and an intel port of the executable.
Linux doesn't handle applications that way. That means you will need to alter the kernel and create new files that will no longer be upward compatible with the old version or just do something really simple, however the simple solution is just as tricky as there are no starnardized installers for linux.
The file system /usr/bin /usr/local/bin /usr/lib /usr/bin/x86 /usr/bin/Amd64 /usr/bin/Sparc
etc...
will have sub directories for each platform there is a compiled binary for.
eg
etc...
Now when the installer installs the software it puts the platform particular binary there is a script installed in the root directory that checks the platform and goes to its platforms version.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
Most package manager can automatically create a binary package out of a source package. In many cases this resolves even problems with otherwise incompatible libraries. So for whom is such a fat binary advantageous? I'd assume mostly for closed source vendors. I have nothing against closed source in general, but if I pay for a software I expect at least a minimum of support. Such a fat binary does not look too userfriendly for me. Even if I can strip it down to my architecture. I suppose it does not solve the problems of incompatible libraries. I will follow the responses to this article, maybe I overlook someting and I will be convinced otherwise, but at the moment I would say: Superfluous.
Apple is still using it for x86/x86_64 fat binaries in Snow Leopard.
It does not allow a "single binary file to run natively" on several platforms. All Universal Binary is - is a bunch of precompiled binaries that run on their particular platform in a folder with .app extension. Very convenient for an end user, but takes a lot of room on hard disk.
Read the fine website:
you know, just trick the good ol' .DEB package format to include several archs, then let to dpkg decide wich binaries to extract.
is not that in linux the binaries are one big blob with binaries, libs, images, videos, heplfiles, etc. all ditributed in as a single "file" which is actualy a directory with metadata that the finder hides as being a "program file".
being able to copy a binary ELF from one box to another doesn't guarantee it'll work, specially if it's GUI apps that may require other support files, so fat binaries in linux would be simply a useless gimmick. either distribute fat .DEBs, or just do the Right Thing(tm): distribute the source.
What ? Me, worry ?
To a first approximation, the size of the binary will increase in proportion to the number of architectures supported.
This is something you might decide to ignore if you are only supporting two architectures. Debian Lenny supports twelve architectures, and I've lost count of how many the Linux kernel itself has been ported to. I really don't think this idea makes sense.
(Besides, what's wrong with simply shipping two or more binaries in the same package or tarball?)
This isn't a particularly bad idea and community-driven distros (or maybe the community of community-driven distros) like Ubuntu would probably benefit from it quite significantly. You can even strip unnecessary binary portions out of most programs (at least with the mach-o binary format), although it would really only effect disk usage. With the disk capacities today, it's really negligible disk-usage savings anyway.
In terms of the Linux kernel, this would mean a major overhaul for a large portion of the kernel and I can't see it being adopted very widely outside of the Desktop market.
I would very much like to know does this also have support for building fat binaries for different operating systems in the future if the support is added? I would like to build libraries that work on Linux/*BSD/Solaris/OSX/Windows and distribute the binaries even though they are open source. I would also like to load them automatically from a C#/Mono application with P/Invoke.
Up to now having Windows and OSX libraries is easy, because the naming conventions are different and I can include a windows binary with .dll extension and OSX binary with .dylib extension and Mono even handles everything automatically just fine. Problems come with other unices, because they all use ELF and all use .so extension. I have to resort to ugly hacks of having a version of the library with a different name for each platform and add a Mono .config file to load the correct version depending on the platform.
What I would like to have is to have a single FatELF .so library that would include 32-bit and 64-bit versions for all mentioned platforms, with the correct one loaded by the operating system automatically. The .dylib OSX version I use is already made this way and it's not a big deal to distribute 32-bit and 64-bit windows versions as separate files if that ever is necessary, for now 32-bit version should work well enough in windows. However all the other platforms result in millions of version each in a separate file, that just makes me feel dirty.
I know the model I'm suggesting would result in really big files, but it would be really easy to even automatically strip the useless platforms of it if necessary. It would still make the binary distribution a lot easier.
How are they a pain in the ass? How is it a pain in the ass to contain all required files of an application inside a single directory, instead of spreading the files all across the system? ("installing" the application, as people say in the windows world, and to quite some degree in the linux world, too)
The app bundle system is nothing short of genial. There is no "metadata crap associated with files, locations, etc." in it. You CAN add a lot of stuff that fills a function, but you don't have to if you don't want to. You're just misinformed.
However, this article has nothing to do with OS X' App Bundle system, but about universal executables - executables containing code for multiple architectures. App Bundles and Universal Binaries are two different things. They are not tied to eachother in any way at all, like you seem to think. OS X enjoyed the bliss of self-contained app bundles long before Apple extended their executable file format to accomodate multiple architectures, and you don't need to put an executable inside an app bundle to run it.
I'm already amazed we have a universal x86 binary. With the architectural differences between an Atom and a Core7 or 9... I dare not think of all the inefficiencies this creates.
Wouldn't it be better to shoot for a Universal Source, with the install step integrating a compile+link step ? I know Gentoo does this, but Gentoo is marginal within the marginality that is Linux, on the desktop.
I'm amazed you can do real-time x86 emulation on non-x86 CPUs, but still can"t have a Universal Source.
The Cloud - because you don't care if your apps and data are up in the air.
It seems to me this problem of "a single binary which can run on multiple architectures" could be extended to "a single binary which can run on multiple platforms." For BOTH of these goals, rolling all the possible binaries into one larger executable seems to be a bit of a messy, sloppy approach.
On the other hand, what if we compiled programs to some kind of intermediate language, and ran it on a code interpreter or virtual machine? The virtual machine could have a version for every platform and architecture. We could call it something random, like... Java. Or .NET.
Oh wait.
Hmmm, yet another unnecessary, incompatible, redundant archive format requiring yet more tools and libraries to deal with.
What's wrong with putting whatever flavor of binary you want in a tar.gz archive, zip archive or folder and have the system smart enough to pick the right one (using the existing, standard file id's and tools) when you execute the archive or folder? Yes, I realize the system needs to map pages while executing but for archives that is trivially dealt with by extracting before executing.
The amount of fuzzy, shallow, magical thinking that happens with software is just amazing. Please, if you insist on recreating the wheel at least have the good sense to think about what you are doing and stop assuming that giving something a new name necessitates creating an entire new software infrastructure that will unnecessarily create complexity and problems for large numbers of people.
---
For the copyright bargain to be valid all DRM'ed works should lose copyright.
As somebody pointed out, this does not scale. In the end, if somebody is really wanting multiple systems, then they can simple create a dvd with multiple types on it. There is another solution though. Back in the late 80's/early 90's, the unix world was concerned about how a companies could create binaries for multiple systems. The best solution, though not implemented, was to compile to a universal binary, and then trans-compile this to a different arch. In light of all the work that has taken place on Java and now parrot, it may make far more sense to do that. With that approach, it would be possible to have various compilers go to a single arch, and then create a new back-end on compilers to take it to various archs.
I prefer the "u" in honour as it seems to be missing these days.
It never really flew.
If someone wants to do this then something like Java would be good enough for many types of software. There will always be some things for which a binary tied to the specific target is all that would work; I think that it would be better to adopt something that works for most software rather than trying to achieve 100%.
People have been asking for a universal binary or some sort of Universal Package Manager (UPM, that could work) for linux for ages. I think the main reason why there isn't one yet is the FLOSS nature of Linux. When the source code is open, there is no need for one single binary, it's up to the distro (or user) to make it into an fitting binary package. For that reason I think it wont change much if there was one single Binary. Also I've always thought that more applications should just use .bin files, compatible for all.
Princess Leia: The more you tighten your grip, Tarkin, the more star systems will slip through your fingers
Now the 5 Linux PPC users in the world can finally be happy.
My initial thought was that this was insane -- Linux software should only be distributed as source and compiled on the target. Then I actually read the material and realized we were talking about distribution binary Linux installers. Since those pretty much have to be compiled before loading on the target, a multi-platform binary seems to make perfect sense in this context.
The entire reason dynamic linking was invented is to make this sort of rubbish unnecessary. It's thanks to this that, on sane operating systems lacking DLL hell, the same library can be installed once and then used by hundreds of applications that themselves weigh under 300k --- we only have to download the application, because we already installed its dependencies*, and we certainly don't have to download the application and its dependencies compiled for eight architectures at once. Does this person not realise how much space/bandwidth/memory that would take? My Debian installation's root partition is only 6GB, which includes every application I use. Why would anyone want to make the situation more like Windows/OSX? Ah, yes, to make it slightly easier for lazy proprietary developers. Sorry, but we don't actually need lazy proprietary developers.
*Dependencies are automatically resolved and installed in the event they've not previously been installed.
We can already do this. Just run a source based distro and then you can easily port the code to any target you want. It's not a hard job or even difficult. The best case is Gentoo just change the chost and cflags to accept a PPC input and get a cross chain running with gcc etc.... Either way the problem is not hard to over come and it wouldn't be hard to fix.
Not to mention the greater ease for potential malware to work. Right now Linux is an extremely unfriendly and hostile environment for such malware. Why do we need to change that?
-- This
There may be more which should be included...
So... x86-64, x86, PowerPC, SPARC, MIPS, ARM, z10, m88k
How big are *your* binaries?
Deleted
from what I gather he's not talking about system lib but application-specific trees. So for the majority of us using 64bit systems in a mixed world, only from those developers who chose to use FatELF would we derive any benefit. Even then the vast majority of dependant libs would still be required. And the compat libs. Skype anyone?
Over time it might prove beneficial. But over time the status quo will become 64bit. To me its a wash. Especially since I've experienced some times, admittedly fairly rare in the major repositories, but nonetheless times when a misbehaving application is pulled or broken in x86_64 but not i386 and I've been able to temporarily run the 32bit version. Since FatELF would, apparently, take that power away from me and defer it to systems-magic, well, as the shark's say; "for that reason, I'm out".
This is cool and everything, but I'd rather Ryan spent the time on whatever it takes to get Linux Unreal 3 published.
Now why would I want to do anything that fucktarded, when I can just use the source?
And if I needed cross-platform that badly, I can always ship ONE java app with ONE instance of data.
The '90s called, they want their obsolete fat and universal binaries back.
What's the big benefit again? Instead of the package manager making the decision once at install time and all of the un-needed parts for platforms I'm not using stay on the install disk, now the decision is made each time I run the app and I get to clog my HD (or worse, my SSD) with all of them?
Now I can have the world's LARGEST hello world program with support for alpha, arm, avr32, blackfin, cris, frv, h8300, ia64, m32r, m68k, m68knommu, mips, parisc, powerpc, ppc, s390, sh, sh64, sparc, sparc64, um, v850, x86, and xtensa?
I'm guessing if this catches on, the most commonly used program will be 'diet' the program that slims down fat binaries by removing the architectures you will never encounter in a zillion years. (Just what are the odds that I will one day replace my workstation with an s390?)
If they want to do this, they should do it right and implement something like TIMI. Done well, it would mean that an app could run on a platform that didn't even exist when it was shipped (it worked for IBM).
Beyond the technical advantages of TIMI, it will provide us years of South Park references.
It must sound as snazzy as Gratis. I vote for La Résistance as it will transform the image of us freedom fighters into that of cunning sophisticated individuals. The word is probably closer to the ideology of many of it's supporters, too.
*Runs away*
Once you start despising the jerks, you become one.
We could do something like the old p-Code, where we compile to a virtual architecture, and then translate it to the machine during installation.
I assume you don't mean that p-Code itself was translated during installation (AFAIK it was translated on-the-fly during execution), just your modern equivalent.
I was sad to see we didn't have the compute power back then to make it fly. I bet we do now.
Possibly, but it would still likely give poorer performance. The benefits would have to outweigh that.
Also, in some respects, the x86 *is* a virtual machine that people are writing code for, albeit transparently for those who treat the CPU as a black box.
Reason being that all x86-compatible CPUs from the Pentium II/Pro onwards have been based around non-x86 cores (*). x86 code is translated on-the-fly by an outer layer before execution.
They probably had a good reason in that case. I assume that the x86 design- even by that stage- had acquired so much baggage that it was making it very difficult to proceed further with that architecture, and that even with the translation overheads, the non-x86 core made more sense in the long run.
In a perfect world, it would have been better still to be able to ditch x86 altogether, but for obvious reasons that wasn't going to happen here.
(*) I've heard them described as RISC-like, though someone else mentioned on Slashdot that in truth they weren't really *that* RISCy.
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
Why not write in Java or one of the Mono-supported languages and distribute something that will be dynamically compiled on the destination machine. It is fast, convenient and you don't have to have 10 OSs to target them....
m
How about we have a single chunk of data and executable code/libraries needed to run across any OS or any architecture? If you're going to call it universal you'd best damn-well make it universal! Take the idea of what OSX does for their apps and apply it to every OS possible? Even if the stuff has to be compressed to fit onto a single DVD you can have that decompress itself but still stay a single file (at least on the user end, the OS would still be able to read each file individually inside the archive.) For example, most games only need a different executable, the data (textures, maps, etc) stays the same.
You could even make it able to run on different distributions of the same kernel! No more stupid dependencies, no more RPM hell, and best of all there'd be no reason for it to just wipe out other installed software, such a beta versions of libraries and what not.
And then you could lock it down by making that file read-only. If there's an exploit, it won't destroy your software as it can't modify it, unless that exploit somehow allows write access.
Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
and now they don't have to pay a 'freeman' for his work either.
See the problem with your argument? No, the only thing a 'freeman' was free to do was leave.
In OS X the Developer Tools that would be required are optional. (On Linux too, these days.)
Requiring apps to be built from source just wouldn't make sense for Apple's market.
you had me at #!
The underlying problem is that end users don't want to be bothered by having to know if they need the 64 bit version or the 32 bit version (or rarely some other platform).
We already have wildly successful packaging systems for linux that handle this class of problem rather well. So why not extend the packaging system to support multiple binaries in the same package? You'd certainly save on HD space. It also seems a bit cleaner.
AccountKiller
Linux doesn't need fat binaries because the package manager automatically installs the binaries that are appropriate for the machine.
OS X needs fat binaries because it doesn't have package management. I wish people would stop trying to bring OS X (mis)features over to Linux. If I wanted to use OS X, I'd already be using it.
It has been part of the Mac System since the Mac was released in 1984; the existence of a resource fork made this possible in "Classic" MacOS. (But I can't remember exactly how Lisa OS does it.)
you had me at #!
*sheesh* Just what we need. A way to distribute stale, broken, un-optimized binaries everywhere all at once.
Which OS does this happen on? Not Windows, Linux, OS X, *BSD ...
They ALL have DLL hell for closed source apps. If your solution is no closed source apps, then you live in a fantasy world.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
You have no idea what you are talking about as you obviously have never done any development on OSX. Every point you made is based on incorrect assumptions that you pulled out of your ass.
times when a misbehaving application is pulled or broken in x86_64 but not i386 and I've been able to temporarily run the 32bit version
And you can't build it from source because...?
And wasn't it called Java?
Are any of you guys old enough to remember CP/M running on the 8086? It was a solid, no-glitch way of running binaries from one OS to another. And Z80 code seemed as complex to most techs then, as protected-memory schemes do now.
But they *did* it, and did it well.
If we are *ever* going to actually have a 'universal binary' we need to make the hardware do the job: not software.
Case study: 1988, SCI Systems, Huntsville, Alabama.
Three software guys huddled over their 80186-based site-controller motherboard our company built. These guys were GODS, able to write compilers AND embedded control software, all interrupt-based, pre-emptive long before Linux. All three agreed it wasn't software, this *must* be something in the hardware. There'll be yelling and noise, but let's get a hardware tech here.
"Neil!" someone said. And this odd-looking, couldn't-be-nicer guy snagged an oscilloscope cart on his way over. He seemed to already know the question.
He clipped on the grounds, checked about 4-5 pins and dropped the probe. 'Software problem.' and walked out. I thought he had to be the most arrogant guy in the room, until I did the math:
He wrote the schematics. He laid out the parts, he did the prototype, he did the solder, and every other masks. He wouldn't have sent the device to production if the Chip Enable lines weren't working. Because of this, if they're trying to talk to the memory chips (using Intel's STUPID, 16-ways to describe-every-location scheme) then it was a software problem.
The point: hardware guys have more they can cross-check; they can't move on until one level of production checks. Based on that, future levels don't _tend_ to need a complete re-fit. You just can't get that in software: people don't work that way. Software is just too elusive. I've been saying this since 1978.
They were trying to work out a 'java' at that time, they're still trying today. But different 'runners' and different code, and we STILL AFTER ALL THESE YEARS HAVE NO REAL PROGRESS. If anything works at all in the customer's hands, it's a surprise.
Make all processors have unified code, or drop the project. There's SO much more we could be doing, please?
--- For a good time mail uce@ftc.gov
And in fact, for large classes of interesting applications, installer and installed size is overwhelmingly data, not code. Games are going to be 95%+ data (check out how small the actual app is sometimes; often less than 1% the size of the data files). Microsoft Office has far, far more space allocated to fonts, clip art, all those multilingual spelling dictionaries, and templates than the actual *.exe files.
And even the self-contained .exe files in the above examples will also include a ton of bitmapped images for the GUI and such. Sure, command-line apps are going to have a lot more code, but even they will have the help text, tables, and other stuff that could be stored once in a platform-independent internal data structure.
Having behavior driven largely by data, not good is a good thing, of course. Data is a whole lot easier to debug than code, and bugs in data are generally much less catastrophic assuming the code itself does good validation.
My video compression blog
Compiling your own is always the best, especially when you get gcc etc. updates but here is the reality: Compiling some apps takes insane amount of time. Unless you really know what you are doing or your distro has support for special configurations, it has no advantage at all too. You just end up with the same binary.
I guess guy proposes it for "user level", general end user distros.
One use case I can see for fat packages or FatELF (either one works) would be if we also had a smart boot loader that could take a single-architecture binary and run it through QEMU in conjunction with FatELF libraries on the system. If my ARM netbook ran Fedora, example, and installed FatELF libraries supporting both ARM and x86 (supposing cheap SSDs!) then if I really needed Adobe Reader for some reason which is only on x86, then I could download and install their Fedora x86 RPM and run it seamlessly.
This could also be done with plain fat packages too. A fat gtk-libs package, for example could dump files native to your architecture in /usr/lib or /usr/lib64 or both, while putting other architecture libraries in the Qemu system directory for that architecture.
Note that Qemu already allows this without fat libraries. But wouldn't expect a average netbook user to know how to download the rpm or tarball, extract everything and stick it somewhere, then populate the Qemu system directory with Fedora x86 libraries. The benefit of FatELF or fat packages here would be that the RPM would just install because it could see that the requisite FatELF libraries where installed or that the architecture-specific libs were installed in the Qemu system. This is all provided that RPM or DEB or whatever either knows about FatELF or implements fat packages.
So I decided to have a look at my netbook -- an Acer Aspire One, running the Acer Linpus Linux system. It's the 512MB memory with 120GB disk model; not the SSD dress.
[user@ariel ~]$ find /usr /sbin /bin /lib -type f -print0 | xargs -0 file | grep ELF | sed -e "s/:.*$//" >list
[user@ariel ~]$ wc list
12318 12318 455036 list
[user@ariel ~]$ ls -l `cat list` | awk -F " *" "{ sum += \$5 }; END { print sum }"
2090169634
For the "non-unix" types, this means -- traverse four directories (/usr /sbin /bin /lib) that contain all the binaries (well, I did forget /boot, but that's not very important for this discussion). We extract those files that mention ELF in the file-type, count them, and then sum their sizes.
Note that there are ~12,000 objects that would be expanded, taking up around 2GB of space. Which means that adding an alternate "fat" binary would roughly double this to 4GB. In other words, not very good for an SSD dress, but reasonable for a hard disk dress (my total data usage is 30GB on this netbook, so we would add 10% to the utilization).
On the other hand, this is storage resource that would not ever be reclaimed. There are other ways to achieve this result. For example -- simply provide multiple ELF objects in an archive, including a "bintester". Iterate each folder in the archive, test-running the bintester. If the bintester succeeds, use that. If none succeed, fail if its "closed object/source", or attempt to download and build the source. An example of this type of function is the VMware driver loader.
Or, use a neutral distribution -- JAVA, or Squeak, or the Microsoft CLR.
All of these provide similar results, without the need to modify the object loader. Which is something that I would really frown about -- After all, the loader is a very heavily used, very security sensitive component.
As to "fatness"; it turns out not to be as big an issue as I had originally feared (I did the measurement on the "worst-case" system I use, and started with the mind-set that it would matter a whole lot more than it turned out... my preconception was wrong).
Your mileage may, of course, vary.
PS. For full disclosure, you may note that I excluded /opt -- I have 3.9G of stuff there: OpenOffice.org3, Intel C 11.0, Adobe Reader, Microsoft MSVC 7, and some smaller stuff (tcl/tk dev, hua wei 220 support, and a virtual tape library . Since this may or may not impact a "standard" distribution, I decided to not include it (and, MSVC 7 is COFF format, used under WINE anyway).
Just another "Cubible(sic) Joe" 2 17 3061
Really? If using Linux lead to an XML binary in my memory, I'd want it out of there ASAP. Perhaps you meant on your disk ;)
Kind of like Java then.
You are proposing a "fat source" bundle that users can compile. Each Linux distro would need to have most compiler tools shipped as standard.
I still like this idea better than fat-binaries, since the user will get code tuned best to the CPU. Even differences between i386 and x86_64 merit some compiler flags and optimizations.
Also, the user can delete a fat-source bundle after the program has compiled. This negates the wasted disk space issue for fat-binaries.
The way you should install non-free applications on Linux is to add the company's repository to your software sources. That way, you get automatic selection of the right binary and automatic updates. Some companies already support that.
Long term, I expect that SuSE, Ubuntu/Canonical, and RedHat will be offering app stores that make selling and buying commercial Linux apps as easy as iPhone apps.
Fat binaries are a throwback to the past; they aren't needed in the era of app stores and package management.
Isn't this kind of thing what VMs are for? The kernel could have a VM, and run all binary executables that are compiled for the VM inside the VM. That way you can get real compile-once-run-everywhere, and with no bloating of the size of executables. It should then also be possible to port the VM to other OSs.
YUM does a GUI one-step install well enough in Fedora/CentOS Linux. I can find a browser link to a *.rpm file and click it. Then, a YUM-based window opens to download the RPM file and match dependencies, but it asks the user to log in as root (which is valid).
Talking to a couple guys learning ELF and Linux' SO loader, I got the impression that ELF already supports these multiple code segments, and that adding in headers to denote the arch is really simple. I'll see if I can get more evidence for this.
~ C.
Or maybe it's proprietary. Some people are willing to compromise on freedom.
I would define my freedom as a user as the freedom to install any app under any license without someone looking over my shoulder.
OSX makes this easy. Windows makes this easy. Linux makes this hard.
While fat binaries are one approach to run applications which are binary-only on Linux, a much better way is to use binary translation. A fat-binary approach would require application vendors to qualify both versions, which means approximately twice the cost. Translators can be developed by 3rd parties. There are a lot of commercial-grade binary translators and binary optimizers that have shipped over the years. Tandem, Digital, Transmeta, Transitive, etc. The messy parts are getting the OS conversion semantics correct when the source and target OS's are not very similar. Instruction decode can be a bit tricky, but it is not the development bottleneck.
The benefit would be that it would make data more transportable at first blush. The problem is clear enough : The whole process of installing an operating system and shipping data to it is a huge waste. Being able to take a drive and transplant it into a newer machine without having to re-install anything is an absolute time saver. I'm still loving Linux that it let me do that without too much fallout, but why couldn't I take a brick and put it on a faster processor, or a lower power processor, or in a friend's virtual machine, or anything... I don't need to be married to CPU architecture...
And that's really where it all falls apart, because you can't possibly ship a computer that has every CPU architecture in every binary.. But maybe you could have a bootstrapper / kernel that always gets all of the possible CPUs, just in case, for enough to be able to boot itself, mount its own file system and get to a network. Then, the operating system would replace the rest of the binaries with new versions, as part of your transplant process, and your computer would just work.
This is my sig.
Fat binaries are awesome, they're what makes Mac OS X the mainstream operating system with the most painless 64-bit transition. Whereas Windows and Linux use messy hacks to allow 32-bit apps to live in a 64-bit environment, in OS X it "just works" because all libraries are multi-architecture in a completely transparent way thanks to fat binaries. It also made the transition from PPC to x86 relatively easy, too.
I feel sorry for people who believe Linux doesn't need fat binaries. They don't understand all the advantages this system brings (and not just to non-free software).
Linux needs to become more like Mac OSX than Windows.
What I would like to see in Linux in the near future:
Universal file format for X86, X64, and PowerPC executiables that replaces the ELF format (WIZARD format, ELF needs food badly!)
GNOME and KDE merged into one GUI that emulates both of them, GNIGHT or something.
Ability for Linux to use Windows based drivers when Linux based drivers do not exist, something better than that NDISwrapper but under a GPL license and built into Linux.
GNUStep being developed into something that resembles Aqua, Aero, and other GUIs and is backward compatible with the Mac OSX API calls to recompile OSX programs for Linux. Maybe even in the near future run OSX Universal binaries somewhat like WINE runs Windows programs.
Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
Just because you can, doesn't mean you should.
I think for open software, that does not follow "traditional" models of software distribution, it's a pointless waste of resources.
Also, it won't affect me anyway, as I'm compiling everything from sources. (Gentoo)
Any sufficiently advanced intelligence is indistinguishable from stupidity.
Given enough disc space, there's no reason you couldn't have one DVD .iso
I don't want a DVD image, which would burn through the vast majority of a 5 GB/month transfer allowance. I want a CD image, which burns through one-seventh of that.
the otherwise unchanged hundreds of megabytes of data.
How is byte-swapped data "otherwise unchanged"?
One hard drive partition can be booted on different machines with different CPU architectures, for development and experimentation.
Different machines likely have different layouts for the master boot record.
And you can't build it from source because...?
The bug is in the source?
Yes, Sketsa is commercial, but the price is well worth the difference.
Not to people who live in a country with an undervalued currency. Look at the blue countries on this map: an hour of labor is worth fewer U.S. dollars than it would be in yellow or orange countries like USA, Canada, Japan, and most countries of western Europe.
Purchasing power parity, map at top of article
Only closed binary blobs will benefit, which IMHO is not something worth putting effort towards helping
Either you don't care about gaming on Linux (in which case you're entitled to your opinion), or you want to make all video games into free software (in which case I'd like to know how you expect the developers to get paid). Which is the case?
As for the end user, she should just use the package manager of her distro and find whatever she needs.
Or find a program, fail to find it in the distribution's package manager, file a request for packaging in the distribution's bug tracker, and let the request linger for years.
I meant exactly what I said. "Add/Remove Applications" is pretty usable UI that, as far as I can see, has none of the problems you refer to.
There are plenty of applications that I would want to use that aren't in Add/Remove. The examples that I've seen fall into three categories:
The bug is in the source but not one of the only two binary packages (x86 and x86_64) you have?
Or you mean they've updated the x86_64 version to the newer source with the bug, but not the x86 version?
* You can't find an older version?
* You can't build from an older branch?
Or you mean they've got a 64-bit bug?
* You can't make a 32-bit build yourself?
This seems like a really obscure failure mode to me, and if this particular workaround was removed there are plenty of others available.
I do not propose anything. Why should I?
You propose no solution for distribution of non-free software. You propose no solution for funding development of free video game software. Therefore, you appear to propose the elimination of the video game industry. A lot of Slashdot users who like to play video games disagree with your proposal.
I don't think this is really relevant in an OSS-based platform. Most apps you get for Linux that aren't distributed through your package manager are in source, allowing you to run it through the compiler for whatever architecture you happen to be using, which makes having multi-architecture binaries a moot point. Which is not to say that multi-architecture support is a BAD thing, of course, just that putting it all in one binary is the wrong approach to take.
I don't know if the average repository stores packages in a particularly wide variety of architectures, but it seems logical to me that that's the place where you put in universal support if it isn't that way already.
If you aren't angry, you aren't paying attention.
I got the remedy for that
aptitude install gnome-theme-aqua; gnome-terminal
Then, in gnome-terminal
aptitude install [program...]
If only the differences between the architectures could somehow be abstracted away... If only we could port one program to all these different architectures to accomplish this task...
Oh wait... We already have interpreters like python and ruby. If someone wants their program to work on many different architectures but does not want to compile many different types of binaries, why not just write something along the lines of python or ruby code.
that's not the issue. The whole point of FatELF is to deliver binaries. I may have missed it in his site project description and FAQ but I was left thinking that I'd not be able to similarly substitute 32bit app as I now do.
How many non technical people know the difference between 64 and 32-bit CPU's? Not a whole lot, if any. For those people, it's a bit daunting when their Linux friend/son/granddaughter/whatever tells them it'd be a great choice and the first thing they see is "Which download? 32 or 64?". Just put the .ISO with both 32-bit and 64-bit with a script that tests if the CPU is 64-bit capable at boot time. Or how about those people that don't know if their Mac has Intel or PPC chipset? Same thing, script at boot time to determine. If it's just two architectures the overhead could be well worth it.
"The best way to accelerate a Macintosh is at 9.8m/sec^2" -Marcus Dolengo
First off, I would like to point out that I don't support the idea of making binaries universal by packing them in the same .elf. Sure, it would be neat to have a DVD that can install to different architectures, it's currently not possible because the bootloader _has_ to be native. You'd probably end up with a bunch of boot floppies for a single installation media. In addition, is there any difference to having a package for each architecture on this DVD rather than universal packages? With separate packages the same amount of DVD space is consumed but far less is consumed on the target hard disk.
In addition, this isn't going to make companies support uncommon architectures any faster. Maintaining multiple packages is really easy, keeping the code working across different architectures is not so hard. I think it's mostly programmer laziness not bothering to compile other architecture packages - and there is no reason fatELF is going to decrease this laziness.
If you _really_ want architecture independence (which universal binaries don't really provide, they still only support architectures that the author had in mind), you'll need a recompiler of some sort. LLVM is designed to be suited to this task, so why not use it? Apple already does. Yes, I know it's a bit slower, but a small price to pay if you need your app to run on every system under the sun.
Of course, there is always the option of web apps...
that's not the issue. The whole point of FatELF is to deliver binaries.
True. It's to deliver binaries. It's not to work around a bug in some specific build of a binary. That's what building from source is for. However.
I may have missed it in his site project description and FAQ but I was left thinking that I'd not be able to similarly substitute 32bit app as I now do.
You must have. Actually, there's two different ways of doing it:
fatelf-split my_fatelf_binary
and:
fatelf-extract my_elf_binary my_fatelf_binary x86_64
fair enough. technically possible.
A similar scenario is being able to select which I run, 32 or 64 bit. I did that for awhile with Firefox both to compare their general performance and to try things on one first as a kind of experimental environment. The reasons are really immaterial. I don't see a palatable way to do this with FatELF though. Another edge scenario, admittedly.
The vast majority of all desktop computers out there are x86. The vast majority of Linux desktops, ditto.
That said, currently we can't even easily produce binaries that run on multiple distributions for just the x86 .
Generally speaking, unlike Windows/OSX, you can not just get "the Linux Desktop Version" of a program. There is no Linux desktop. There is a plethora of them. For better or worse, the issues and complexity that arise from this plurality are due to the lack of central management and control.
I thought this was the whole point of Java. Why are we going back and trying to solve a problem that was solved FOURTEEN YEARS AGO
In most cases, with Linux, we've got source code.
So if we want to run programs on a new architecture, maybe we could *gasp* compile from source?
Ryan Gordon needs to mind his own business. Keep your binaries and shit in OS X, we have source code to compile from which means that we can run it on any platform without requiring larger binaries, thanks!
:(){
Proven, once again. One size doesn't fit everybody...
Fortunately a company doesn't decide our destiny.
Binaries are only ever useful when compiled for the user's distro. Given that this usually happens at package level (at least for distros that even bother with package management), and that those packages are often platform-specific, I don't see what problem this would solve. Perhaps if there was a distro that was definitively "Linux" that had the userbase to support it. But then any candidate for such a role already has a package management system.
Do you see what I did there?
Okay, a bunch of you have responded with "Check out DEB and RPM". I already know about package management, thanks.
But if you look at an app package on MacOSX, you'll see it's presented as a single icon or "file" ... but use the command line, and you'll see it's just a directory. A directory with a special structure, so the system knows that it is really an application. Kind of cool. I think we need something like it on Linux, but I am not aware of such a thing. It would probably be some kind of virtual folder, implemented in GNOME or KDE. It's really just something like a tarball with a particular directory structure, maybe with a special extension, and GNOME/KDE knows it really should be presented to the user as a single object, using an icon located at a particular place within the tarball, with a special name.
Do I see it as the new way to release versions of Firefox, or GIMP? No. For that, use RPM or DEB for package management that's integrated with the rest of the operating system, tracking dependencies on shared libraries, etc.
However, I think this would be a great solution for third-party applications that aren't going to be part of a mainline distro - assume statically linked.
For example: commercial games. Download the latest version of "Sports Franchise 2009", put it in your "Games" directory or wherever you keep games, and just click it's icon in GNOME or KDE to launch it.
Uhm, doesn't mono already give Linux this? All they need to do is finish gcc's support for CLR binaries and the problem is solved. (CLR / mono can call into the underlying platform's C API.)
No, I will not work for your startup