9 Building on a new Unix platform

If you have a platform for which we have not created executables, 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 in the distribution.

9.1 Prerequisites

You will need at least 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. We recommend the GNU version of these programs (gcc, GNU make, m4, flex, bison). 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.

Also, the command uname must return a sensible value.

9.2 Configuration

To begin, perform a normal installation of TeX Live to your disk (see section 3.2 on p. 20). You may wish to skip installing any of the prebuilt binaries.

Then, unpack the source from the compressed tar file in the directory source to your disk and change directory to where you placed it.

Next, run configure with a command line like this:


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

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

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

If you want to leave out the $PLATFORM directory level, i.e., put the binaries directly into $TEXDIR/bin, specify the --disable-multiplatform option to configure.

Have a look at the output of ./configure --help for more options you can use. For example, you can skip building of Omega and e-TeX.

9.3 Running make

Make sure the shell variable or option noclobber is not set. Then, run the main make like this:


> make world
and relax. . .

Alternatively, you want to log all the output, as in:


> sh -c "make world >world.log 2>&1" &

Before you believe that everything went ok, please check the log file for errors: GNU make always uses the string ‘***’ whenever a command fails. Also, check if all the programs were built:


> cd TEXDIR/bin/archname
> ls | wc
The result should be over 200 (you can check the exact number with the bin directory contents in the distribution).

If you need special privileges for make install, you can separate the ‘make world’ into two different runs, like this:


> make all
> su
> make install strip

After you’ve installed your new binaries, you should follow the normal post-installation procedures, given in section 4 on p. 29.