texlive-20200406-source
Introduction to TeX Live from source
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 testsuite 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 initialise the new installation will
be found.
This package is known to build and work properly using an LFS-10.0
platform.
Package Information
-
Download (FTP):
ftp://tug.org/texlive/historic/2020/texlive-20200406-source.tar.xz
-
Download MD5 sum: a5d992e3cb8554ce92c55adde03958ba
-
Download size: 53 MB
-
Estimated disk space required: 8.5 GB including the
additional download and the tests, 6.4 GB installed
-
Estimated build time: 5.8 SBU including the additional
download 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, 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. In case of difficulty, go to
http://www.ctan.org/mirrors/ to find a more-accessible mirror.
From the 2019 year, the tlpdb database of the packages within
texlive is no-longer installed with the source. But texdoc needs a cache file derived
from this (and will create the cache on its first run).
TeX Live from source Dependencies
Recommended
ghostscript-9.52 including libgs.so
, X Window
System
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: Fontconfig-2.13.1, FreeType-2.10.2, GC-8.0.4, Graphite2-1.3.14, HarfBuzz-2.7.1 (built with graphite2 enabled),
ICU-67.1, libpaper-1.1.24+nmu5 (used by at least
context and xelatex), and libpng-1.6.37,
also Poppler-20.08.0 (only used if suitable file
versions are available in texk/web2c/pdftexdir
)
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
Python-2.7.18 is used by many scripts.
Ruby-2.7.1 is used by some scripts, mostly within
mtx_context which is part of conTeXt, but also for one or two others, such
as match_parens, which are generally useful. The perl module
Tk, which needs to be run from an X11 session to run the tests
and requires Tk-8.6.10, is used by one of the scripts for ptex
(Japanese vertical writing), can be used by a conTeXt texfind
script, and is needed for texdoctk (a GUI interface for finding
documentation files and opening them with the appropriate viewer).
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/texlive
Installation of TeX Live
Install TeX Live by running the following commands:
Caution
The instructions here for dealing with poppler will only work with versions of
poppler used in BLFS-9.1 and later, i.e. poppler >= 0.83.0. If
you wish to upgrade an older system, there are versions of
pdftoepdf{,-poppler*}.cc
and
pdftosrc{,-newpoppler,-poppler*}.cc
in texk/web2c/pdftexdir
. You should
establish which version of poppler is installed and use the appropriate
versions of these files.
Similarly, if you wish to upgrade to current texlive on an older system where extra
packages (asymptote.
biber, dvisvgm or xindy) have been installed, you will need to
reinstall those as well as fixing up your PATH
for /opt/texlive/2020
.
The shared libraries will be installed into a texlive directory. As
the root
user, add it to your
/etc/ld.so.conf
:
cat >> /etc/ld.so.conf << EOF
# Begin texlive 2020 addition
/opt/texlive/2020/lib
# End texlive 2020 addition
EOF
TexLive ships with a very old
version of poppler, and some
updated files for newer versions. To use the system version, first
identify it and then copy the correct versions of the updated files
(please read the Caution above):
SYSPOP= &&
MYPOPPLER_MAJOR=$(pkg-config --modversion poppler | cut -d '.' -f1)
if [ "$MYPOPPLER_MAJOR" = "0" ]; then
# if major was >=20, minor could start with 0 and not fit in octal
# causing error from 'let' in bash.
let MYPOPPLER_MINOR=$(pkg-config --modversion poppler | cut -d '.' -f2)
else
# force a value > 85
let MYPOPPLER_MINOR=99
fi
if [ "$MYPOPPLER_MINOR" -lt 85 ]; then
# BLFS-9.1 uses 0.85.0, ignore earlier versions in this script.
# If updating texlive on an older system, review the available
# variants for pdftoepdf and pdftosrc to use system poppler.
SYSPOP=
else
SYSPOP="--with-system-poppler --with-system-xpdf"
if [ "$MYPOPPLER_MINOR" -lt 86 ]; then
mv -v texk/web2c/pdftexdir/pdftoepdf{-poppler0.83.0,}.cc
else # 0.86.0 or later, including 20.08.0.
mv -v texk/web2c/pdftexdir/pdftoepdf{-poppler0.86.0,}.cc
fi
# For pdftosrc BLFS-9.1 uses 0.83.0 and that is the latest variant.
mv -v texk/web2c/pdftexdir/pdftosrc{-poppler0.83.0,}.cc
fi &&
export SYSPOP &&
unset MYPOPPLER_{MAJOR,MINOR}
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 \
--prefix=/opt/texlive/2020 \
--bindir=/opt/texlive/2020/bin/$TEXARCH \
--datarootdir=/opt/texlive/2020 \
--includedir=/opt/texlive/2020/include \
--infodir=/opt/texlive/2020/texmf-dist/doc/info \
--libdir=/opt/texlive/2020/lib \
--mandir=/opt/texlive/2020/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-libgs \
--with-system-libpaper \
--with-system-libpng \
--with-system-mpfr \
--with-system-pixman \
${SYSPOP} \
--with-system-zlib \
--with-banner-add=" - BLFS" &&
make &&
unset SYSPOP
To test the results, issue: make -k
check. One of the Kpathsea tests will fail because
BLFS uses system libraries.
Now, as the root
user:
make install-strip &&
/sbin/ldconfig &&
make texlinks &&
mkdir -pv /opt/texlive/2020/tlpkg/TeXLive/ &&
install -v -m644 ../texk/tests/TeXLive/* /opt/texlive/2020/tlpkg/TeXLive/ &&
tar -xf ../../texlive-20200406-tlpdb-full.tar.gz -C /opt/texlive/2020/tlpkg
Note
Only run make
texlinks once. If it is rerun, 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-20200406-texmf.tar.xz -C /opt/texlive/2020 --strip-components=1
Still as the root
user, initialise
the new system (the commands fmtutil-sys --all and
mtxrun --generate
will produce a lot of
output):
mktexlsr &&
fmtutil-sys --all &&
mtxrun --generate
You can now proceed to asymptote-2.67, biber-2.14, dvisvgm-2.10 and / or
xindy-2.5.1 if you wish to install them.
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 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.
--without-x
: use this if you do not
have Xorg installed.
/sbin/ldconfig: this
has to be run here so that make
texlinks can use kpsewhich.
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-20200406-texmf.tar.xz
-C /opt/texlive/2020 --strip-components=1: the
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/*
/opt/texlive/2020/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: Create 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.
mtxrun --generate:
This initializes the ConTeXt system.
Contents
Installed Programs:
Over 300 binaries and symlinks to
scripts
Installed Libraries:
libkpathsea.so, libptexenc.so,
libsynctex.so, libtexlua52.so, libtexluajit.so
Installed Directories:
/opt/texlive/2020/bin,
/opt/texlive/2020/include, /opt/texlive/2020/lib,
/opt/texlive/2020/texmf-dist
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 2020/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.
|
libtexlua52.so
|
provides Lua 5.2, modified for use with LuaTeX.
|
libtexluajit.so
|
provides LuaJIT, modified for use with LuaJITTeX.
|
Last updated on 2020-08-17 09:13:28 -0700