LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-02-2009, 07:50 PM   #1
bowserevilking
LQ Newbie
 
Registered: Aug 2009
Distribution: Puppy Linux
Posts: 9

Rep: Reputation: 0
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?
 
Old 10-02-2009, 10:00 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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
 
Old 07-03-2010, 04:22 PM   #3
bowserevilking
LQ Newbie
 
Registered: Aug 2009
Distribution: Puppy Linux
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 07-03-2010, 04:40 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by bowserevilking View Post
Why aren't there any Linux programs that are embedded in one executable?
Any or all? How about static binaries? Also see statifier.sourceforge.net.


Quote:
Originally Posted by bowserevilking View Post
Windows and Mac have them, so
Please don't compare the standard binary file format for Unix with what this particular vendor founded to develop and sell BASIC interpreters for the Altair 8800 has.


Quote:
Originally Posted by bowserevilking View Post
Think of a Package Manager compatible with every Distro/ Package, wouldn't that be great?
I'm thinking... thinking... No Sir, I don't like that.
 
Old 07-04-2010, 08:49 AM   #5
bowserevilking
LQ Newbie
 
Registered: Aug 2009
Distribution: Puppy Linux
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
Any or all? How about static binaries? Also see statifier.sourceforge.net.
I didn't know about that, thanks. And I meant most.



Quote:
Originally Posted by unSpawn View Post
Please don't compare the standard binary file format for Unix with what this particular vendor founded to develop and sell BASIC interpreters for the Altair 8800 has.
Why not?



Quote:
Originally Posted by unSpawn View Post
I'm thinking... thinking... No Sir, I don't like that.
Why not?

Last edited by bowserevilking; 07-04-2010 at 08:54 AM.
 
Old 07-04-2010, 08:59 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
You mean one 'Package Manager' for all Linux ?

Linux is about choice.
Some prefer the Debian package method / system.
Others rpm. Etc. etc.
..
 
Old 07-04-2010, 09:12 AM   #7
bowserevilking
LQ Newbie
 
Registered: Aug 2009
Distribution: Puppy Linux
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
You mean one 'Package Manager' for all Linux ?

Linux is about choice.
Some prefer the Debian package method / system.
Others rpm. Etc. etc.
..
If there was a 'Universal' Package Manager, couldn't you choose that? I mean, if you'd think another one was better, what would stop you from choosing it? The option is what I'm proposing here. A 'jack-of-all-trades' Manager, able to use any package/Distro, not necessarily best at any of them. Is there anything wrong with that?

Last edited by bowserevilking; 07-04-2010 at 09:56 AM.
 
Old 07-04-2010, 10:58 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by bowserevilking View Post
....A 'jack-of-all-trades' Manager, able to use any package/Distro, not necessarily best at any of them. Is there anything wrong with that?
Yes. Who would maintain it? I think it takes significant effort to maintain a package management setup for ONE distro-----given the diffuse and diverse nature of the open source community, I doubt if would even be **possible** to do what you are suggesting.

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.
 
Old 07-04-2010, 11:21 AM   #9
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quote:
Originally Posted by bowserevilking View Post
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?
As I understand it, all of those operating systems have stand-alone single binary files you can execute to start a program (given that it was designed to do so), and software that is distributed as a "package" (or installer, archive, folder, whatever you want to call the wrapped-up thing as) and depends on multiple files. For example consider the .dll files on Windows; a lot of programs installs those, and will not run without them, just by clicking on the exe file. Actually most modern Windows programs I'm aware of don't come as single executables but as installers that put multiple files on the system; only the simplest, smallest utilies tend to do that. One of the reasons is that coding the software is easier if it's split into parts. Even if it was (as a "final step") merged into one file when distributed, a lot of software would then produce huge executable files, which might not be desireable. And if there's code to share between different software pieces, it might be wise to put that someplace else than the executable file itself (libraries) -- though this is a matter that is argued over and over again.
 
Old 07-04-2010, 11:42 AM   #10
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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:
  • It's not available in your distribution's repositories.
  • You want to change the program to satisfy some need not covered by the program's author(s).
  • You are using one of the distributions that's "source only:" (e.g, LFS, etc.)

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."
 
Old 07-04-2010, 01:16 PM   #11
bowserevilking
LQ Newbie
 
Registered: Aug 2009
Distribution: Puppy Linux
Posts: 9

Original Poster
Rep: Reputation: 0
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.

Last edited by bowserevilking; 07-04-2010 at 01:26 PM.
 
Old 07-04-2010, 01:50 PM   #12
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
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:
Originally Posted by bowserevilking View Post
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.
This is puzzling me. Why are you doing so much compiling if you don't like it? Just use your distro's package management system to install software and you won't need to worry about compiling. For the rare cases when there is not a pre-compiled binary in your distro's repositories you might have to resort to compiling, but there may be other options too. For example in Ubuntu we have PPAs where pre-compiled binaries are offered for software which is not in the repositories.

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.
 
Old 07-04-2010, 01:54 PM   #13
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
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!
 
Old 07-04-2010, 07:52 PM   #14
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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...
 
Old 07-04-2010, 08:19 PM   #15
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,440
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
Quote:
Originally Posted by bowserevilking View Post
Is it because there is no ELF standard?
There is an "ELF standard," but there is no "standard" Linux installation.

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
in linux where are the files required by an elf kept? krisonearth Linux - Software 3 08-31-2009 12:05 AM
where are elf files of the in-built applications of fedora 8? krisonearth Linux - Software 3 08-26-2009 02:39 PM
Running Elf Files mshindo Programming 1 06-25-2008 10:52 PM
finding elf files ashlesha Linux - Newbie 1 07-21-2006 03:40 PM
ELF Files tim_l Linux - Software 0 10-21-2003 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration