Why aren't ELF files used much?
Hello, this has really been bothering me. As I understand it ELF's are the counterpart to EXE's, so why do users normally have to compile software themselves? It seems like it would be so much easier for most people if open source programs would give the source separately. Is it because there is no ELF standard?
|
When a file is compiled, it becomes an ELF binary. I can't remember the last time I had to compile a production-quality program. You can read the details on ELF here: http://en.wikipedia.org/wiki/Executa...inkable_Format
|
Sorry for responding after so long, but what I meant was: Why aren't there any Linux programs that are embedded in one executable? Windows and Mac have them, so why do we have to compile source or use packages rather than download a single ELF or archive, run or extract that, and start? Think of a Package Manager compatible with every Distro/ Package, wouldn't that be great? Of course, if there is already one, ignore my ramblings.
Please forgive the super-bump.:o |
Quote:
Quote:
Quote:
|
Quote:
Quote:
Quote:
|
You mean one 'Package Manager' for all Linux ?
Linux is about choice. Some prefer the Debian package method / system. Others rpm. Etc. etc. .. |
Quote:
|
Quote:
More to the point: Why would you even want such a thing? Most mainstream distros include > 90% of the software that you ever need. If something is not there, then installing it manually is not all that difficult. |
Quote:
|
You could move to the smart package manager which does support many different distribution formats. But, for any specific distribution, you're (usually) better off just getting your programs from the distribution's repositories. (I only use smart when there is a problem that the distribution repository tool can't resolve, since smart is, usually, much better about finding and fixing problems than most distribution-specific installers.)
But to return to your original question, almost every distribution maintains, and makes available, a repository of ELF programs, dynamically linked to the current version(s) of that distribution's libraries. Since those ELF executables (unless they include actual copies of the libraries they use - i.e., are "statically linked") need those libraries, they are specific for the distribution you're using. The only time you need to compile a program from the source code is when either:
Note that Windows "exe" programs distributions often rely on a specific Window's version of the the dll files, and that they will only work with that specific version of Windows. While Macintosh programs are in ELF format (since Macintosh operating systems are, mostly, "enhanced" BSD-based Unix systems) they are distributed for specific versions of a Mac OS, and, of course, won't usually work on a different version. My point is that you are, in essence, asking "Why are there so many different Linux distributions? If there was only one distribution, then any Linux program would run on it." To which question you will receive the answer: "Well, duh! That's certainly correct, but different people want different things from their computer systems, and there's no reason to force everyone to "fit in Procrustes' bed" if they don't want to do so." |
I apologize if I asked a stupid question. I suppose I didn't bother researching how complex Linux is. I didn't know my question basically boiled down to "why is there too much choice"?
To be honest, I think what really annoys me is compiling. I feel Linux programs are normally released as either source or as source and only one kind of package, which got me thinking about this. I'm sorry that I made you all rant about how I was ignoring something integral to Linux, and how my examples were flawed. I am not trying to be sarcastic or anything. I just thought that there was a possibility my idea could improve Linux and make it easier to use. I didn't consider how complicated it would be. |
I don't think your question was stupid and I don't think you should feel sorry for asking it. It does seem to suggest that you are thinking in the mindset of a long time Windows user, but that's just my guess. The only way around it is for you to actively seek out knowledge and experience from which you can glean new insight about why Linux distros do things the way they do.
Quote:
I don't know what distro you are using, but spend some time investigating the package manager and software sources provided with the system. You may be able to add new repos which contain the software you want. |
I don't get why you have this notion that you have to compile everything. You don't have to compile nearly anything unless you want to. And you don't want to, so don't!
Software writers often release not only their source, but precompiled packages in the most popular formats: deb, rpm, and generic. In addition, distro maintainers will compile and package for their particular distro so you don't even have to seek out each software's site (this isn't Windows!). Use your package manager! |
bowser*;
Ditto the comment about not apologizing.....There's a classic line in someone's sig here: "The only stupid question is the one you don't ask." (or something like that....) The problem of "too much choice / too many options" is endemic to OpenSource. There's no way to stop it... |
Quote:
Most binaries on any given Linux distro will be dynamically compiled, which is not entirely unlike Windows... but under Linux, there are several different types and versions of libraries that they could be compiled against. Static compiling adds portability, but also significantly to the size of binary files, so that is why it is rarely done. |
All times are GMT -5. The time now is 05:05 AM. |