texlive-20260301-source

#### Beyond Linux® From Scratch (System V Edition) - Version r13.1-84

### Chapter 51. Typesetting

- Prev

  install-tl-unx

- Next

  asymptote-3.14

- Up
- Home

# texlive-20260301-source

## Introduction to TeX Live from source

### Note

According to https://www.tug.org/historic/ the master site in Germany only supports rsync, but that page has links to mirrors, which support https. If you prefer to use a different mirror from the example links here, you will need to navigate to systems/texlive/2026.

Most of TeX Live can be built from source without a pre-existing installation, but xindy (for indexing) needs working versions of latex and pdflatex when configure is run, and the test suite and install for asy (for vector graphics) will fail if TeX has not already been installed. Additionally, biber is not provided within the texlive source and the version of dvisvgm in the texlive tree cannot be built if shared system libraries are used.

All of those packages are dealt with on their own pages and can be built after installing this package. If you have not already done so, you should start at Setting the PATH for TeX Live so that the final commands to initialize the new installation will be found.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2026/texlive-20260301-source.tar.xz

- Download MD5 sum: 734e2521173e8ef6a4c04f70d1285124

- Download size: 95 MB

- Estimated disk space required: 10.3 GB including the additional downloads and the tests, 9.2 GB installed

- Estimated build time: 4.0 SBU including the additional downloads and the tests, building with parallelism=4

### Required Additional Downloads

Much of the texlive environment (including scripts, documentation, fonts, and various other files) is not part of the source tarball. You must download it separately. This will give you all of the additional files which are provided by a full install of the binary version, as there is no realistic way to restrict which parts get installed.

Because of the size of this package, it is unlikely to be mirrored by BLFS mirrors. If you are unable to download the files for this package, go to https://www.tug.org/historic/ to find a more accessible mirror (see the note above).

- Download (HTTP): https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2026/texlive-20260301-texmf.tar.xz

- Download MD5 sum: 0a953c929116392047950b93a8bb96d1

- Download size: 4.6 GB

The tlpdb database is shipped as a separate tarball. The texdoc program needs a cache file derived from this (and will create the cache on its first run).

- Download (HTTP): https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2026/texlive-20260301-extra.tar.xz

- Download MD5 sum: e4103c7087dd5cd11edb62028a7fafba

- Download size: 2.0 MB

### TeX Live from source Dependencies

#### Recommended

a graphical environment

The source ships with its own versions of many libraries, and will use them unless it is forced to use the system versions. The following are recommended so that the system version will be used: Cairo-1.18.4, Fontconfig-2.18.3, FreeType-2.14.3, Graphite2-1.3.14, harfBuzz-14.4.0 (built with graphite2 enabled), ICU-78.3, libpaper-2.2.8 (used by at least context and xelatex), and libpng-1.6.58

Furthermore, the instructions below assume you are using the layout described in Setting the PATH for TeX Live.

#### Optional

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

Python2 is used by the unmaintained ebong CTAN module (intended for writing Bengali in Rapid Roman Format). `/usr/bin/python` is also in the shebang line for the latex-papersize and lilyglyphs scripts, and documentation at CTAN says both modules have been updated to work with python3. In pythontex there are scripts to invoke python3 or python2 according to the system's version of python. Ruby-4.0.6 is used by two scripts, one is for pTex (Japanese vertical writing) and the other is match_parens which might be generally useful. The perl module Tk, which needs to be run from an X11 session to run the tests and requires Tk-8.6.18, is used by one of the scripts for ptex and is needed for texdoctk (a GUI interface for finding documentation files and opening them with the appropriate viewer). ps2pdf, from ghostscript-10.07.1, is used by some utilities and scripts.

## Installation of TeX Live

Install TeX Live by running the following commands:

### Caution

If you wish to upgrade to current texlive on an older system where extra packages (asymptote, dvisvgm, or xindy) have been installed, you will need to reinstall those as well as fixing up your `PATH` for `$TEXLIVE_PREFIX`.

### Note

A successful install requires some texlive commands to be run as the root user, so we will export the TEXARCH variable to let `root` use it.

Now, as a normal user:

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

    mkdir texlive-build &&
    cd    texlive-build &&

    ../configure CXX="g++ -std=gnu++17" -C            \
        --prefix=$TEXLIVE_PREFIX                      \
        --bindir=$TEXLIVE_PREFIX/bin/$TEXARCH         \
        --datarootdir=$TEXLIVE_PREFIX                 \
        --includedir=$TEXLIVE_PREFIX/include          \
        --infodir=$TEXLIVE_PREFIX/texmf-dist/doc/info \
        --libdir=$TEXLIVE_PREFIX/lib                  \
        --mandir=$TEXLIVE_PREFIX/texmf-dist/doc/man   \
        --disable-native-texlive-build                \
        --disable-static --enable-shared              \
        --disable-dvisvgm                             \
        --with-system-cairo                           \
        --with-system-fontconfig                      \
        --with-system-freetype2                       \
        --with-system-gmp                             \
        --with-system-graphite2                       \
        --with-system-harfbuzz                        \
        --with-system-icu                             \
        --with-system-libpaper                        \
        --with-system-libpng                          \
        --with-system-mpfr                            \
        --with-system-pixman                          \
        --with-system-zlib                            \
        --with-banner-add=" - BLFS" &&

    make

To test the results, issue: make -k check. One test, `psutils.test`, is known to fail if using system libpaper because TeX Live includes old versions of both psutils and libpaper which result in a difference in the final decimal places of the psresize test. The libpaper developer does not think this is significant.

Now, as the `root` user:

    make install-strip &&
    make texlinks      &&
    mkdir -pv                                $TEXLIVE_PREFIX/tlpkg/TeXLive/ &&
    install -v -m644 ../texk/tests/TeXLive/* $TEXLIVE_PREFIX/tlpkg/TeXLive/ &&
    tar -xf ../../texlive-20260301-extra.tar.xz -C $TEXLIVE_PREFIX/tlpkg --strip-components=2

### Note

Only run make texlinks once. If it is run again, it can change all the program symlinks so that they point to themselves and are useless.

Now install the additional files as the `root` user:

    tar -xf ../../texlive-20260301-texmf.tar.xz -C $TEXLIVE_PREFIX --strip-components=1

Still as the `root` user, initialize the new system (the command fmtutil-sys --all will produce a lot of output):

    mktexlsr &&
    fmtutil-sys --all

To allow Evince-48.4 or dvisvgm-3.6.1 to link to `libkpathsea.so`, as the `root` user (re)create a symlink from `/usr/lib`:

    ln -svf $TEXLIVE_PREFIX/lib/libkpathsea.so{,.6} /usr/lib

To allow xdvi to appear in desktop menu, it is necessary to create a symlink from `/usr/share/applications`. As the `root` user:

    ln -svf $TEXLIVE_PREFIX/applications/* /usr/share/applications

### Note

TeX Live does not include the source for ConTeXt, only the items that are at CTAN. Trying to build ConTeXt purely from source on a BLFS TeX Live system is a niche usage and looks as if it will be more trouble than it is worth.

If you wish to use ConTeXt with luametatex (most of the old MKII and MKIV code was removed from TeX Live 2023 by the ConTeXt developer), starting with the binary (only installing ConTeXt, 753 MB in March 2024) would probably be the easiest way to bootstrap it. The source for luametatex can be pulled with git from github luametatex, compiled with meson and ninja, and installed by copying to the correct program directory. This should avoid having to fix all the symlinks etc and also avoid including the many unrelated parts of texmf-dist. See comments 1 to 5 of #17823.

You can now proceed to asymptote-3.14, biber-2.22, dvisvgm-3.6.1 and / or xindy-2.5.1 if you wish to install them.

## Command Explanations

`CXX="g++ -std=gnu++17"`: the texlive build system defaults to the C++11 standard for C++, but some system packages require the C++17 standard. This switch allows using this standard.

`-C`: creates config.cache, which saves significant time in a parallel build.

`--prefix=`, `--bindir=`, `--datarootdir=`, and other “dir” switches: 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 and include files will be within the directories for this year's texlive.

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

`--enable-shared`: Use shared versions of `libkpathsea`, `libptexenc`, `libsynctex`, `libtexlua52` and `libtexluajit`.

`--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.

`--disable-dvisvgm`: As noted above, the shipped version of dvisvgm, which has modified configuration files, cannot be built with shared system libraries.

make texlinks : this runs the texlinks.sh script to create symbolic links from formats to engines. In practice, several of the targets such as xetex are now separate binaries and for these it will report "file already exists".

tar -xf texlive-20260301-texmf.tar.xz -C $TEXLIVE_PREFIX --strip-components=1: this tarball contains the files for the texmf-dist directory, and because of its size we do not want to waste time and space untarring it and then copying the files.

install -v -m644 ../texk/tests/TeXLive/* $TEXLIVE_PREFIX/tlpkg/TeXLive/: This puts the perl modules `TLConfig.pm` and `TLUtils.pm` into the directory where the binary installer puts them - it is at the start of the perl @INC@ PATH within texlive when installed using the above configure switches. Without these modules, texlive is unusable.

mktexlsr: Creates an `ls-R` file which lists what was installed - this is used by kpathsea to find files.

fmtutil-sys --all: This initializes the TeX formats, Metafont bases and Metapost mems.

`--without-x`: Use this option if you do not have Xorg installed.

There are many other '--disable' or '--without' options. Some of them such as `--without-texinfo` are accepted but no longer do anything, others will prevent a program being built - but the far greater amount of space used for the related items in texmf means there is no obvious benefit from disabling a few of the programs.

## Contents

Installed Programs: Over 300 binaries and symlinks to scripts
Installed Libraries: libkpathsea.so, libptexenc.so, libsynctex.so, libtexlua53.so, libtexluajit.so
Installed Directories: $TEXLIVE_PREFIX/applications, $TEXLIVE_PREFIX/bin, $TEXLIVE_PREFIX/include, $TEXLIVE_PREFIX/lib, $TEXLIVE_PREFIX/texmf-dist, $TEXLIVE_PREFIX/texmf-var, and $TEXLIVE_PREFIX/tlpkg

### 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 various html, man, or pdf files within the subdirectories of `2026/texmf-dist/`. Using texdoc pdflatex ( replace pdflatex with the command name ) may also be useful
`libkpathsea.so` | (kpathsearch) exists to look up a file in a list of directories and is used by kpsewhich
`libptexenc.so` | is a library for Japanese pTeX (publishing TeX)
`libsynctex.so` | is the SyncTeX (Synchronize TeXnology) parser library
`libtexlua53.so` | provides Lua 5.3, modified for use with LuaTeX
`libtexluajit.so` | provides LuaJIT, modified for use with LuaJITTeX

- Prev

  install-tl-unx

- Next

  asymptote-3.14

- Up
- Home