Introduction to TeX Live from source

After installing a partial TeX build (or alternatively installing the binary version), here we will build all of TeX Live from source (except biber which is not supplied in the source tarball and will be dealt with separately).

This package is known to build and work properly using an LFS-7.6 platform.

Package Information

TeX Live Dependencies


Either texlive-20140525-source pass 1 or install-tl-unx , and Clisp-2.49 (to build xindy which is an index processor for multi-lingual index creation)



The source ships with its own versions of several libraries which are either not under active development, or only used for limited functionality. If you install these, as with some other optional dependencies in this book you will need to tell configure to use the system versions. GD, t1lib, ZZIPlib, TECkit

Runtime dependencies

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/texlive

Installation of TeX Live

If you started with the binary installer, these instructions will overwrite the programs it installed.

export TEXARCH=$(uname -m | sed -e 's/i.86/i386/' -e 's/$/-linux/') &&
mkdir texlive-build &&
cd texlive-build    &&

../configure                                        \
    --prefix=/opt/texlive/2014                      \
    --bindir=/opt/texlive/2014/bin/$TEXARCH         \
    --datarootdir=/opt/texlive/2014                 \
    --includedir=/usr/include                       \
    --infodir=/opt/texlive/2014/texmf-dist/doc/info \
    --libdir=/usr/lib                               \
    --mandir=/opt/texlive/2014/texmf-dist/doc/man   \
    --disable-native-texlive-build                  \
    --disable-static --enable-shared                \
    --with-system-cairo                             \
    --with-system-fontconfig                        \
    --with-system-freetype2                         \
    --with-system-graphite2                         \
    --with-system-harfbuzz                          \
    --with-system-icu                               \
    --with-system-libgs                             \
    --with-system-libpng                            \
    --with-system-pixman                            \
    --with-system-poppler                           \
    --with-system-xpdf                              \
    --with-system-zlib                              \
    --with-banner-add=" - BLFS"                     \
    --enable-xindy                                  \
    --enable-xindy-rules                            \
    --enable-xindy-doc                              \

Asymptote has to be separately configured. It ships with its own copy of the gc source tarball, and will only use the system version if that local source is removed.

pushd ../utils/asymptote &&
rm -v gc-7.4.0.tar.gz &&

echo "ac_cv_lib_m_sqrt=yes"     >config.cache &&
echo "ac_cv_lib_z_deflate=yes" >>config.cache &&

./configure LIBS="-ltirpc "                         \
    --prefix=/opt/texlive/2014/                     \
    --bindir=/opt/texlive/2014/bin/$TEXARCH     \
    --enable-texlive-build                          \
    --datarootdir=/opt/texlive/2014/texmf-dist      \
    --infodir=/opt/texlive/2014/texmf-dist/doc/info \
    --mandir=/opt/texlive/2014/texmf-dist/doc/man   \
    --cache-file=config.cache && &&
popd &&
unset TEXARCH &&

make &&
make -C ../utils/asymptote

To test the results, issue: make -k check && make -C utils/asymptote check.

If you have used the binary installer, you will want to do a full install. As the root user:

make install &&
make -C ../utils/asymptote install

For people who have followed the LFS way and built from source, it is only necessary to install xindy and asy, so, as the root user:

make -C utils/xindy install &&
make -C ../utils/asymptote install

One part of the package remains to be rebuilt: biber-1.9.

Command Explanations

--prefix=, --bindir=, --datarootdir=, --infodir=, --mandir= ... : these switches ensure that the files installed from source will overwrite any corresponding files previously installed by install-tl-unx so that the alternative methods of installing texlive are consistent..

--includedir=, --libdir= ... : these switches ensure that the libraries will be found at runtime, and that programs can be compiled against them.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-shared: Use shared versions of libkpathsea and libptexenc.

--with-system-...: Unless this parameter is used, the included versions of these libraries will be statically compiled into the programs which need them. If you decided not to install a recommended library, omit the corresponding switch.

--with-system-xpdf: Uniquely, this parameter has a non-standard meaning, it tells configure to use the system-installed poppler headers and library. Again, omit this if you have not installed poppler.

echo "ac_cv_lib_m_sqrt=yes" ... LIBS="-ltirpc " >config.cache, ... --cache-file=config.cache : The configure scripts in TeX Live are uncommon. Asymptote not only has to be separately configured and built, the configure script fails to find the shared libtirpc.so. Passing that in LIBS breaks the tests for (static) libm and (shared) libz, so we have to fix things up, in much the same way as when cross-compiling.

--without-x: use this (and omit the configure and make in utils/asymptote if you do not have Xorg installed.


Installed Programs: Over 300 binaries and symlinks to scripts
Installed Libraries: libkpathsea.so, libptexenc.so
Installed Directories: /opt/texlive, /usr/include/kpathsea, /usr/include/ptexenc

Short Descriptions

TeX programs

The programs included in TeX are too numerous to individually list. Please refer to the individual program HTML and PDF pages in the installation directory's 2014/doc.html file, or the various html, man, or pdf files within the subdirectories of 2014/texmf-dist/.


(kpathsearch) exists to look up a file in a list of directories.


is a library for Japanese pTeX (publishing TeX).

Last updated on 2014-10-24 23:59:55 +0000