LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-08-2007, 09:10 AM   #1
Rick069
Member
 
Registered: Feb 2005
Distribution: Arch Linux
Posts: 204

Rep: Reputation: 30
Building programs from source


What is the process of building programs from source and is there a distinct advantage from doing things that way?
 
Old 10-08-2007, 10:01 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
1. install the build-essential package
2. download the program's source
3. extract the archive (usually with tar xvzf program-src-name.tar.gz)
4. cd to the newly created program's source dir
5. read the README.* and INSTALL files
6. install any header/development packages needed
7. run ./configure --optional-flag1 --optional-flag2
8. run make
9. run make install as root

that's the general process. specifics can and will vary, which is why you must read any provided install instructions (either on the program's web site or in the mentioned INSTALL and README files).

Compiling from source allows you to get newer versions before they make into the repositories. I had to compile ALSA myself to get sound working when I first got my laptop, but now the packages have been updated and they work great. It also (sometimes) gets you a program that is better optimized for your specific hardware.

In most cases it is far easier to install the official package, and usually there's no significant reason to want to compile from source.

Try asking a Gentoo fan for a perspective from the other, "compiling from source is the only way to go" side.

Last edited by AlucardZero; 10-08-2007 at 10:02 AM.
 
Old 10-08-2007, 12:21 PM   #3
Rick069
Member
 
Registered: Feb 2005
Distribution: Arch Linux
Posts: 204

Original Poster
Rep: Reputation: 30
I think that was what i meant. Thx.
 
Old 10-09-2007, 01:35 PM   #4
jimmy512
Member
 
Registered: Oct 2006
Location: London
Distribution: Arch
Posts: 183

Rep: Reputation: 31
I know I'm a bit late on this one, but if you get dependency errors and there is an older version in the repositories, you can do an apt-get build-dep <application> to get the dependencies installed. This might be a bit ugly though if the program is large (like amarok).
 
Old 10-10-2007, 12:30 PM   #5
sonichedgehog
Member
 
Registered: Oct 2007
Location: London UK
Distribution: Fedora Core 17
Posts: 298

Rep: Reputation: 32
Still struggling! ./configure not working for me

Trying to install Firefox on Debian OS.
Various sources contain the same advice as AlucardZero;2917241]
including
5. read the README.* and INSTALL files
6. install any header/development packages needed
7. run ./configure --optional-flag1 --optional-flag2

But the ./configure command isn't working... am I missing something?
 
Old 10-10-2007, 12:39 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Are you compiling from source for any particular reason? Firefox comes with Debian (but called Iceweasel), and if somehow it's not there, it's a apt-get firefox away.

If you still want to compile it from source, you need to post what you get when you do ./configure.
 
Old 10-10-2007, 10:47 PM   #7
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
I like compiling from source on occasion, but I generally prefer to install applications using aptitude or apt-get. Debian has the best package management system on the planet.
 
  


Reply



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
DISCUSSION: Building C++ programs on Linux hylke LinuxAnswers Discussion 34 05-22-2017 08:18 PM
DISCUSSION: Building C programs on Linux crabboy LinuxAnswers Discussion 29 09-04-2013 10:19 AM
Information about building a network server and the right programs Blackharaz Linux - General 3 04-29-2005 02:14 PM
Building programs from source and checkinstall changcheh Slackware 10 11-14-2003 10:43 AM
Building Kylix programs Puck2099 Programming 4 06-06-2003 11:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:29 AM.

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