LinuxQuestions.org
Visit Jeremy's Blog.
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 04-05-2014, 10:31 AM   #1
Aro2220
LQ Newbie
 
Registered: Mar 2011
Posts: 7

Rep: Reputation: 0
Trying to Learn how to Compile from Source


Hello!

I'm a beginner linux user who has gotten to the stage where compiling from source is my only option.

I've done this once or twice, but realize now that I was quite fortunate compiling something that didn't have a complex set of dependencies, weird versions, and other conflicts that are over my head preventing the simple ./configure ; make ; make file from working.

In this instance, I am trying to install mono 3+ (at the moment, 3.4.0) onto Centos 6 x64. From everything I've been able to find on Google, this is not going to work out too well for me.

I read a few beginners sites on how to compile from source. The most important thing I learned was to RTFM, specifically the file named INSTALL and if that doesn't exist the README. Usually there are installation instructions on how to install it in the most basic setting.

I'm looking for some tutorials, websites, posts, books, etc, that detail how to compile from source in a linux environment (command line only as I only use linux through VPS'). Specifically, how to troubleshoot.

Here is the part where I speculate upon my ignorance:

I'm thinking that in order to compile something, you need some kind of libraries and other things (?) that are required to actually compile the source code. The problem is that they may require a higher version (or worse, a specific version) to compile the code properly.

The official repositories that your distribution already has typically only contain one version of something. If you want mysql-server, for example, there are many versions of it but typically just one is in your official repository...so if you need something older or newer you're going to have to find the tarball and compile from source.

Is there some kind of 'general' thought process one should go through when trying to compile something from source? A series of checks / information gathering to determine what kind of dependencies it requires and the versions required?

I noticed that ./configure typically says something about needing this or that version....if, for example, it says I need glib-2.0, does that mean glib2-2.4 is going to break things? Or maybe break things depending if 2.4 has released something that broke some way that used to be supported in 2.0...(yanks hair)

I really just need to be better educated about how this all works so I can start figuring out what my problem is...what's the best practice...and what not to do.
 
Old 04-05-2014, 11:21 AM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
First, you probably can find the RPM you need and install it. Google will find the RPM you are looking for, methinks there is also a dedicated site, rpmseek.
Second, where installing from source is certainly possible, it is really not recommended because you are about to install a bunch of files your package manager does not know about. If building from source you should package it as RPM and install it using your package manager.
Unfortunately I do not know how build tools are called in RH world. I'm sure CentOS has some documentation in their website with answers to questions like this.
 
Old 04-05-2014, 12:01 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Centos 6 : # yum install mono-devel

The mono*- packages are in the EPEL.repo ...
https://fedoraproject.org/wiki/EPEL
# rpm -Uvh http://dl.fedoraproject.org/pub/epel...6-8.noarch.rpm

-
 
Old 04-05-2014, 01:02 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
ALWAYS!!!!!!! check the yum repos and if needed the third party repos BEFORE !!!!!!!
you even look on google

installing random rpms from random sites and for random operating systems will KILL your install FASTER ,than well anything

all these use rpm's
rhel
cent
scirentificlinux
fedora
mandrake
OpenSUSE
SELD and SELS

as to building source code
for cent/ rhel you will not really find any step by step guides
cent uses the redhat documentation
and those docs assume that you ARE an experienced redhat user
https://access.redhat.com/site/docum...erprise_Linux/

start with the web page FOR the program


The Gimp
is a good start
on CentOS 6 you can only use THE OLD version Gimp 2.6
you will be UNABLE to install gimp 2.8
( well you can , but i will NOT spend a week building NEW versions of about 60% the operating system to do it )

but Gimp 2.6 builds fine
and is VERY well documented

Last edited by John VV; 04-05-2014 at 01:05 PM.
 
Old 04-05-2014, 03:08 PM   #5
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,072
Blog Entries: 3

Rep: Reputation: 323Reputation: 323Reputation: 323Reputation: 323
Quote:
Trying to Learn how to Compile from Source
any of the people here want to walk him through Linux or a package manager.
The configuration script is one of the biggest things. Always read the README file then read the
Install file.
And of course your wanting to compile so you have a nice up to date or configured for your hardware.

First I do believe using the development programs from your package manager they are well thought out.
then as the configure prints out it's log read and see if your missing something.
during the compile you may still be missing something.
like I said only as good as the config script.
there is many reasons to compile from source.

trust me out of all them rpms and debs and tgz not all are up to date and will compile.
many packages are brought forward from version to version. I have proved this many times.
 
Old 04-05-2014, 03:49 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
Quote:
any of the people here want to walk him through Linux or a package manager.
most of us here will take a PM
but will then repost it on the thread , so that everyone can benefit

Aro2220
you are using CentOS 6.5 , the free rebuild of RHEL 6.5
redhat is , shall we say VERY CONSERVATIVE !! in the software used

it is OLD !!! software
BUT
But very very very WELL tested and with bug fixes and SECURITY updates "back ported" to it

this makes for a VERY VERY STABLE operating system
in the last about 6 years or so i have only had ONE ( 1 ) ,one crash on CentOS
and that was 100% MY FAULT -- I caused it

on fedora , i had gnome crash about once every few days
and Xserver went with it sometimes

on SUSE ( on older 11 install) i had the WHOLE desktop crash almost EVERY DAY

but
on Cent -- NONE

BUT that comes at a cost
older BUT bug fixed software


this makes RHEL and CentOS a bit difficult to use on a HOME set up

although i run ScientificLinux on my home computer
it is NOT my everyday operating system for that i run OpenSUSE


you might want to start with reading through the centos wiki
http://wiki.centos.org/
the page on "software repos"
http://wiki.centos.org/AdditionalResources/Repositories

then you might want to go to the book store or Amazon
there are many RHEL6 books

and at about $12.00 to $24.00 , worth the price
like "Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators ["
http://www.amazon.com/Red-Enterprise.../dp/1118301293

or
"A Practical Guide to Fedora and Red Hat Enterprise Linux (6th Edition)"
http://www.amazon.com/Practical-Guid...NA5VP0TKVWT676
 
Old 04-05-2014, 06:47 PM   #7
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Rep: Reputation: 174Reputation: 174
If an update is issued for a package installed from a package manager, you will be notified about the available update.

If an update is issued for a package compiled from source, you won't be.
 
  


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
LXer: Learn how to compile from source Linux software with AbiWord 3 LXer Syndicated Linux News 0 10-24-2013 03:40 AM
How to learn to compile from source with dependencies and libraries needed? askjoe Linux - Newbie 8 10-05-2012 04:02 PM
looking for a tutorial to learn how to compile module etc addic Linux - General 2 03-18-2011 09:47 AM
Learn How To Compile The Linux Kernel AwesomeMachine Linux - Newbie 18 02-13-2010 03:12 PM
Learn to compile before or after I choose a second distro? linuxpokernut Linux - Newbie 6 10-09-2007 04:56 AM


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