LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-07-2010, 07:44 PM   #1
vbekker
Member
 
Registered: Aug 2010
Location: Brooklyn, NY
Distribution: CentOS
Posts: 38

Rep: Reputation: 0
building from source vs. yum install vs. rpm


Hi,
I'd like to clear up my misconception towards various types of installations. Is one better than the other? Do more senior people prefer compiling from source code? Hows does is compare to yum install or install from rpm?

Thanks
 
Old 11-07-2010, 08:00 PM   #2
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 995

Rep: Reputation: 297Reputation: 297Reputation: 297
For me, the preferred method is installing from binary packages (rpm files in the case of the distros that use rpm, deb packages in distros derived from debian, and other formats in distros that use other formats); it's easier, cleaner, and you're making sure the package you're installing is intended for your specific distro. Compiling may be necessary when some specific package is not on the repositories, or in the rare case when a package that is available in binary format in the repositories, was not compiled with a specific option you may need.
 
Old 11-07-2010, 08:04 PM   #3
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Hi,

Compiling from source is more flexible than installing from binary. You can compile the minimum options which you want. yum is used when you have Internet connection, it connects to your repository and helps you solve the dependencies packages. rpm is used when you want to install some packages separately, it cannot solve the dependent problem. If A depends on B, and B depends on C, ... you must install in order: C --> B --> A. More detailed, you should read the man page.
 
Old 11-07-2010, 08:05 PM   #4
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 7,731

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
All things being equal, I suspect most persons choose the easiest way, which would be installing from the repos.

I started with Slackware v. 10 (Slack is still my favorite). Most of the programs I installed for my first three years of Slacking, I compiled for sources, because, well, that's the Slackware way* (now there's Slackbuilds). Now, if I can find a program in the repos or, in the case of Slackware, on Slackbuilds, I'll go that route rather than compiling, simply because it's a lot quicker.

When I have a choice between sources and repos, I choose repos. But I'm quite happy compiling.
  • ./configure
  • make
  • make install
  • get a Scotch.

_____________________

*There have been a few sites that offer Slackware packages, but they are not officially associated with the Slackware mothership.
 
Old 11-07-2010, 08:14 PM   #5
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 995

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by frankbell View Post
When I have a choice between sources and repos, I choose repos. But I'm quite happy compiling.
  • ./configure
  • make
  • make install
  • get a Scotch.
Yeah, compiling can be very funny and educational; a way to learn how things work on linux (dependencies, etc.).
 
Old 11-07-2010, 08:16 PM   #6
John VV
Guru
 
Registered: Aug 2005
Posts: 12,914

Rep: Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715
it all depends

i tend to leave the base/core of the OS installed ( rpm) fedora ,Cent, Suse, and xz for Arch
and build optional programs from source .Some programs i just build out of habit .
Programs like "The Gimp" i have been building from source for many many years ( since 2001) and just build it mostly out of habit .
But there are options that can be set at build that are not in a "one rpm fits all" OS install .

other programs like Celestia I build because I NEED some settings turned on ( S.P.I.C.E.)
and because i am using the QT4 interface and NOT the default GTK ( or kde3-qt3.5) interface

Then there are some programs that i used to build but do not any more
like Mplayer .I first started building mplayer on XP in MinGW then fedora 4 & 5 .Then stopped .
It is just way too much work , i will leave that to others to do .
 
Old 11-07-2010, 10:14 PM   #7
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
I generally use a package manager: the path of least resistance.

There is one other aspect of package management that hasn't been touched on yet in this thread: configuration.

If you use a package management system, the program that handles package management usually has hooks to kick off post-install configuration scripts. (At least, my experience with Ubuntu and I think Red Hat)

The post-install scripts may not be needed by every application, but there are some where they are extremely useful. For instance, installing server applications. The post-install scripts add/change the system beyond basic installation. For instance, install mysql server, and it asks for you to setup a database-root password. Another: install postfix and the scripts create the user and group to run the server as unprivileged. Also, the post-install scripts could create symlinks or other filesystem tweaks to help the package run (e.g. if the distribution places binaries or other files in directories the application does not expect)

Some source-based applications do those things in the "make install" step. Some do not. You would need to perform all those steps manually if they are not automated. So, you need to read all the documentation provided in the tarball. Even then, the application developers make assumptions about your knowledge of a Linux system that may not be true. You could find yourself searching for an online reference to explain X just so you can continue from step #3 to step #4 of (post-)installation.

And lastly, using a package manager likely means you will get a default configuration file that is reasonable. The source tarball may provide some example configuration files to choose from, but it's more work. In other words, you may need to tweak the package maintainer's configuration by looking for specific parameters to change. Whereas you may need to review the entire sample configuration provided by the developers.

The more time you are willing to invest, the more customized your installation will be. You just have to do the cost-benefit analysis.
 
Old 11-08-2010, 08:13 PM   #8
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 7,731

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
Quote:
Originally Posted by odiseo77 View Post
Yeah, compiling can be very funny and educational; a way to learn how things work on linux (dependencies, etc.).
I will second this, along with my second Scotch.

Dealing with dependencies is a great learning experience and a useful thing to know how to do.

It can also be a drag, but I'm really glad I had to learn how to do it.
 
  


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
Building an RPM from source... Alexvader Linux - General 4 04-15-2010 03:42 PM
building rpm from source yawe_frek Linux - Software 2 08-09-2007 03:38 PM
problem building and installing rpm from ndiswrapper source steveman2000 Linux - Newbie 5 10-23-2005 07:01 PM
Building a Source RPM for RH9 stefaandk Red Hat 4 07-22-2005 07:23 AM
Building RPM from the source for mrproject Basel Linux - Newbie 0 02-26-2004 01:36 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration