LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2009, 02:44 PM   #1
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Rep: Reputation: 70
Question Tips needed for Compiling from Source


Hi all,

I've compiled and debugged hundreds of programs over the years, but the last batch I undertook was way back in the early 1990s so it's all a bit of a blur after so long.

Today I downloaded a source tree for a small linux application in .tar.gz format. So I've extracted it into a suitable directory which I created under /opt as I gather this where one should install additional application software. Is that correct?

I then ran ./configure and it got a good way into most of the task before it stalled and spitted out a 'package missing' error and exited. This 'package' is a dependency for the main application and there are 4 others; some of which are already on my system and some of which aren't.

I downloaded this first missing dependency from Sourceforge and it turns out to be another source file in the same tar.gz format as the main application. At this point I thought I'd better run a couple of questions past the Panel:

Where should I install this dependency package on the system? I assume it's gotta go somewhere where the config script will be able to find it. Should it be installed AT ALL, or just saved where the config script can find it and extract the relevant parts itself?

I don't want to end up with required files scattered all over the system making cleaning up later more complicated, either. I'm rather untidy and disorganized by nature, so any good housekeeping tips as to where to correctly put all these files and directories would be most welcome!

Thanks, CC.

Last edited by Completely Clueless; 06-08-2009 at 02:47 PM.
 
Old 06-08-2009, 02:51 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by Completely Clueless View Post
Today I downloaded a source tree for a small linux application in .tar.gz format. So I've extracted it into a suitable directory which I created under /opt as I gather this where one should install additional application software. Is that correct?
The "normal" locations are /opt/src/programname or /usr/local/src/programname. I tend towards being a fan of the later, but I've seen it done in /home/user/program directories and everywhere else. Just be consistent in your usage.

Quote:
Originally Posted by Completely Clueless View Post
I then ran ./configure and it got a good way into most of the task before stalling and spitting out a 'package missing' error and exiting. This 'package' is a dependency for the main application and there are 4 others; some of which are already on my system and some of which aren't.

I downloaded this first missing dependency and it turns out to be another source file in the same tar.gz format as the main application.

At this point I thought I'd better run a couple of questions past the Panel:

Where should I install this dependency package on the system? I assume it's gotta go somewhere where the config script will be able to find it. Should it be installed AT ALL, or just saved where the config script can find it and extract the relevant parts itself?

I don't want to end up with required files scattered all over the system making cleaning up later more complicated, either. I'm rather untidy and disorganized by nature, so any good housekeeping tips as to where to correctly put all these files and directories would be most welcome!

Thanks, CC.
Fairly normal, if you're using a system with a package manager you should probably install the dependencies via the package manager so it keeps updating them unless you need a specific version that is further down the line from the release you're using. Otherwise you typically compile and install the package using a prefix of /usr/local or in some cases /usr, i suggest /usr/local and then adding the appropriate entries and paths to your config statements / ld library path (/etc/ld.so.conf or /etc/ld.conf.so/*.conf depending on distribution, don't forget to run ldconfig after updating them.)

You've hit on the key issue, be consistent. If you configure programs compiled from source to install to /usr/local always send them there... don't make an exception for one program to be in /usr or in /opt, etc.

The process for all programs is approximately the same, although if you know you're going to need a dependency it's a good idea to install it first.

make clean is your friend after updating libs too
 
1 members found this post helpful.
  


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
AIGLX and Beryl Tips needed rakris Linux - Newbie 1 11-17-2006 09:37 PM
tips needed arunvk SUSE / openSUSE 2 06-19-2006 10:39 AM
Tips needed for optimising ClamAV jimieee Linux - Software 0 06-08-2006 09:33 AM
Kernel compile tips needed Tim Johnson Slackware 6 09-08-2005 05:30 PM
pointers needed about installing/compiling from source PenguinE Linux - Newbie 5 01-02-2005 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 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