%general-entities; ]> texlive-&texlive-version;-source texlive Introduction to TeX Live from source According to the master site in France only supports ftp and rsync. Now that ftp is generally deprecated, that page has links to mirrors, some of which support https, e.g. in Utah and Chemnitz as well as in China. If you prefer to use a different mirror from the example links here, you will need to navigate to systems/historic/texlive/&texlive-year; or systems/texlive/&texlive-year; as the case may be. 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 so that the final commands to initialize the new installation will be found. &lfs120_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &texlive-md5sum; Download size: &texlive-size; Estimated disk space required: &texlive-buildsize; Estimated build time: &texlive-time; 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. Download (HTTP): Download (FTP): Download MD5 sum: &texlive-texmf-md5sum; Download size: &texlive-texmf-size; 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). Download (HTTP): Download (FTP): Download MD5 sum: &texlive-tlpdb-md5sum; Download size: &texlive-tlpdb-size; Required patch: TeX Live from source Dependencies Recommended Furthermore, the instructions below assume you are using the layout described in . Optional Runtime dependencies Installation of TeX Live Install TeX Live by running the following commands: 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 $TEXLIVE_PREFIX. 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/') && patch -Np1 -i ../texlive-&texlive-version;-source-security_fix-1.patch && mkdir texlive-build && cd texlive-build && ../configure -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-libgs \ --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. Two tests, psutils.test and eptexdir/wcfname.test are known to fail. Now, as the root user: make install-strip && /sbin/ldconfig && make texlinks && mkdir -pv $TEXLIVE_PREFIX/tlpkg/TeXLive/ && install -v -m644 ../texk/tests/TeXLive/* $TEXLIVE_PREFIX/tlpkg/TeXLive/ && tar -xf ../../texlive-&tex-tlpdb-version;-tlpdb-full.tar.gz -C $TEXLIVE_PREFIX/tlpkg 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-&texmf-version;-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 or to link to libkpathsea.so, as the &root; user (re)create a symlink from /usr/lib: ln -svf $TEXLIVE_PREFIX/lib/libkpathsea.so /usr/lib TeXLive includes some files for ConTeXt but the source of that is separate and has moved on from using luatex in the previous 'mkiv' version to using luametatex which can be pulled with git from github luametatex. LuaMetaTeX uses meson and ninja, but it does not fit easily into the BLFS layout of TeXLive. However, with a little extra work 'mkiv' files can still be processed using the files shipped in texmf. Fixes to use ConTeXt will be removed when the texlive source next has to be updated for either a vulnerability fix which requires backporting luatex changes, or for TeXLive 2024. If you are a BLFS user of ConTeXt you should be prepared to use the latest tag from github (the link is in first paragraph of this Note). Building and installing that to work with a BLFS install of TeXLive will not be a trivial exercise. The following steps, run as the root user, will create mtxrun and context. sed -e '/local template=\[\[--ini/s/\(primaryflags%\)\(.*\)/\1 --socket --shell-escape \2/' \ -e '/local template=\[\[%primaryflags%/s/\(primaryflags%\)\(.*\)/\1 --socket --shell-escape \2/' \ -i $TEXLIVE_PREFIX/texmf-dist/scripts/context/lua/mtxrun.lua && mkdir -pv $TEXLIVE_PREFIX/texmf-var/luatex-cache/context/ && ln -sfv /$TEXLIVE_PREFIX/texmf-dist/scripts/context/lua/mtxrun.lua \ /$TEXLIVE_PREFIX/bin/$TEXARCH/mtxrun && cat > $TEXLIVE_PREFIX/bin/$TEXARCH/context << EOF #!/bin/sh export TEXMF=$TEXLIVE_PREFIX/texmf-dist; export TEXMFCNF=$TEXLIVE_PREFIX/texmf-dist/web2c; export TEXMFCACHE=$TEXLIVE_PREFIX/texmf-var/luatex-cache/context/; $TEXLIVE_PREFIX/bin/$TEXARCH/mtxrun --script context "\$@" EOF chmod -v 0755 $TEXLIVE_PREFIX/bin/$TEXARCH/context You can now proceed to , , and / or if you wish to install them. Command Explanations patch -Np1 -i ../texlive-&texlive-version;-source-security_fix-1.patch: this updates the luatex source to v1.17.0 to fix security issues. sed -e '/local template (...)' (...)mtxrun.lua: this makes a change in a texmf-dist script so that ConTeXt can now run with luatex-v1.17.0. -C: create config.cache, this saves significant time in a parallel build. --disable-dvisvgm: As noted above, the shipped version of dvisvgm, which has modified configuration files, cannot be built with shared system libraries. /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-&texmf-version;-texmf.tar.xz -C $TEXLIVE_PREFIX --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/* $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: 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. mkdir -pv $TEXLIVE_PREFIX/texmf-var/luatex-cache/context/: the context script created after this will not run correctly if this directory is not present. : use this if you do not have Xorg installed. There are many other '--disable' or '--without' options. Some of them such as 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 Installed Libraries Installed Directories Over 300 binaries and symlinks to scripts libkpathsea.so, libptexenc.so, libsynctex.so, libtexlua52.so, libtexluajit.so $TEXLIVE_PREFIX/bin, $TEXLIVE_PREFIX/include, $TEXLIVE_PREFIX/lib, $TEXLIVE_PREFIX/texmf-dist Short Descriptions TeX programs TeX Live programs libkpathsea.so (kpathsearch) exists to look up a file in a list of directories and is used by kpsewhich libkpathsea.so libptexenc.so is a library for Japanese pTeX (publishing TeX) libptexenc.so libsynctex.so is the SyncTeX (Synchronize TeXnology) parser library libsynctex.so libtexlua52.so provides Lua 5.2, modified for use with LuaTeX libtexlua52.so libtexluajit.so provides LuaJIT, modified for use with LuaJITTeX libtexluajit.so