Why should I compile from source?

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
Is there any particular reason I should compile from source when adding software rather than using rpm's?
I'm somewhat of a Linux noob... though I'm very proud of myself having just set up a web server running Coppermine in a virtual machine using Fedora 8 for a class project. :D
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Well, compiling locall can let you take advantage of cpu specific optimizations. Sans that, rpm's should be fine if they come from a trusted source.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The only time I install anything from source is when I need to apply a source patch or if there's no package available.
 

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
So you basically only do it with software that doesn't have a package... or you're concerned about the software being optimized for your platform?

Or I guess there's a 3rd option... you're an uber geek and LOVE extra typing at the command line. :D
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: Jeff7181
So you basically only do it with software that doesn't have a package... or you're concerned about the software being optimized for your platform?

Or I guess there's a 3rd option... you're an uber geek and LOVE extra typing at the command line. :D

If you really want to compile everything just go use Gentoo, heh.

Like Nothinman said, binary packages are the way to go unless it's just not available.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So you basically only do it with software that doesn't have a package... or you're concerned about the software being optimized for your platform?

The latter's even pretty questionable, compiler optimizations don't usually make too big of a difference these days.

The main reason I can think of is that you have an external patch that isn't included upstream so you have no choice but to apply it and compile locally. I could probably think of one or two others, but in general just stick to packages and your life will be a lot simpler. =)

Or I guess there's a 3rd option... you're an uber geek and LOVE extra typing at the command line.

And you can still do that without having to compile anything. =)
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
There are a few reasons to compile from source, but usually, just installing the packaged binary will work great.
 

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
Cool, good to know. I was worried relying too heavily on rpms would anger the 'nix gods. :D
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Jeff7181
So you basically only do it with software that doesn't have a package... or you're concerned about the software being optimized for your platform?

Or I guess there's a 3rd option... you're an uber geek and LOVE extra typing at the command line. :D
If you don't rewrite the software from scratch yourself, you've already wussed out too much to earn the right to call yourself a geek. ;)
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
Originally posted by: Nothinman
So you basically only do it with software that doesn't have a package... or you're concerned about the software being optimized for your platform?

The latter's even pretty questionable, compiler optimizations don't usually make too big of a difference these days.

The main reason I can think of is that you have an external patch that isn't included upstream so you have no choice but to apply it and compile locally. I could probably think of one or two others, but in general just stick to packages and your life will be a lot simpler. =)

Or I guess there's a 3rd option... you're an uber geek and LOVE extra typing at the command line.

And you can still do that without having to compile anything. =)
back in my day we looked at the source code and type in the machine code directly. you kids and your compilers... and get off my lawn!

 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: Jeff7181
Cool, good to know. I was worried relying too heavily on rpms would anger the 'nix gods. :D

Chances are it'll at most anger a few dorks who compile stuff to feel l337, most other people don't want the hassle and simply use whatever packaging tools they get with their distro of choice ;)
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
Originally posted by: jhu
Originally posted by: Nothinman
So you basically only do it with software that doesn't have a package... or you're concerned about the software being optimized for your platform?

The latter's even pretty questionable, compiler optimizations don't usually make too big of a difference these days.

The main reason I can think of is that you have an external patch that isn't included upstream so you have no choice but to apply it and compile locally. I could probably think of one or two others, but in general just stick to packages and your life will be a lot simpler. =)

Or I guess there's a 3rd option... you're an uber geek and LOVE extra typing at the command line.

And you can still do that without having to compile anything. =)
back in my day we looked at the source code and type in the machine code directly. you kids and your compilers... and get off my lawn!

01001011 101101111 00101110 00001110 11011010
 

Skeeedunt

Platinum Member
Oct 7, 2005
2,777
3
76
There are also a few good reasons not to compile anything from source if you can avoid it, namely that you'll be more likely to update if everything is installed from the package manager. Having to recompile every time there's a security patch can be a PITA... next thing you know, you have systems running god knows which version of who knows what. Not that it can't be done of course, just something to keep in mind.