LinuxQuestions.org
Help answer threads with 0 replies.
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 03-22-2014, 10:56 PM   #16
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: OpenSUSE
Posts: 1,396
Blog Entries: 7

Rep: Reputation: 166Reputation: 166

Quote:
Originally Posted by rtmistler View Post
I try to find available packages in repositories to install things as my first attempt; however if I can't find something on a repository, I will next attempt to grab the source; then build and install it.

Yes, the most common flow is to run configure, then make, and finally "make install" where the last step is normally done with a sudo argument so as to cause installation into the common executable directories as root.

I guess the biggest frustration comes when you cannot find it in a repository and therefore embark on compiling the source code, to find that the list of dependencies which your system does not have becomes so lengthy as to be unmanageable.


In addition to this, i'd like to mention source files. If you're using a binary based distro, most of them chop up their packages to reduce the bandwidth needed to install a program. If the package you are compiling has a dependency which is satisfied, but is satisfied via a binary package (installed through the repo); you will likely have to install the dependency's source file too.
When i first tried out compiling, this was my biggest frustration. I had a dependency satisfied, but when i was configuring the source, it was registering that i was missing foo dependency.
A source file is normally named the same name as it's package, with '-devel' or '-source' tagged onto it.
 
Old 03-23-2014, 12:00 AM   #17
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,687

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
Quote:
Originally Posted by Knightron View Post
In addition to this, i'd like to mention source files. If you're using a binary based distro, most of them chop up their packages to reduce the bandwidth needed to install a program. If the package you are compiling has a dependency which is satisfied, but is satisfied via a binary package (installed through the repo); you will likely have to install the dependency's source file too.
When i first tried out compiling, this was my biggest frustration. I had a dependency satisfied, but when i was configuring the source, it was registering that i was missing foo dependency.
A source file is normally named the same name as it's package, with '-devel' or '-source' tagged onto it.
That is more likely to be a library issue not a source issue. the xxx-devel package names are usually libraries - but the libraries are specific to the package, and not to a source application. Applications that are missing system libraries do occur - but that is usually caused by not having (or having partial) configured the system for software development.

Now when using the distributions source package to rebuild a binary package also sometimes have problems - but that is even more directly related to the xxx-devel package.

What I have seen happen is that the source application being built depends on a newer library than what the distribution has provided. This doesn't happen that often, but the older the installation is, the more likely a new application may hit this problem. The only solution then is to get the newer source to the library and build it too. This is what happened to me with Apache - the new Apache depended on a newer OpenSSL library than the one available. So I tended to build both each time, and made sure they were installed in /usr/local well away from where the distribution would put things. I even went so far as to put each application into its own directory in /usr/local. So there would be /usr/local/apache-<version> and /usr/local/OpenSSL-<version>, with a generic link /usr/local/<application> that would point to the current version. Building a new application would always point to the appropriate library, so that once buildt it would always get the corresponding version. If I was using shared libararies, then I could choose to use the symbolic name for the library - and it would then try to use whatever was current.

This allowed me to have multiple versions - an old one, a current one, and a test one... without issues (other than having to specify longer paths to identify which was desired). I could even use /usr/local/bin to contain symbolic links through the /usr/local/<appname> link to get to the utilities. This also made it easy to switch versions for all users. It did mean I occasionally had to clean up broken links though (utility functions that were replaced by new utilities with different names). But nothing all that difficult.

Having all these separated from the system also allowed them to be backed up separately... and even allowed them to be installed (via the backup) on multiple servers.

Last edited by jpollard; 03-23-2014 at 12:02 AM.
 
  


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 it++ source code TIS-Well Linux - Newbie 2 01-25-2012 07:19 AM
How to compile source code files? gardenair Linux - Software 8 02-04-2011 04:47 AM
How to compile a source code elishac Linux - Newbie 19 01-15-2010 02:18 AM
how i compile a source code? nazib Linux - General 5 02-27-2005 09:13 AM
How to compile source code... Grim Reaper Linux - Newbie 3 04-26-2002 11:28 AM


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