6 Building on a new Unix platform

If you have a platform for which we have not provided binary sources, you will need to compile TeX and friends from scratch. This is not as hard as it sounds. What you need is all in the directory source on the CD-ROM.

You should first install the support tree from the TeX Live CD-ROM (do a basic install, with no system binaries chosen).

6.1 Prerequisites

You will need about 100 megabytes of disk space to compile all of TeX and its support programs. You’ll also need an ANSI C compiler, a make utility, a lexical scanner, and a parser generator. The GNU utilities (gcc, GNU make, m4, Æex, bison) are the most widely tested on different platforms. gcc-2.7.* Æex-2.4.7 and GNU make-3.72.1 or newer should work well. You may be able to work with other C compilers and make programs, but you will need a good understanding of building Unix programs to sort out problems. The command uname must return a sensible value.

6.2 Configuration

First, unpack the source from the compressed tar file in the directory source to your disk and change directory to where you placed it. Decide where the ‘root’ of the installation will be, e.g. /usr/local or /usr/local/TeX. Obviously you should use the same location that you specified when you installed the support tree.

Now, start the build process by running conøgure with a command-line like


>> ./configure -prefix=/usr/local/TeX

The ‘prefix’ directory is the one where you installed the support tree; the directory layout that will be used is as follows (where $TEXDIR stands for the directory you chose):

$TEXDIR/man Unix manual pages
$TEXDIR/share/texmf main tree with fonts,
macros, etc
$TEXDIR/info GNU style info manuals
$TEXDIR/bin/$PLATFORM binaries

You can omit the use of ‘share/’ part for the texmf directory if you want, as $TEXDIR/share/texmf and $TEXDIR/texmf are auto-detected by configure. If you choose something different, you have to specify that directory with the --datadir option of conøgure.

If you want to leave out the $PLATFORM directory level (i.e. put the binaries directly into $TEXDIR/bin), specify the --disable-multiplatform option for conøgure.

Have a look at the output of ./configure help for more options you can use (such as omitting optional packages such as Omega or e-TeX).

6.3 Running make

Make sure the shell variable noclobber is not set, and then type

>> make world
and relax. . . .

It could also be useful to log all the output, e.g. by typing


>> sh -c "make world >world.log 2>&1" &
Before you think that everything is ok, please check the log file for errors (GNU make always uses the string “Error:” whenever a command returns an error code) and check if all binaries are built:

>> cd /usr/local/TeX/bin/i686-pc-linux-gnu
>> ls | wc
The result should be 209.

If you need special privileges for make install, you can run two make jobs in separate runs:


>> make all
>> su
>> make install strip

6.4 Final configuration steps

Set up your PATH to include the directory containing the just-installed binaries (e.g. /usr/local/TeX/bin/mips-sgi-irix6.5); similarly, MANPATH and INFOPATH to include the relevant newly installed subdirectories, i.e. $TEXDIR/man and $TEXDIR/info.

The program texconøg allows you to set the defaults for hyphenation, paper size, print command, METAFONT mode, etc. You can run this command interactively and see what options it offers, or type


>> texconfig help

For example, if you are not using A4 format paper, you can make ‘lettersize’ the default using:


>> texconfig dvips paper letter
>> texconfig xdvi paper us