Debian Codegraph @

README.3installing

raw
1 (This file was generated by makeinfo and splitinfo.gawk.)
2 (Released under the old-style GNU documentation license;
3 see sources or other output files for full text.)
4
5 5 Installing
6 ************
7
8 This section discusses the results of 'make install' in the source tree.
9
10 The main consideration is that 'make install' is nothing like enough
11 to make a usable TeX installation. It creates the compiled binaries,
12 but (thousands of) support files are also needed; just as a first
13 example, 'plain.tex' is not installed. All the support files are
14 maintained completely independently and are not present in the TL
15 'Build/source' tree of sources to be compiled.
16
17 Thus, perhaps the simplest way to get a running TeX system after
18 building new binaries from these sources is to do a normal installation
19 of TeX Live, and then use the new binaries as a so-called "custom"
20 platform (<https://tug.org/texlive/custom-bin.html>).
21
22 Alternatively, the best general basis for dealing with them, for
23 example if you're trying to figure out how to support TeX in a general
24 distro, is the TeX Live (plain text) database in
25 'Master/tlpkg/texlive.tlpdb', and/or the TeX Live installer,
26 'install-tl'.
27
28 More information is under 'Master/tlpkg' and at
29 <https://tug.org/texlive/distro.html> and
30 <https://tug.org/texlive/build.html#deploy>.
31
32 5.1 Installation directories
33 ============================
34
35 Running 'make install' (or 'make install-strip') installs executables in
36 'BINDIR', libraries in 'LIBDIR', headers in 'INCLUDEDIR', general data
37 (including "linked scripts", see Linked scripts) in
38 'DATAROOTDIR/texmf-dist', man pages in 'MANDIR', and Info files in
39 'INFODIR'.
40
41 The values of these directories are determined by 'configure' and can
42 be specified explicitly as options such as '--prefix=PREFIX' or
43 '--bindir=BINDIR'; otherwise, they are given by their usual Autoconf
44 defaults:
45
46 PREFIX /usr/local
47 EXEC_PREFIX PREFIX
48 BINDIR EXEC_PREFIX/bin
49 LIBDIR EXEC_PREFIX/lib
50 INCLUDEDIR PREFIX/include
51 DATAROOTDIR PREFIX/share
52 MANDIR DATAROOTDIR/man
53 INFODIR DATAROOTDIR/info
54
55 except possibly modified as follows:
56
57 * If the option '--enable-multiplatform' is given, '/PLATFORM' (i.e.,
58 the canonical platform name) is appended to 'BINDIR' and 'LIBDIR'.
59 This is implied for a native TL build.
60
61 * In a native TL build, 'DATAROOTDIR' is set to 'PREFIX', 'INFODIR'
62 is set to 'PREFIX/texmf-dist/doc/info', and 'MANDIR' to
63 'PREFIX/texmf-dist/doc/man', corresponding to the directories used
64 in the TL distribution.
65
66 The top-level 'configure' script displays all these installation paths.
67
68 For the native TL build, the 'Build' script leaves the binaries in
69 './inst/bin/STD-SYSTEM-TRIPLET'. The new binaries are not directly
70 usable from that location; they need to be copied to
71 'Master/bin/TL-PLATFORM'. The other files and directories that end up
72 in './inst/' are ignored.
73
74 5.2 Linked scripts
75 ==================
76
77 Quite a few of the executables in TeX Live are architecture-independent
78 shell, Perl, or other interpreted scripts, rather than compiled
79 binaries. A few are maintained as part of the TL source tree, but most
80 are maintained independently in their own packages, with copies under
81 'texk/texlive/linked_scripts'.
82
83 These so-called "linked scripts" are installed under
84 'DATAROOTDIR/texmf-dist/scripts'; for Unix-like systems a symbolic link
85 is made in 'BINDIR'. For example, a symlink points from
86 'BINDIR/fmtutil' to 'DATAROOTDIR/texmf-dist/scripts/texlive/fmtutil.pl'.
87 The symlink is relative, so the installation root can be anywhere.
88
89 For Windows, we cannot portably use symlinks, so a standard wrapper
90 binary (copied to, e.g., 'BINDIR/fmtutil.exe') serves the same purpose
91 (the source for the wrapper is in 'texk/texlive/windows_wrapper').
92
93 One reason for all this is to avoid having many copies of the same
94 script; a more important reason is that it guarantees the scripts will
95 stay in sync across the different supported operating systems.
96
97 Most important of all, we want the 'BINDIR' resulting from 'make
98 install' in the TL source tree to be as close as possible to what's in
99 thej TL distribution. At present, there are a few
100 exceptions--Asymptote, Biber, Xindy--and each one creates considerable
101 extra work. We don't want to add more. (See
102 <https://tug.org/texlive/build.html> for information about building
103 those exceptions, as well as the 'xz' and 'wget' programs that are used
104 in the TL infrastructure.)
105
106 As part of the 'make install' in the 'linked_scripts' directory, a
107 file 'scripts-targets.lst' is created to record all the links that are
108 created this way, so that distros and others can reproduce them. The
109 file has one line per link. The first word is the target of the link
110 (e.g., 'texmf-dist/scripts/texlive/fmtutil.pl'), and the second word is
111 the name of the link to be placed in the bindir (e.g., 'fmtutil').
112 Determining the relative link target (how many '../'s) is left to the
113 users of this file, since it varies among distributions. It can be
114 assumed there is no whitespace in these filenames.
115
116 A few links are within bindir; in that case, the first word of the
117 line is just a base name, e.g., the file 'fmtutil mktexfmt' means that
118 doing the equivalent of 'ln -s fmtutil mktexfmt' in the bindir.
119
120 Be aware that although extensions are usually stripped (as with
121 'fmtutil'), there are exceptions, such as 'memoize-extract.pl' and
122 'listings-ext.sh'.
123
124 The 'scripts-targets.lst' file started being created as of the
125 TeX Live 2025 release. Historically, another file 'scripts.lst' has
126 been (and still is) created, containing only the link targets, and using
127 a Bourne shell syntax.
128
129 5.3 Distro builds
130 =================
131
132 Although they use the same code base, building for the native TL
133 distribution as shipped by the TeX user groups is typically quite
134 different from a "distro" build needed by, e.g., a full GNU/Linux or BSD
135 operating system distribution.
136
137 The native TL distribution uses shared libraries only when absolutely
138 necessary ('libc', 'libm', X11 libraries, and 'libfontconfig'). In
139 contrast, a distro typically wants to use as many shared libraries as
140 possible from elsewhere on the system, including TeX-specific libraries
141 such as 'libkpathsea' (even though Kpathsea has never officially been
142 released as a shared library). In addition, the installation paths
143 will, in general, be completely different.
144
145 Here are the 'configure' options that distro builds are likely to
146 find most relevant:
147
148 '--disable-native-texlive-build'
149 This must be specified to avoid interference from the many tweaks
150 we do for the native TL build.
151
152 '--with-banner-add=/SOMEDISTRO'
153 This isn't technically required, but is strongly recommended, so
154 your build and your distro can be distinguished from others.
155
156 '--enable-shared'
157 Build shared versions of the TeX-specific libraries (uses
158 'libtool').
159
160 '--disable-static'
161 Do not build the static versions of the TeX-specific libraries.
162
163 '--with-system-LIB'
164 Look for and use a system version of the library LIB. 'configure
165 --help' will give you the list of possibilities.
166
167 '--with-LIB-includes=DIR'
168 '--with-LIB-libdir=DIR'
169 If needed, allows you to specify where the headers/code are for the
170 given library LIB.
171
172 '--prefix=/usr'
173 '--prefix=/opt/TeXLive'
174 Or whatever your convention is. The default is '/usr/local' and
175 you shouldn't install there for a distro.
176
177 '--libdir=\${exec_prefix}/lib64'
178 May be needed for 64-bit bi-architecture (GNU/Linux) systems.
179
180 You will need to take care of the support files mentioned above (see
181 Installing), and many other issues, such as font maps, languages, and
182 formats, independently of the build. Norbert Preining has written a
183 detailed article on adapting TL for distros:
184 <https://tug.org/TUGboat/tb34-3/tb108preining-distro.pdf>. (If the
185 article needs updating in the future, perhaps we will merge it into this
186 document.)
187