Help: assistance needed to understand installing applications from source (any Gentooers listening?)

Forum: LXer Meta ForumTotal Replies: 14
Author Content

Mar 14, 2006
6:32 PM EDT
While i have in the past successfully installed some applications from source using:



and make install (as root / su / sudo) when difficulty arises the Howtos confuse me more than enlighten. Hence, would anyone care to root out some ignorance in this head as your service to Humanity?

I assure you too, others will be watching.

Mar 14, 2006
6:46 PM EDT
Short answer:

more README && less INSTALL

Anything specific? BTW, shouldn't emerge be all you need for Gentoo, generally?

Mar 14, 2006
7:33 PM EDT
Nice answer, grouch. 8^)

Herschel: There is really not an easy answer to your question beyond reading the README and INSTALL instructions for the package you are trying to install. The information provided with any given package can vary considerably. If you want to know the inner workings of make, I'm afraid there is no avoiding digging your heels in and reading about it in the HOWTO's, man pages, etc.

I have not used Gentoo, but plan to check it out, if for no other reason than to have more knowledge under my belt. Personally, I prefer Debian or Debian-based distros (MEPIS, Ubuntu, Kanotix, etc.) because the Debian package management is superior to anything else I have used. In the rare event I can't find what in the Debian repositories, I have no problem using the *.tar.gz packages...but I ALWAYS read the INSTALL and README before proceeding.

Mar 15, 2006
4:52 AM EDT
I use Gentoo on a couple of machines. Are you sure that your package isn't available through Portage? Most are. If it is, at the CLI simply type...

emerge packagename

This will download the source, compile it, install and configure the package.

What is the package?

Mar 15, 2006
5:02 AM EDT

Gentoo is Debian based.

Mar 15, 2006
6:42 AM EDT
Sorry guys - been busy. Let's start small:

Just the configure portion, once you have dumped the files and directories into a directory just beneath where the compressed file landed. One runs ./configure (as a regular user and supposedly the make too as a regular gent)

What is this program doing? Creating the configuration files for the program - anything else? One of the options seems to be to direct the application to a particular directory, that seems more appropriate in the make step, what am I missing?

Reading those files manytimes for me is an exercise in futility - because there are so many tacit assumptions made by the writers of knowledge the reader has that I do not think I possess.

NoDough, I am not sure of others, I actually like to understand what is happening. That's why I am attracted to both Unix and Linux whereas the Mac leaves me cold and uninterested. Fine, it works, but how and why?

Mar 15, 2006
7:31 AM EDT
Herschel, the 'configure' process, generally speaking, is looking at your compiler, the libraries you have installed, the hardware, etc. to make sure that you have what is necessary to run the package. It also sets up the build parameters to work with your hardware and software.

'make' actually builds the binary exectuables.

'install' puts the files in the proper location (usually), creates links, sets permissions, etc.

This is all generally true. However, each developer implements the steps a little differently.

The 'emerge' process combines all these and more. I started to educate myself on emerge some time ago and realized that I just don't have that much spare time. :-)

Mar 15, 2006
8:05 AM EDT

Try this:

./configure --help > configurehelp

And then:

less configurehelp

In almost all cases, that will generate a text file giving you the complete list of options for 'configure'. It's handier for me than just piping the output through 'less'.

Mar 15, 2006
10:08 AM EDT
NoDough - nice explanation, more than I knew previously. Makes me more comfortable.

How about this, why am I sometimes effectively stopped at the make step when I am not root? Afterwards I have to worry about rights that sometimes do not get done correctly.

grouch - I know less is more, but I think I will just drop it into my editor and read. Thanks.

Mar 15, 2006
10:20 AM EDT
You're stopped from installing in any directory for which you do not have write permission. This is a good thing. It should require extra effort to do things that may damage your system. Typically, 'make' and 'make install' are two separate operations. 'make' should build the binaries within your current directory. 'make install' (typically) requires root power in order to install those binaries and libraries in their final destination directories, such as /usr/local/bin and /usr/local/lib.

Don't be afraid to look through the Makefile.

Hope you're not short-cutting your distribution's package management tools unnecessarily.

Mar 15, 2006
11:02 AM EDT
No Dough: Gentoo is Debian-based? From everything I have read, my understanding was that it is its own distro, and its trademark is that everything is compiled from source (with installation options to install binaries to save time, if you wish). Nothing I have read about it indicates that it has any relationship with Debian. Sure, you may be able to install apt and use Debian packages, but Debian-based?

Have I misunderstood?


Mar 15, 2006
11:07 AM EDT
Herschel, Grouch's explanation is dead-on.

In the Windows world, users get really testy when they find that IT hasn't given them administrator rights on their PCs. They want to be able to install software and change hardware settings freely because that's the way it was in DOS/Win95/Win98/WinME.

In the Unix/Linux world, those rights are (almost) never bestowed on end users. If you want to change the system or install software, then you have to declare yourself the god of the system to do it (login as root.)

I say 'almost' because there is one exception I know of -- Linspire.

Mar 17, 2006
5:00 AM EDT
tuxtom: Technically, one could argue that Gentoo is no longer Debian based because the apt system has been replaced by portage, and apt is the essence of Debian. However, Gentoo did start with Debian.

You may also have an arguable point in that I believe Gentoo now stands on its own and does not inherit from new Debian releases. However, I may be wrong on this point.

From this link:
Quoting:Gentoo's History

It all began with Extra Time. Time to explore, Time to discover, Time to experiment. That's how the creator of Gentoo, Daniel Robbins stepped into the world of Linux. He started with Debian Linux,...

Note also that the link referenced is somewhat ambiguous as to whether Debian was just an 'experience' for Mr. Robbins, or whether it formed the base of Gentoo. There's certainly room to argue both ways.

Mar 17, 2006
5:04 AM EDT
Hmmm. I must've breezed over this part.

Quoting:After a period of time and due to certain issues, he moved on and decided that he would create his own distribution.

Thus, Enoch was born.

It appears that tuxtom was correct. Which makes me... oh, nevermind.

May 07, 2006
11:48 PM EDT

Here's a fervent Gentoo user, and as far as I know, there isn't a similar base between Gentoo and Debian. Gentoo is a meta Linux distribution, and if it is anything-based at all, please call it "LFS" (Linux From Scratch)/FreeBSD (for the packet manager) based.

I almost never use '.configure' and 'make' in Gentoo, since portage takes care of this things for me. Moreover, portage does more: -It checks if the software you want to install is found stable. If not, it says so (a message about "keywords", meaning it's not that well tested and can contain bugs, or a message about 'masked' if it is seriously unsafe or damaged) -It checks if dependencies are met. If not, it fulfils these by installing the right versions of the dependencies first. -It automatically downloads your stuff, using your preferred mirrors if you set any, -It checks the md5sums of what you downloaded, -It patches things. Most packages have Gentoo-patches which can't be found in other distro's. The gentoo-kernel (package is called gentoo-sources) is a nice example. -It configures the packages according to your USE-flags. USE flags (like gnome support or so) are passed as configure options to ./configure most of the time. -It compiles the packages using your compiler optimization flags, -It installs packages in the dirs Gentoo specified for it. Please note, this can be other dirs than on other distributions! Therefore, if using 'make install', things may go to so far empty dirs (for example, /usr/local/bin is never used in Gentoo, except for scripts made by the user), which makes a mess of your installation -Temporary configuration files in /etc are made. They aren't automatically replaced, since you could loose your old configs. Therefore, you can use etc-update, a tool most distributions seem to lack (as far as I know). etc-update lets you use the old / new file, or merge the two files into one. -Portage sometimes provides you with some usage messages, like commonly made mistakes, -If all is done, the package is recorded in 'world'. If that's done, any package can be unmerged with "emerge -C {{package}}", and you can get info about that package with some portage tools like equery (which is in gentoolkit) or genlop. -After that, portage unmerges older versions of the same packages, and 'updates cache', though I don't know what the latter means.

As you see, it's a very bad, and a (bit of a) stupid idea, to install things on your own if they are available in portage, looking at all the stuff which doesn't happen if you install it on your own.

Nonetheless, I sometimes have to use it, but not much more than one time in 300 packages I believe.

Please look under "Gentoo System Documentation" at

The first three items, starting with "A Portage Introduction", are documentation pages of portage. If you want to know what's happening if portage is running, look there.

Note that if you search for a package, you should use 'emerge -s {{yoursearch}}'. {{yoursearch}} (without the braces of course) may be a regular expression.

Posting in this forum is limited to members of the group: [Editors, MEMBERS, SITEADMINS.]

Becoming a member of LXer is easy and free. Join Us!