LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2007, 05:25 PM   #1
Luvz2Fly
LQ Newbie
 
Registered: Aug 2005
Location: Florida
Distribution: Fedora, CentOS
Posts: 15

Rep: Reputation: 0
Why compile?


This is really just a "Just wondering" question that I hope to get a good detailed answer for:

Since Linux distros generally use the same Kernel why are applications required to be compiled locally?

Thanks!
 
Old 11-26-2007, 05:34 PM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Because this isn't Windows.

Seriously, it is because kernels - even the same version - can be different in implementation depending upon the options that were selected at compile time. Also, every system is different in terms of packages (and hence libraries) that are available. Consequently, compiling a package is often necessary so that libraries and choices that exist on the particular system are implemented or not, as indicated.

Generally, you will seldom need to compile if you go with a generic distribution and stick with that distro's packages. If, however, you compile your own custom kernel, optimized for your particular needs, you may need to compile a substantial number of other packages to support that. You also will find yourself compiling to satisfy particular system dependencies when you wish to run a proprietary package such as the NVidia video driver or VMWare Workstation.

Further, you may want some software that isn't available in your distro. In this case, you get the source and you compile it.

Also, if you don't upgrade regularly using your distro's package manager, you'll eventually find that the software you download to run won't work because of unsatisfied dependencies for later versions of software than you have on your system. In this case, you'll either do a major upgrade, or you'll start downloading the source for the later packages and compiling that in order to get to a point where you can install the software that you really wanted to install.
 
Old 11-26-2007, 05:37 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by Luvz2Fly View Post
This is really just a "Just wondering" question that I hope to get a good detailed answer for:

Since Linux distros generally use the same Kernel why are applications required to be compiled locally?

Thanks!
They're not....You can go years without ever compiling anything.

If you do need (or want) to compile something, it will not necessarily have anything to do with what version of the kernel you use.

Most distros now have pretty complete libraries of compiled programs in their repositories. At the other extreme is Gentoo and its progeny--where EVERYTHING is compiled.
 
Old 11-26-2007, 06:22 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Quote:
Originally Posted by Luvz2Fly View Post
This is really just a "Just wondering" question that I hope to get a good detailed answer for:

Since Linux distros generally use the same Kernel why are applications required to be compiled locally?

Thanks!
The notion that you have to compile anything is simply incorrect. The most popular distributions are all binary distros - pre-compiled binary packages are downloaded, installed and run without compiling anything.

You can compile programs if you like, but there is no requirement to do this.
 
Old 11-28-2007, 07:27 PM   #5
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Good Reason :)

I compile my entire systems so the linux installed on the system is specific for a particular computer. This way linux is as fast as I can possibly make it and I get the most use out of every process.
 
Old 11-28-2007, 07:55 PM   #6
Luvz2Fly
LQ Newbie
 
Registered: Aug 2005
Location: Florida
Distribution: Fedora, CentOS
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks all for the info! I know that today's Linux use installer packages but I have been using Linux (lightly) since late 90's and it was always something I couldn't figure out. Most apps I install are small utilities that still need to be compiled which i can do, I just wondered why and finally decided to ask...Thanks again!
 
Old 11-28-2007, 08:10 PM   #7
Couling
Member
 
Registered: Oct 2007
Posts: 30

Rep: Reputation: 15
There's one other thing...
I suppose this doesnt give any reason to "require" you to compile, but not everyone uses x86 processors

(x86 processors = 486, pentium, athalon etc.)

If you were to put a compiled binary into the wrong processor, the result would almost certainly not be desirable.

Supplying the source allows users of the more obscure arcitectures to have SOME chance of getting the package to work.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Compile kernel] How to compile/install the modules ? frenchn00b Linux - General 1 09-06-2009 04:18 PM
Compile madwifi, ... compile error , how can i do. ERBRMN Linux - Networking 3 03-08-2006 08:56 PM
I can't get this to compile! Xerop Programming 6 02-25-2005 08:19 AM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 05:22 PM
What does 'compile' mean? Iain1974 Linux - Newbie 15 08-25-2004 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration