Previous Section  < Day Day Up >  Next Section

Recipe 4.2. Preparing Your System for Compiling Programs from Sources

4.2.1 Problem

You know you need a compiler and maybe some other utilities to be able to compile programs from sources, but you're not sure exactly what.

4.2.2 Solution

There are two categories of programs that you will need:

  • Essential development tools common to all Linux systems

  • Specific libraries or utilities for whatever program you are compiling

Here is a list of the common Linux development tools:


GNU coreutils

This is a large collection of essential system utilities: shellutils, fileutils, and textutils. See http://www.gnu.org/software/cororeutils/ for a complete listing, or info coreutils.


GNU binutils

Utilities for doing things to binary files (http://www.gnu.org/software/binutils/).


gcc

GNU compiler collection, containing C, C++, Objective-C, Fortran, Java, and Ada, and libraries for these languages.


GNU tar

Archiving utility for source tarballs; these end in .tar.


gunzip

Compression utility often paired with tar. These end in .tar.gz.


bunzip2

A super-compression format for packing and unpacking tarballs; these end in .bz2.


make

This does the work of reading your configuration options and building the actual program files.

The documentation for the application you are building will tell you everything that it needs to build successfully.

4.2.3 Discussion

Most Linux distributions have an installation option for "Core Development Tools," or some such, so you don't have to hunt down and install them individually.

You'll need to read the documentation for the application you are building to find out any requirements specific to the program. Look for README, INSTALL, and other documentation in the source tarball. Read everything. When you run the configure script, it will check your system to see if all the required elements are present. If anything is missing, it will exit with errors, and tell what you need.

4.2.4 See Also

  • Chapter 14 of LPI Linux Certification in a Nutshell by Jeff Dean (O'Reilly)

    Previous Section  < Day Day Up >  Next Section