1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="ch-system-glibc" role="wrap">
|
---|
9 | <?dbhtml filename="glibc.html"?>
|
---|
10 |
|
---|
11 | <sect1info condition="script">
|
---|
12 | <productname>glibc</productname>
|
---|
13 | <productnumber>&glibc-version;</productnumber>
|
---|
14 | <address>&glibc-url;</address>
|
---|
15 | </sect1info>
|
---|
16 |
|
---|
17 | <title>Glibc-&glibc-version;</title>
|
---|
18 |
|
---|
19 | <indexterm zone="ch-system-glibc">
|
---|
20 | <primary sortas="a-Glibc">Glibc</primary>
|
---|
21 | </indexterm>
|
---|
22 |
|
---|
23 | <sect2 role="package">
|
---|
24 | <title/>
|
---|
25 |
|
---|
26 | <para>The Glibc package contains the main C library. This library provides
|
---|
27 | the basic routines for allocating memory, searching directories, opening and
|
---|
28 | closing files, reading and writing files, string handling, pattern matching,
|
---|
29 | arithmetic, and so on.</para>
|
---|
30 |
|
---|
31 | <segmentedlist>
|
---|
32 | <segtitle>&buildtime;</segtitle>
|
---|
33 | <segtitle>&diskspace;</segtitle>
|
---|
34 |
|
---|
35 | <seglistitem>
|
---|
36 | <seg>&glibc-fin-sbu;</seg>
|
---|
37 | <seg>&glibc-fin-du;</seg>
|
---|
38 | </seglistitem>
|
---|
39 | </segmentedlist>
|
---|
40 |
|
---|
41 | </sect2>
|
---|
42 |
|
---|
43 | <sect2 role="installation">
|
---|
44 | <title>Installation of Glibc</title>
|
---|
45 |
|
---|
46 | <para>Some of the Glibc programs use the non-FHS compliant
|
---|
47 | <filename class="directory">/var/db</filename> directory to store
|
---|
48 | their runtime data. Apply the following patch to make such programs
|
---|
49 | store their runtime data in the FHS-compliant locations:</para>
|
---|
50 |
|
---|
51 | <screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
|
---|
52 | <!--
|
---|
53 | <para>Now fix a security vulnerability:</para>
|
---|
54 |
|
---|
55 | <screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-patch;</userinput></screen>
|
---|
56 | -->
|
---|
57 | <para>The Glibc documentation recommends building Glibc
|
---|
58 | in a dedicated build directory:</para>
|
---|
59 |
|
---|
60 | <screen><userinput remap="pre">mkdir -v build
|
---|
61 | cd build</userinput></screen>
|
---|
62 |
|
---|
63 | <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
|
---|
64 | utilities will be installed into
|
---|
65 | <filename class="directory">/usr/sbin</filename>:</para>
|
---|
66 |
|
---|
67 | <screen><userinput remap="pre">echo "rootsbindir=/usr/sbin" > configparms</userinput></screen>
|
---|
68 |
|
---|
69 | <para>Prepare Glibc for compilation:</para>
|
---|
70 |
|
---|
71 | <screen><userinput remap="configure">../configure --prefix=/usr \
|
---|
72 | --disable-werror \
|
---|
73 | --enable-kernel=&min-kernel; \
|
---|
74 | --enable-stack-protector=strong \
|
---|
75 | --disable-nscd \
|
---|
76 | libc_cv_slibdir=/usr/lib</userinput></screen>
|
---|
77 |
|
---|
78 | <variablelist>
|
---|
79 | <title>The meaning of the configure options:</title>
|
---|
80 |
|
---|
81 | <varlistentry>
|
---|
82 | <term><parameter>--disable-werror</parameter></term>
|
---|
83 | <listitem>
|
---|
84 | <para>This option disables the -Werror option passed to
|
---|
85 | GCC. This is necessary for running the test suite.</para>
|
---|
86 | </listitem>
|
---|
87 | </varlistentry>
|
---|
88 |
|
---|
89 | <varlistentry>
|
---|
90 | <term><parameter>--enable-kernel=&min-kernel;</parameter></term>
|
---|
91 | <listitem>
|
---|
92 | <para>This option tells the build system that this Glibc may
|
---|
93 | be used with kernels as old as &min-kernel;. This means generating
|
---|
94 | workarounds in case a system call introduced in a later version
|
---|
95 | cannot be used.</para>
|
---|
96 | </listitem>
|
---|
97 | </varlistentry>
|
---|
98 |
|
---|
99 | <varlistentry>
|
---|
100 | <term><parameter>--enable-stack-protector=strong</parameter></term>
|
---|
101 | <listitem>
|
---|
102 | <para>This option increases system security by adding
|
---|
103 | extra code to check for buffer overflows, such as stack
|
---|
104 | smashing attacks. Note that Glibc always explicitly overrides
|
---|
105 | the default of GCC, so this option is still needed even though
|
---|
106 | we've already specified <option>--enable-default-ssp</option> for
|
---|
107 | GCC.</para>
|
---|
108 | </listitem>
|
---|
109 | </varlistentry>
|
---|
110 |
|
---|
111 | <varlistentry>
|
---|
112 | <term><parameter>--disable-nscd</parameter></term>
|
---|
113 | <listitem>
|
---|
114 | <para>Do not build the name service cache daemon which is no
|
---|
115 | longer used.</para>
|
---|
116 | </listitem>
|
---|
117 | </varlistentry>
|
---|
118 |
|
---|
119 | <varlistentry>
|
---|
120 | <term><parameter>libc_cv_slibdir=/usr/lib</parameter></term>
|
---|
121 | <listitem>
|
---|
122 | <para>This variable sets the correct library for all
|
---|
123 | systems. We do not want lib64 to be used.</para>
|
---|
124 | </listitem>
|
---|
125 | </varlistentry>
|
---|
126 |
|
---|
127 | </variablelist>
|
---|
128 |
|
---|
129 | <para>Compile the package:</para>
|
---|
130 |
|
---|
131 | <screen><userinput remap="make">make</userinput></screen>
|
---|
132 |
|
---|
133 | <important>
|
---|
134 | <para>In this section, the test suite for Glibc is considered critical.
|
---|
135 | Do not skip it under any circumstance.</para>
|
---|
136 | </important>
|
---|
137 |
|
---|
138 | <para>Generally a few tests do not pass. The test failures listed below
|
---|
139 | are usually safe to ignore.</para>
|
---|
140 |
|
---|
141 | <!-- Use remap="make" here to work around a jhalfs issue. -->
|
---|
142 | <!--<screen><userinput remap="make">case $(uname -m) in
|
---|
143 | i?86) ln -sfnv $PWD/elf/ld-linux.so.2 /lib ;;
|
---|
144 | x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2 /lib ;;
|
---|
145 | esac</userinput></screen>
|
---|
146 |
|
---|
147 | <note><para>The symbolic link above is needed to run the tests at this
|
---|
148 | stage of building in the chroot environment. It will be overwritten
|
---|
149 | in the install phase below.</para></note>
|
---|
150 | -->
|
---|
151 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
152 |
|
---|
153 | <para>You may see some test failures. The Glibc test suite is
|
---|
154 | somewhat dependent on the host system. A few failures out of
|
---|
155 | over 5000 tests can generally be ignored. This is a list of the
|
---|
156 | most common issues seen for recent versions of LFS:</para>
|
---|
157 |
|
---|
158 | <itemizedlist>
|
---|
159 |
|
---|
160 | <listitem>
|
---|
161 | <para><emphasis>io/tst-lchmod</emphasis>
|
---|
162 | is known to fail in the LFS chroot environment.</para>
|
---|
163 | </listitem>
|
---|
164 |
|
---|
165 | <listitem>
|
---|
166 | <para>Some tests, for example
|
---|
167 | <emphasis>nss/tst-nss-files-hosts-multi</emphasis> and
|
---|
168 | <emphasis>nptl/tst-thread-affinity*</emphasis>
|
---|
169 | are known to fail due to a timeout (especially when the system is
|
---|
170 | relatively slow and/or running the test suite with multiple
|
---|
171 | parallel make jobs). These tests can be identified with:</para>
|
---|
172 |
|
---|
173 | <screen><userinput remap="test">grep "Timed out" $(find -name \*.out)</userinput></screen>
|
---|
174 |
|
---|
175 | <para>It's possible to re-run a single test with enlarged timeout
|
---|
176 | with
|
---|
177 | <command>TIMEOUTFACTOR=<replaceable><factor></replaceable>
|
---|
178 | make test t=<replaceable><test name></replaceable></command>.
|
---|
179 | For example, <command>TIMEOUTFACTOR=10 make test
|
---|
180 | t=nss/tst-nss-files-hosts-multi</command> will re-run
|
---|
181 | <emphasis>nss/tst-nss-files-hosts-multi</emphasis> with ten times
|
---|
182 | the original timeout.</para>
|
---|
183 | </listitem>
|
---|
184 |
|
---|
185 | <listitem>
|
---|
186 | <para>On MIPS, six elf audit tests, the test named
|
---|
187 | <emphasis>elf/tst-ro-dynamic</emphasis>, and the test named
|
---|
188 | <emphasis>elf/tst-sprof-basic</emphasis> are known to fail.</para>
|
---|
189 | </listitem>
|
---|
190 |
|
---|
191 | <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154221.html
|
---|
192 | https://sourceware.org/glibc/wiki/Testing/Tests/stdlib/tst-arc4random-thread -->
|
---|
193 | <listitem>
|
---|
194 | <para>The <emphasis>stdlib/tst-arc4random-thread</emphasis>
|
---|
195 | test is known to fail with some host kernel versions due to a
|
---|
196 | kernel bug on MIPS.</para>
|
---|
197 | </listitem>
|
---|
198 |
|
---|
199 | <!-- https://sourceware.org/pipermail/libc-alpha/2024-February/154915.html -->
|
---|
200 | <listitem>
|
---|
201 | <para>Six <emphasis>math</emphasis> tests are known to fail due
|
---|
202 | to outdated test data.</para>
|
---|
203 | </listitem>
|
---|
204 |
|
---|
205 | <listitem>
|
---|
206 | <para>Additionally, some tests may fail with a relatively old CPU
|
---|
207 | model (for example
|
---|
208 | <emphasis>elf/tst-cpu-features-cpuinfo</emphasis>) or host kernel
|
---|
209 | version (for example
|
---|
210 | <emphasis>stdlib/tst-arc4random-thread</emphasis>).</para>
|
---|
211 | </listitem>
|
---|
212 | </itemizedlist>
|
---|
213 |
|
---|
214 | <para>Though it is a harmless message, the install stage of Glibc will
|
---|
215 | complain about the absence of <filename>/etc/ld.so.conf</filename>.
|
---|
216 | Prevent this warning with:</para>
|
---|
217 |
|
---|
218 | <screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen>
|
---|
219 |
|
---|
220 | <!-- https://sourceware.org/bugzilla/show_bug.cgi?id=21911 -->
|
---|
221 | <para>Fix the Makefile to skip an outdated sanity check
|
---|
222 | that fails with a modern Glibc configuration:</para>
|
---|
223 |
|
---|
224 | <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
|
---|
225 |
|
---|
226 | <important>
|
---|
227 | <para>
|
---|
228 | If upgrading Glibc to a new minor version (for example, from
|
---|
229 | Glibc-2.36 to Glibc-&glibc-version;) on a running LFS system, you
|
---|
230 | need to take some extra precautions to avoid breaking the system:
|
---|
231 | </para>
|
---|
232 |
|
---|
233 | <itemizedlist>
|
---|
234 | <listitem>
|
---|
235 | <!-- There are two reasons we don't support this:
|
---|
236 | 1. Upgrading on a system with separate /lib and /usr/lib is
|
---|
237 | tricky.
|
---|
238 | 2. With Glibc prior to 2.34 libc.so.6 etc. are symlinks to
|
---|
239 | libc-2.33.so etc., again causing the upgradation tricky.
|
---|
240 | The Glibc NEWS file explicit states they no longer use
|
---|
241 | symlinks for the ABI names to avoid upgradation
|
---|
242 | issues. -->
|
---|
243 | <para>
|
---|
244 | Upgrading Glibc on a LFS system prior to 11.0 (exclusive) is
|
---|
245 | not supported. Rebuild LFS if you are running such an old LFS
|
---|
246 | system but you need a newer Glibc.
|
---|
247 | </para>
|
---|
248 | </listitem>
|
---|
249 |
|
---|
250 | <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154095.html -->
|
---|
251 | <listitem>
|
---|
252 | <para>
|
---|
253 | If upgrading on a LFS system prior to 12.0 (exclusive), install
|
---|
254 | <application>Libxcrypt</application> following
|
---|
255 | <xref role='.' linkend='ch-system-libxcrypt'/> In addition to
|
---|
256 | a normal <application>Libxcrypt</application> installation,
|
---|
257 | <emphasis role='bold'>you MUST follow the note in Libxcrypt
|
---|
258 | section to install
|
---|
259 | <filename class='libraryfile'>libcrypt.so.1*</filename>
|
---|
260 | (replacing
|
---|
261 | <filename class='libraryfile'>libcrypt.so.1</filename> from the
|
---|
262 | prior Glibc installation)</emphasis>.
|
---|
263 | </para>
|
---|
264 | </listitem>
|
---|
265 |
|
---|
266 | <!-- Otherwise on lfs-systemd nscd will fail to start on boot,
|
---|
267 | and on both lfs-sysv and lfs-systemd useradd etc. will try
|
---|
268 | to start nscd, then nscd will fail to start as well and
|
---|
269 | produce some spurious error message. -->
|
---|
270 | <listitem>
|
---|
271 | <para>
|
---|
272 | If upgrading on a LFS system prior to 12.1 (exclusive),
|
---|
273 | remove the <command>nscd</command> program:
|
---|
274 | </para>
|
---|
275 |
|
---|
276 | <screen role='nodump'><userinput>rm -f /usr/sbin/nscd</userinput></screen>
|
---|
277 |
|
---|
278 | <para revision='systemd'>
|
---|
279 | If this system (prior to LFS 12.1, exclusive) is based on
|
---|
280 | Systemd, it's also needed to disable and stop the
|
---|
281 | <command>nscd</command> service now:
|
---|
282 | </para>
|
---|
283 |
|
---|
284 | <screen revision='systemd' role='nodump'><userinput>systemctl disable --now nscd</userinput></screen>
|
---|
285 | </listitem>
|
---|
286 |
|
---|
287 | <listitem>
|
---|
288 | <para>
|
---|
289 | Upgrade the kernel and reboot if it's older than &min-kernel;
|
---|
290 | (check the current version with <command>uname -r</command>)
|
---|
291 | or if you want to upgrade it anyway, following
|
---|
292 | <xref linkend='ch-bootable-kernel' role='.'/>
|
---|
293 | </para>
|
---|
294 | </listitem>
|
---|
295 |
|
---|
296 | <listitem>
|
---|
297 | <para>
|
---|
298 | Upgrade the kernel API headers if it's older than &min-kernel;
|
---|
299 | (check the current version with
|
---|
300 | <command>cat /usr/include/linux/version.h</command>)
|
---|
301 | or if you want to upgrade it anyway, following
|
---|
302 | <xref linkend='ch-tools-linux-headers'/> (but removing
|
---|
303 | <envar>$LFS</envar> from the <command>cp</command> command).
|
---|
304 | </para>
|
---|
305 | </listitem>
|
---|
306 |
|
---|
307 | <!-- This is to ensure we don't start a process at the time point
|
---|
308 | where some Glibc shared libraries are updated but the others
|
---|
309 | are not. Such mismatches can cause programs crash on startup,
|
---|
310 | esp. a mismatch between ld-linux-x86-64.so.2 and
|
---|
311 | libc.so.6. Note that a crash in the installation process
|
---|
312 | will leave the system in a state with the mismatch forever,
|
---|
313 | unrecoverable without the help of another distro. -->
|
---|
314 | <listitem>
|
---|
315 | <para>
|
---|
316 | Perform a <envar>DESTDIR</envar> installation and upgrade
|
---|
317 | the Glibc shared libraries on the system using one single
|
---|
318 | <command>install</command> command:
|
---|
319 | </para>
|
---|
320 |
|
---|
321 | <screen role='nodump'><userinput>make DESTDIR=$PWD/dest install
|
---|
322 | install -vm755 dest/usr/lib/*.so.* /usr/lib</userinput></screen>
|
---|
323 | </listitem>
|
---|
324 | </itemizedlist>
|
---|
325 |
|
---|
326 | <para>
|
---|
327 | It's imperative to strictly follow these steps above unless you
|
---|
328 | completely understand what you are doing.
|
---|
329 | <emphasis role='bold'>Any unexpected deviation may render the
|
---|
330 | system completely unusable. YOU ARE WARNED.</emphasis>
|
---|
331 | </para>
|
---|
332 |
|
---|
333 | <para>
|
---|
334 | Then continue to run the <command>make install</command> command,
|
---|
335 | the <command>sed</command> command against
|
---|
336 | <filename>/usr/bin/ldd</filename>, and the commands to install
|
---|
337 | the locales. Once they are finished, reboot the system
|
---|
338 | immediately.
|
---|
339 | </para>
|
---|
340 | </important>
|
---|
341 |
|
---|
342 | <para>Install the package:</para>
|
---|
343 |
|
---|
344 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
345 |
|
---|
346 | <para>Fix a hardcoded path to the executable loader in the
|
---|
347 | <command>ldd</command> script:</para>
|
---|
348 |
|
---|
349 | <screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd</userinput></screen>
|
---|
350 | <!--
|
---|
351 | <para>Install the configuration file and runtime directory for
|
---|
352 | <command>nscd</command>:</para>
|
---|
353 |
|
---|
354 | <screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
|
---|
355 | mkdir -pv /var/cache/nscd</userinput></screen>
|
---|
356 |
|
---|
357 | <para revision="systemd">Install the systemd support files for
|
---|
358 | <command>nscd</command>:</para>
|
---|
359 |
|
---|
360 | <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
|
---|
361 | install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
|
---|
362 | -->
|
---|
363 | <para>Next, install the locales that can make the system respond in a
|
---|
364 | different language. None of these locales are required, but if some of them
|
---|
365 | are missing, the test suites of some packages will skip important
|
---|
366 | test cases.</para>
|
---|
367 |
|
---|
368 | <para>Individual locales can be installed using the
|
---|
369 | <command>localedef</command> program. E.g., the second
|
---|
370 | <command>localedef</command> command below combines the
|
---|
371 | <filename>/usr/share/i18n/locales/cs_CZ</filename>
|
---|
372 | charset-independent locale definition with the
|
---|
373 | <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename>
|
---|
374 | charmap definition and appends the result to the
|
---|
375 | <filename>/usr/lib/locale/locale-archive</filename> file.
|
---|
376 | The following instructions will install the minimum set of
|
---|
377 | locales necessary for the optimal coverage of tests:</para>
|
---|
378 |
|
---|
379 | <screen role="nodump"><userinput remap="locale-test">localedef -i C -f UTF-8 C.UTF-8
|
---|
380 | localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
|
---|
381 | localedef -i de_DE -f ISO-8859-1 de_DE
|
---|
382 | localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
|
---|
383 | localedef -i de_DE -f UTF-8 de_DE.UTF-8
|
---|
384 | localedef -i el_GR -f ISO-8859-7 el_GR
|
---|
385 | localedef -i en_GB -f ISO-8859-1 en_GB
|
---|
386 | localedef -i en_GB -f UTF-8 en_GB.UTF-8
|
---|
387 | localedef -i en_HK -f ISO-8859-1 en_HK
|
---|
388 | localedef -i en_PH -f ISO-8859-1 en_PH
|
---|
389 | localedef -i en_US -f ISO-8859-1 en_US
|
---|
390 | localedef -i en_US -f UTF-8 en_US.UTF-8
|
---|
391 | localedef -i es_ES -f ISO-8859-15 es_ES@euro
|
---|
392 | localedef -i es_MX -f ISO-8859-1 es_MX
|
---|
393 | localedef -i fa_IR -f UTF-8 fa_IR
|
---|
394 | localedef -i fr_FR -f ISO-8859-1 fr_FR
|
---|
395 | localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
|
---|
396 | localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
|
---|
397 | localedef -i is_IS -f ISO-8859-1 is_IS
|
---|
398 | localedef -i is_IS -f UTF-8 is_IS.UTF-8
|
---|
399 | localedef -i it_IT -f ISO-8859-1 it_IT
|
---|
400 | localedef -i it_IT -f ISO-8859-15 it_IT@euro
|
---|
401 | localedef -i it_IT -f UTF-8 it_IT.UTF-8
|
---|
402 | localedef -i ja_JP -f EUC-JP ja_JP
|
---|
403 | localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
|
---|
404 | localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
|
---|
405 | localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro
|
---|
406 | localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
|
---|
407 | localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
|
---|
408 | localedef -i se_NO -f UTF-8 se_NO.UTF-8
|
---|
409 | localedef -i ta_IN -f UTF-8 ta_IN.UTF-8
|
---|
410 | localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
|
---|
411 | localedef -i zh_CN -f GB18030 zh_CN.GB18030
|
---|
412 | localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS
|
---|
413 | localedef -i zh_TW -f UTF-8 zh_TW.UTF-8</userinput></screen>
|
---|
414 |
|
---|
415 | <para>In addition, install the locale for your own country, language and
|
---|
416 | character set.</para>
|
---|
417 |
|
---|
418 | <para>Alternatively, install all the locales listed in the
|
---|
419 | <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
|
---|
420 | (it includes every locale listed above and many more) at once with the
|
---|
421 | following time-consuming command:</para>
|
---|
422 |
|
---|
423 | <screen><userinput remap="locale-full">make localedata/install-locales</userinput></screen>
|
---|
424 |
|
---|
425 | <para>Then use the <command>localedef</command> command to create and
|
---|
426 | install locales not listed in the
|
---|
427 | <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
|
---|
428 | when you need them. For instance, the following two locales are
|
---|
429 | needed for some tests later in this chapter:</para>
|
---|
430 |
|
---|
431 | <screen role="nodump"><userinput remap="locale-full">localedef -i C -f UTF-8 C.UTF-8
|
---|
432 | localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true</userinput></screen>
|
---|
433 |
|
---|
434 | <note><para>Glibc now uses libidn2 when resolving internationalized
|
---|
435 | domain names. This is a run time dependency. If this capability
|
---|
436 | is needed, the instructions for installing libidn2 are in the
|
---|
437 | <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>.
|
---|
438 | </para></note>
|
---|
439 |
|
---|
440 | </sect2>
|
---|
441 |
|
---|
442 | <sect2 id="conf-glibc" role="configuration">
|
---|
443 | <title>Configuring Glibc</title>
|
---|
444 |
|
---|
445 | <indexterm zone="conf-glibc">
|
---|
446 | <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
|
---|
447 | </indexterm>
|
---|
448 |
|
---|
449 | <indexterm zone="conf-glibc">
|
---|
450 | <primary sortas="e-/etc/localtime">/etc/localtime</primary>
|
---|
451 | </indexterm>
|
---|
452 |
|
---|
453 | <sect3>
|
---|
454 | <title>Adding nsswitch.conf</title>
|
---|
455 |
|
---|
456 | <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
|
---|
457 | because the Glibc defaults do not work well in a networked environment.
|
---|
458 | </para>
|
---|
459 |
|
---|
460 | <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
|
---|
461 | following:</para>
|
---|
462 |
|
---|
463 | <screen revision='sysv'><userinput>cat > /etc/nsswitch.conf << "EOF"
|
---|
464 | <literal># Begin /etc/nsswitch.conf
|
---|
465 |
|
---|
466 | passwd: files
|
---|
467 | group: files
|
---|
468 | shadow: files
|
---|
469 |
|
---|
470 | hosts: files dns
|
---|
471 | networks: files
|
---|
472 |
|
---|
473 | protocols: files
|
---|
474 | services: files
|
---|
475 | ethers: files
|
---|
476 | rpc: files
|
---|
477 |
|
---|
478 | # End /etc/nsswitch.conf</literal>
|
---|
479 | EOF</userinput></screen>
|
---|
480 |
|
---|
481 | <screen revision='systemd'><userinput>cat > /etc/nsswitch.conf << "EOF"
|
---|
482 | <literal># Begin /etc/nsswitch.conf
|
---|
483 |
|
---|
484 | passwd: files systemd
|
---|
485 | group: files systemd
|
---|
486 | shadow: files systemd
|
---|
487 |
|
---|
488 | hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
|
---|
489 | networks: files
|
---|
490 |
|
---|
491 | protocols: files
|
---|
492 | services: files
|
---|
493 | ethers: files
|
---|
494 | rpc: files
|
---|
495 |
|
---|
496 | # End /etc/nsswitch.conf</literal>
|
---|
497 | EOF</userinput></screen>
|
---|
498 |
|
---|
499 | </sect3>
|
---|
500 |
|
---|
501 | <sect3>
|
---|
502 | <title>Adding Time Zone Data</title>
|
---|
503 |
|
---|
504 | <para>Install and set up the time zone data with the following:</para>
|
---|
505 | <screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
|
---|
506 |
|
---|
507 | ZONEINFO=/usr/share/zoneinfo
|
---|
508 | mkdir -pv $ZONEINFO/{posix,right}
|
---|
509 |
|
---|
510 | for tz in etcetera southamerica northamerica europe africa antarctica \
|
---|
511 | asia australasia backward; do
|
---|
512 | zic -L /dev/null -d $ZONEINFO ${tz}
|
---|
513 | zic -L /dev/null -d $ZONEINFO/posix ${tz}
|
---|
514 | zic -L leapseconds -d $ZONEINFO/right ${tz}
|
---|
515 | done
|
---|
516 |
|
---|
517 | cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO
|
---|
518 | zic -d $ZONEINFO -p America/New_York
|
---|
519 | unset ZONEINFO</userinput></screen>
|
---|
520 |
|
---|
521 | <variablelist>
|
---|
522 | <title>The meaning of the zic commands:</title>
|
---|
523 |
|
---|
524 | <varlistentry>
|
---|
525 | <term><parameter>zic -L /dev/null ...</parameter></term>
|
---|
526 | <listitem>
|
---|
527 | <para>This creates posix time zones without any leap seconds. It is
|
---|
528 | conventional to put these in both
|
---|
529 | <filename class="directory">zoneinfo</filename> and
|
---|
530 | <filename class="directory">zoneinfo/posix</filename>. It is
|
---|
531 | necessary to put the POSIX time zones in
|
---|
532 | <filename class="directory">zoneinfo</filename>, otherwise various
|
---|
533 | test suites will report errors. On an embedded system, where space is
|
---|
534 | tight and you do not intend to ever update the time zones, you could save
|
---|
535 | 1.9 MB by not using the <filename class="directory">posix</filename>
|
---|
536 | directory, but some applications or test suites might produce some
|
---|
537 | failures.</para>
|
---|
538 | </listitem>
|
---|
539 | </varlistentry>
|
---|
540 | <varlistentry>
|
---|
541 | <term><parameter>zic -L leapseconds ...</parameter></term>
|
---|
542 | <listitem>
|
---|
543 | <para>This creates right time zones, including leap seconds. On an
|
---|
544 | embedded system, where space is tight and you do not intend to
|
---|
545 | ever update the time zones, or care about the correct time, you could
|
---|
546 | save 1.9MB by omitting the <filename class="directory">right</filename>
|
---|
547 | directory.</para>
|
---|
548 | </listitem>
|
---|
549 | </varlistentry>
|
---|
550 | <varlistentry>
|
---|
551 | <term><parameter>zic ... -p ...</parameter></term>
|
---|
552 | <listitem>
|
---|
553 | <para>This creates the <filename>posixrules</filename> file. We use
|
---|
554 | New York because POSIX requires the daylight saving time rules
|
---|
555 | to be in accordance with US rules.</para>
|
---|
556 | </listitem>
|
---|
557 | </varlistentry>
|
---|
558 | </variablelist>
|
---|
559 |
|
---|
560 |
|
---|
561 | <para>One way to determine the local time zone is to run the following
|
---|
562 | script:</para>
|
---|
563 |
|
---|
564 | <screen role="nodump"><userinput>tzselect</userinput></screen>
|
---|
565 |
|
---|
566 | <para>After answering a few questions about the location, the script will
|
---|
567 | output the name of the time zone (e.g.,
|
---|
568 | <emphasis>America/Edmonton</emphasis>). There are also some other possible
|
---|
569 | time zones listed in <filename
|
---|
570 | class='directory'>/usr/share/zoneinfo</filename> such as
|
---|
571 | <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that
|
---|
572 | are not identified by the script but can be used.</para>
|
---|
573 |
|
---|
574 | <para>Then create the <filename>/etc/localtime</filename> file by
|
---|
575 | running:</para>
|
---|
576 |
|
---|
577 | <screen><userinput>ln -sfv /usr/share/zoneinfo/<replaceable><xxx></replaceable> /etc/localtime</userinput></screen>
|
---|
578 |
|
---|
579 | <para>Replace <replaceable><xxx></replaceable> with the name of the
|
---|
580 | time zone selected (e.g., Canada/Eastern).</para>
|
---|
581 |
|
---|
582 | </sect3>
|
---|
583 |
|
---|
584 | <sect3 id="conf-ld" role="configuration">
|
---|
585 | <title>Configuring the Dynamic Loader</title>
|
---|
586 |
|
---|
587 | <indexterm zone="conf-ld">
|
---|
588 | <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
|
---|
589 | </indexterm>
|
---|
590 |
|
---|
591 | <para>By default, the dynamic loader (<filename
|
---|
592 | class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
|
---|
593 | <filename class="directory">/usr/lib</filename> for dynamic libraries
|
---|
594 | that are needed by programs as they are run. However, if there are
|
---|
595 | libraries in directories other than
|
---|
596 | <filename class="directory">/usr/lib</filename>, these need to be added
|
---|
597 | to the <filename>/etc/ld.so.conf</filename> file in order for the
|
---|
598 | dynamic loader to find them. Two directories that are commonly known
|
---|
599 | to contain additional libraries are <filename
|
---|
600 | class="directory">/usr/local/lib</filename> and <filename
|
---|
601 | class="directory">/opt/lib</filename>, so add those directories to the
|
---|
602 | dynamic loader's search path.</para>
|
---|
603 |
|
---|
604 | <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
|
---|
605 | following:</para>
|
---|
606 |
|
---|
607 | <screen><userinput>cat > /etc/ld.so.conf << "EOF"
|
---|
608 | <literal># Begin /etc/ld.so.conf
|
---|
609 | /usr/local/lib
|
---|
610 | /opt/lib
|
---|
611 | </literal>
|
---|
612 | EOF</userinput></screen>
|
---|
613 |
|
---|
614 | <para>If desired, the dynamic loader can also search a directory and
|
---|
615 | include the contents of files found there. Generally the files in
|
---|
616 | this include directory are one line specifying the desired library path.
|
---|
617 | To add this capability run the following commands:</para>
|
---|
618 |
|
---|
619 | <screen role="nodump"><userinput>cat >> /etc/ld.so.conf << "EOF"
|
---|
620 | <literal># Add an include directory
|
---|
621 | include /etc/ld.so.conf.d/*.conf
|
---|
622 | </literal>
|
---|
623 | EOF
|
---|
624 | mkdir -pv /etc/ld.so.conf.d</userinput></screen>
|
---|
625 |
|
---|
626 | </sect3>
|
---|
627 | </sect2>
|
---|
628 |
|
---|
629 | <sect2 id="contents-glibc" role="content">
|
---|
630 | <title>Contents of Glibc</title>
|
---|
631 |
|
---|
632 | <segmentedlist>
|
---|
633 | <segtitle>Installed programs</segtitle>
|
---|
634 | <segtitle>Installed libraries</segtitle>
|
---|
635 | <segtitle>Installed directories</segtitle>
|
---|
636 |
|
---|
637 | <seglistitem>
|
---|
638 | <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
|
---|
639 | ldd, lddlibc4,
|
---|
640 | ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
|
---|
641 | locale, localedef, makedb, mtrace,
|
---|
642 | pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
|
---|
643 | zdump, and zic</seg>
|
---|
644 | <seg>ld.so.1, ld-linux-mipsn8.so.1
|
---|
645 | libBrokenLocale.{a,so}, libanl.{a,so},
|
---|
646 | libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
|
---|
647 | libdl.{a,so.2}, libg.a, libm.{a,so},
|
---|
648 | libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.so.1,
|
---|
649 | libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
|
---|
650 | libpcprofile.so, libpthread.{a,so.0},
|
---|
651 | libresolv.{a,so}, librt.{a,so.1},
|
---|
652 | libthread_db.so, and libutil.{a,so.1}</seg>
|
---|
653 | <seg>/usr/include/arpa, /usr/include/bits, /usr/include/gnu,
|
---|
654 | /usr/include/net, /usr/include/netash, /usr/include/netatalk,
|
---|
655 | /usr/include/netax25, /usr/include/neteconet, /usr/include/netinet,
|
---|
656 | /usr/include/netipx, /usr/include/netiucv, /usr/include/netpacket,
|
---|
657 | /usr/include/netrom, /usr/include/netrose, /usr/include/nfs,
|
---|
658 | /usr/include/protocols, /usr/include/rpc,
|
---|
659 | /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale,
|
---|
660 | /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo,
|
---|
661 | and /var/lib/nss_db</seg>
|
---|
662 | </seglistitem>
|
---|
663 | </segmentedlist>
|
---|
664 |
|
---|
665 | <variablelist>
|
---|
666 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
667 | <?dbfo list-presentation="list"?>
|
---|
668 | <?dbhtml list-presentation="table"?>
|
---|
669 |
|
---|
670 | <varlistentry id="gencat">
|
---|
671 | <term><command>gencat</command></term>
|
---|
672 | <listitem>
|
---|
673 | <para>Generates message catalogues</para>
|
---|
674 | <indexterm zone="ch-system-glibc gencat">
|
---|
675 | <primary sortas="b-gencat">gencat</primary>
|
---|
676 | </indexterm>
|
---|
677 | </listitem>
|
---|
678 | </varlistentry>
|
---|
679 |
|
---|
680 | <varlistentry id="getconf">
|
---|
681 | <term><command>getconf</command></term>
|
---|
682 | <listitem>
|
---|
683 | <para>Displays the system configuration values for file system
|
---|
684 | specific variables</para>
|
---|
685 | <indexterm zone="ch-system-glibc getconf">
|
---|
686 | <primary sortas="b-getconf">getconf</primary>
|
---|
687 | </indexterm>
|
---|
688 | </listitem>
|
---|
689 | </varlistentry>
|
---|
690 |
|
---|
691 | <varlistentry id="getent">
|
---|
692 | <term><command>getent</command></term>
|
---|
693 | <listitem>
|
---|
694 | <para>Gets entries from an administrative database</para>
|
---|
695 | <indexterm zone="ch-system-glibc getent">
|
---|
696 | <primary sortas="b-getent">getent</primary>
|
---|
697 | </indexterm>
|
---|
698 | </listitem>
|
---|
699 | </varlistentry>
|
---|
700 |
|
---|
701 | <varlistentry id="iconv">
|
---|
702 | <term><command>iconv</command></term>
|
---|
703 | <listitem>
|
---|
704 | <para>Performs character set conversion</para>
|
---|
705 | <indexterm zone="ch-system-glibc iconv">
|
---|
706 | <primary sortas="b-iconv">iconv</primary>
|
---|
707 | </indexterm>
|
---|
708 | </listitem>
|
---|
709 | </varlistentry>
|
---|
710 |
|
---|
711 | <varlistentry id="iconvconfig">
|
---|
712 | <term><command>iconvconfig</command></term>
|
---|
713 | <listitem>
|
---|
714 | <para>Creates fastloading <command>iconv</command> module configuration
|
---|
715 | files</para>
|
---|
716 | <indexterm zone="ch-system-glibc iconvconfig">
|
---|
717 | <primary sortas="b-iconvconfig">iconvconfig</primary>
|
---|
718 | </indexterm>
|
---|
719 | </listitem>
|
---|
720 | </varlistentry>
|
---|
721 |
|
---|
722 | <varlistentry id="ldconfig">
|
---|
723 | <term><command>ldconfig</command></term>
|
---|
724 | <listitem>
|
---|
725 | <para>Configures the dynamic linker runtime bindings</para>
|
---|
726 | <indexterm zone="ch-system-glibc ldconfig">
|
---|
727 | <primary sortas="b-ldconfig">ldconfig</primary>
|
---|
728 | </indexterm>
|
---|
729 | </listitem>
|
---|
730 | </varlistentry>
|
---|
731 |
|
---|
732 | <varlistentry id="ldd">
|
---|
733 | <term><command>ldd</command></term>
|
---|
734 | <listitem>
|
---|
735 | <para>Reports which shared libraries are required
|
---|
736 | by each given program or shared library</para>
|
---|
737 | <indexterm zone="ch-system-glibc ldd">
|
---|
738 | <primary sortas="b-ldd">ldd</primary>
|
---|
739 | </indexterm>
|
---|
740 | </listitem>
|
---|
741 | </varlistentry>
|
---|
742 |
|
---|
743 | <varlistentry id="lddlibc4">
|
---|
744 | <term><command>lddlibc4</command></term>
|
---|
745 | <listitem>
|
---|
746 | <para>Assists <command>ldd</command> with object files.
|
---|
747 | It does not exist on newer architectures like x86_64</para>
|
---|
748 | <indexterm zone="ch-system-glibc lddlibc4">
|
---|
749 | <primary sortas="b-lddlibc4">lddlibc4</primary>
|
---|
750 | </indexterm>
|
---|
751 | </listitem>
|
---|
752 | </varlistentry>
|
---|
753 |
|
---|
754 | <varlistentry id="locale">
|
---|
755 | <term><command>locale</command></term>
|
---|
756 | <listitem>
|
---|
757 | <para>Prints various information about the current locale</para>
|
---|
758 | <indexterm zone="ch-system-glibc locale">
|
---|
759 | <primary sortas="b-locale">locale</primary>
|
---|
760 | </indexterm>
|
---|
761 | </listitem>
|
---|
762 | </varlistentry>
|
---|
763 |
|
---|
764 | <varlistentry id="localedef">
|
---|
765 | <term><command>localedef</command></term>
|
---|
766 | <listitem>
|
---|
767 | <para>Compiles locale specifications</para>
|
---|
768 | <indexterm zone="ch-system-glibc localedef">
|
---|
769 | <primary sortas="b-localedef">localedef</primary>
|
---|
770 | </indexterm>
|
---|
771 | </listitem>
|
---|
772 | </varlistentry>
|
---|
773 |
|
---|
774 | <varlistentry id="makedb">
|
---|
775 | <term><command>makedb</command></term>
|
---|
776 | <listitem>
|
---|
777 | <para>Creates a simple database from textual input</para>
|
---|
778 | <indexterm zone="ch-system-glibc makedb">
|
---|
779 | <primary sortas="b-makedb">makedb</primary>
|
---|
780 | </indexterm>
|
---|
781 | </listitem>
|
---|
782 | </varlistentry>
|
---|
783 |
|
---|
784 | <varlistentry id="mtrace">
|
---|
785 | <term><command>mtrace</command></term>
|
---|
786 | <listitem>
|
---|
787 | <para>Reads and interprets a memory trace file and displays a summary
|
---|
788 | in human-readable format</para>
|
---|
789 | <indexterm zone="ch-system-glibc mtrace">
|
---|
790 | <primary sortas="b-mtrace">mtrace</primary>
|
---|
791 | </indexterm>
|
---|
792 | </listitem>
|
---|
793 | </varlistentry>
|
---|
794 |
|
---|
795 | <varlistentry id="pcprofiledump">
|
---|
796 | <term><command>pcprofiledump</command></term>
|
---|
797 | <listitem>
|
---|
798 | <para>Dump information generated by PC profiling</para>
|
---|
799 | <indexterm zone="ch-system-glibc pcprofiledump">
|
---|
800 | <primary sortas="b-pcprofiledump">pcprofiledump</primary>
|
---|
801 | </indexterm>
|
---|
802 | </listitem>
|
---|
803 | </varlistentry>
|
---|
804 |
|
---|
805 | <varlistentry id="pldd">
|
---|
806 | <term><command>pldd</command></term>
|
---|
807 | <listitem>
|
---|
808 | <para>Lists dynamic shared objects used by running processes</para>
|
---|
809 | <indexterm zone="ch-system-glibc pldd">
|
---|
810 | <primary sortas="b-pldd">pldd</primary>
|
---|
811 | </indexterm>
|
---|
812 | </listitem>
|
---|
813 | </varlistentry>
|
---|
814 |
|
---|
815 | <varlistentry id="sln">
|
---|
816 | <term><command>sln</command></term>
|
---|
817 | <listitem>
|
---|
818 | <para>A statically linked <command>ln</command> program</para>
|
---|
819 | <indexterm zone="ch-system-glibc sln">
|
---|
820 | <primary sortas="b-sln">sln</primary>
|
---|
821 | </indexterm>
|
---|
822 | </listitem>
|
---|
823 | </varlistentry>
|
---|
824 |
|
---|
825 | <varlistentry id="sotruss">
|
---|
826 | <term><command>sotruss</command></term>
|
---|
827 | <listitem>
|
---|
828 | <para>Traces shared library procedure calls of a specified command</para>
|
---|
829 | <indexterm zone="ch-system-glibc sotruss">
|
---|
830 | <primary sortas="b-sotruss">sotruss</primary>
|
---|
831 | </indexterm>
|
---|
832 | </listitem>
|
---|
833 | </varlistentry>
|
---|
834 |
|
---|
835 | <varlistentry id="sprof">
|
---|
836 | <term><command>sprof</command></term>
|
---|
837 | <listitem>
|
---|
838 | <para>Reads and displays shared object profiling data</para>
|
---|
839 | <indexterm zone="ch-system-glibc sprof">
|
---|
840 | <primary sortas="b-sprof">sprof</primary>
|
---|
841 | </indexterm>
|
---|
842 | </listitem>
|
---|
843 | </varlistentry>
|
---|
844 |
|
---|
845 | <varlistentry id="tzselect">
|
---|
846 | <term><command>tzselect</command></term>
|
---|
847 | <listitem>
|
---|
848 | <para>Asks the user about the location of the system and reports
|
---|
849 | the corresponding time zone description</para>
|
---|
850 | <indexterm zone="ch-system-glibc tzselect">
|
---|
851 | <primary sortas="b-tzselect">tzselect</primary>
|
---|
852 | </indexterm>
|
---|
853 | </listitem>
|
---|
854 | </varlistentry>
|
---|
855 |
|
---|
856 | <varlistentry id="xtrace">
|
---|
857 | <term><command>xtrace</command></term>
|
---|
858 | <listitem>
|
---|
859 | <para>Traces the execution of a program by printing the currently
|
---|
860 | executed function</para>
|
---|
861 | <indexterm zone="ch-system-glibc xtrace">
|
---|
862 | <primary sortas="b-xtrace">xtrace</primary>
|
---|
863 | </indexterm>
|
---|
864 | </listitem>
|
---|
865 | </varlistentry>
|
---|
866 |
|
---|
867 | <varlistentry id="zdump">
|
---|
868 | <term><command>zdump</command></term>
|
---|
869 | <listitem>
|
---|
870 | <para>The time zone dumper</para>
|
---|
871 | <indexterm zone="ch-system-glibc zdump">
|
---|
872 | <primary sortas="b-zdump">zdump</primary>
|
---|
873 | </indexterm>
|
---|
874 | </listitem>
|
---|
875 | </varlistentry>
|
---|
876 |
|
---|
877 | <varlistentry id="zic">
|
---|
878 | <term><command>zic</command></term>
|
---|
879 | <listitem>
|
---|
880 | <para>The time zone compiler</para>
|
---|
881 | <indexterm zone="ch-system-glibc zic">
|
---|
882 | <primary sortas="b-zic">zic</primary>
|
---|
883 | </indexterm>
|
---|
884 | </listitem>
|
---|
885 | </varlistentry>
|
---|
886 |
|
---|
887 | <varlistentry id="ld.so">
|
---|
888 | <term><filename class="libraryfile">ld-*.so</filename></term>
|
---|
889 | <listitem>
|
---|
890 | <para>The helper program for shared library executables</para>
|
---|
891 | <indexterm zone="ch-system-glibc ld.so">
|
---|
892 | <primary sortas="c-ld.so">ld-&glibc-version;.so</primary>
|
---|
893 | </indexterm>
|
---|
894 | </listitem>
|
---|
895 | </varlistentry>
|
---|
896 |
|
---|
897 | <varlistentry id="libBrokenLocale">
|
---|
898 | <term><filename class="libraryfile">libBrokenLocale</filename></term>
|
---|
899 | <listitem>
|
---|
900 | <para>Used internally by Glibc as a gross hack to get broken programs
|
---|
901 | (e.g., some Motif applications) running. See comments in
|
---|
902 | <filename>glibc-&glibc-version;/locale/broken_cur_max.c</filename>
|
---|
903 | for more information</para>
|
---|
904 | <indexterm zone="ch-system-glibc libBrokenLocale">
|
---|
905 | <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
|
---|
906 | </indexterm>
|
---|
907 | </listitem>
|
---|
908 | </varlistentry>
|
---|
909 |
|
---|
910 | <varlistentry id="libanl">
|
---|
911 | <term><filename class="libraryfile">libanl</filename></term>
|
---|
912 | <listitem>
|
---|
913 | <para>Dummy library containing no functions. Previously was the
|
---|
914 | asynchronous name lookup library, whose functions are now in
|
---|
915 | <filename class='libraryfile'>libc</filename></para>
|
---|
916 | <indexterm zone="ch-system-glibc libanl">
|
---|
917 | <primary sortas="c-libanl">libanl</primary>
|
---|
918 | </indexterm>
|
---|
919 | </listitem>
|
---|
920 | </varlistentry>
|
---|
921 |
|
---|
922 | <varlistentry id="libc">
|
---|
923 | <term><filename class="libraryfile">libc</filename></term>
|
---|
924 | <listitem>
|
---|
925 | <para>The main C library</para>
|
---|
926 | <indexterm zone="ch-system-glibc libc">
|
---|
927 | <primary sortas="c-libc">libc</primary>
|
---|
928 | </indexterm>
|
---|
929 | </listitem>
|
---|
930 | </varlistentry>
|
---|
931 |
|
---|
932 | <varlistentry id="libc_malloc_debug">
|
---|
933 | <term><filename class="libraryfile">libc_malloc_debug</filename></term>
|
---|
934 | <listitem>
|
---|
935 | <para>Turns on memory allocation checking when preloaded</para>
|
---|
936 | <indexterm zone="ch-system-glibc libc_malloc_debug">
|
---|
937 | <primary sortas="c-libc_malloc_debug">libc_malloc_debug</primary>
|
---|
938 | </indexterm>
|
---|
939 | </listitem>
|
---|
940 | </varlistentry>
|
---|
941 |
|
---|
942 | <varlistentry id="libdl">
|
---|
943 | <term><filename class="libraryfile">libdl</filename></term>
|
---|
944 | <listitem>
|
---|
945 | <para>Dummy library containing no functions. Previously was the
|
---|
946 | dynamic linking interface library, whose functions are now in
|
---|
947 | <filename class="libraryfile">libc</filename></para>
|
---|
948 | <indexterm zone="ch-system-glibc libdl">
|
---|
949 | <primary sortas="c-libdl">libdl</primary>
|
---|
950 | </indexterm>
|
---|
951 | </listitem>
|
---|
952 | </varlistentry>
|
---|
953 |
|
---|
954 | <varlistentry id="libg">
|
---|
955 | <term><filename class="libraryfile">libg</filename></term>
|
---|
956 | <listitem>
|
---|
957 | <para>Dummy library containing no functions. Previously was a runtime
|
---|
958 | library for <command>g++</command></para>
|
---|
959 | <indexterm zone="ch-system-glibc libg">
|
---|
960 | <primary sortas="c-libg">libg</primary>
|
---|
961 | </indexterm>
|
---|
962 | </listitem>
|
---|
963 | </varlistentry>
|
---|
964 |
|
---|
965 | <varlistentry id="libm">
|
---|
966 | <term><filename class="libraryfile">libm</filename></term>
|
---|
967 | <listitem>
|
---|
968 | <para>The mathematical library</para>
|
---|
969 | <indexterm zone="ch-system-glibc libm">
|
---|
970 | <primary sortas="c-libm">libm</primary>
|
---|
971 | </indexterm>
|
---|
972 | </listitem>
|
---|
973 | </varlistentry>
|
---|
974 |
|
---|
975 | <varlistentry id="libmvec">
|
---|
976 | <term><filename class="libraryfile">libmvec</filename></term>
|
---|
977 | <listitem>
|
---|
978 | <para>The vector math library, linked in as needed
|
---|
979 | when <filename class='libraryfile'>libm</filename> is used</para>
|
---|
980 | <indexterm zone="ch-system-glibc libmvec">
|
---|
981 | <primary sortas="c-libmvec">libmvec</primary>
|
---|
982 | </indexterm>
|
---|
983 | </listitem>
|
---|
984 | </varlistentry>
|
---|
985 |
|
---|
986 | <varlistentry id="libmcheck">
|
---|
987 | <term><filename class="libraryfile">libmcheck</filename></term>
|
---|
988 | <listitem>
|
---|
989 | <para>Turns on memory allocation checking when linked to</para>
|
---|
990 | <indexterm zone="ch-system-glibc libmcheck">
|
---|
991 | <primary sortas="c-libmcheck">libmcheck</primary>
|
---|
992 | </indexterm>
|
---|
993 | </listitem>
|
---|
994 | </varlistentry>
|
---|
995 |
|
---|
996 | <varlistentry id="libmemusage">
|
---|
997 | <term><filename class="libraryfile">libmemusage</filename></term>
|
---|
998 | <listitem>
|
---|
999 | <para>Used by <command>memusage</command> to help collect
|
---|
1000 | information about the memory usage of a program</para>
|
---|
1001 | <indexterm zone="ch-system-glibc libmemusage">
|
---|
1002 | <primary sortas="c-libmemusage">libmemusage</primary>
|
---|
1003 | </indexterm>
|
---|
1004 | </listitem>
|
---|
1005 | </varlistentry>
|
---|
1006 |
|
---|
1007 | <varlistentry id="libnsl">
|
---|
1008 | <term><filename class="libraryfile">libnsl</filename></term>
|
---|
1009 | <listitem>
|
---|
1010 | <para>The network services library, now deprecated</para>
|
---|
1011 | <indexterm zone="ch-system-glibc libnsl">
|
---|
1012 | <primary sortas="c-libnsl">libnsl</primary>
|
---|
1013 | </indexterm>
|
---|
1014 | </listitem>
|
---|
1015 | </varlistentry>
|
---|
1016 |
|
---|
1017 | <varlistentry id="libnss">
|
---|
1018 | <term><filename class="libraryfile">libnss_*</filename></term>
|
---|
1019 | <listitem>
|
---|
1020 | <para>The Name Service Switch modules, containing functions for
|
---|
1021 | resolving host names, user names, group names, aliases, services,
|
---|
1022 | protocols, etc. Loaded by
|
---|
1023 | <filename class='libraryfile'>libc</filename> according to the
|
---|
1024 | configuration in <filename>/etc/nsswitch.conf</filename></para>
|
---|
1025 | <indexterm zone="ch-system-glibc libnss">
|
---|
1026 | <primary sortas="c-libnss">libnss_*</primary>
|
---|
1027 | </indexterm>
|
---|
1028 | </listitem>
|
---|
1029 | </varlistentry>
|
---|
1030 |
|
---|
1031 | <varlistentry id="libpcprofile">
|
---|
1032 | <term><filename class="libraryfile">libpcprofile</filename></term>
|
---|
1033 | <listitem>
|
---|
1034 | <para>Can be preloaded to PC profile an executable</para>
|
---|
1035 | <indexterm zone="ch-system-glibc libpcprofile">
|
---|
1036 | <primary sortas="c-libpcprofile">libpcprofile</primary>
|
---|
1037 | </indexterm>
|
---|
1038 | </listitem>
|
---|
1039 | </varlistentry>
|
---|
1040 |
|
---|
1041 | <varlistentry id="libpthread">
|
---|
1042 | <term><filename class="libraryfile">libpthread</filename></term>
|
---|
1043 | <listitem>
|
---|
1044 | <para>Dummy library containing no functions. Previously contained
|
---|
1045 | functions providing most of the interfaces specified
|
---|
1046 | by the POSIX.1c Threads Extensions and the semaphore interfaces
|
---|
1047 | specified by the POSIX.1b Real-time Extensions, now the functions
|
---|
1048 | are in <filename class="libraryfile">libc</filename></para>
|
---|
1049 | <indexterm zone="ch-system-glibc libpthread">
|
---|
1050 | <primary sortas="c-libpthread">libpthread</primary>
|
---|
1051 | </indexterm>
|
---|
1052 | </listitem>
|
---|
1053 | </varlistentry>
|
---|
1054 |
|
---|
1055 | <varlistentry id="libresolv">
|
---|
1056 | <term><filename class="libraryfile">libresolv</filename></term>
|
---|
1057 | <listitem>
|
---|
1058 | <para>Contains functions for creating, sending, and interpreting
|
---|
1059 | packets to the Internet domain name servers</para>
|
---|
1060 | <indexterm zone="ch-system-glibc libresolv">
|
---|
1061 | <primary sortas="c-libresolv">libresolv</primary>
|
---|
1062 | </indexterm>
|
---|
1063 | </listitem>
|
---|
1064 | </varlistentry>
|
---|
1065 |
|
---|
1066 | <varlistentry id="librt">
|
---|
1067 | <term><filename class="libraryfile">librt</filename></term>
|
---|
1068 | <listitem>
|
---|
1069 | <para>Contains functions providing most of the interfaces specified
|
---|
1070 | by the POSIX.1b Real-time Extensions</para>
|
---|
1071 | <indexterm zone="ch-system-glibc librt">
|
---|
1072 | <primary sortas="c-librt">librt</primary>
|
---|
1073 | </indexterm>
|
---|
1074 | </listitem>
|
---|
1075 | </varlistentry>
|
---|
1076 |
|
---|
1077 | <varlistentry id="libthread_db">
|
---|
1078 | <term><filename class="libraryfile">libthread_db</filename></term>
|
---|
1079 | <listitem>
|
---|
1080 | <para>Contains functions useful for building debuggers for
|
---|
1081 | multi-threaded programs</para>
|
---|
1082 | <indexterm zone="ch-system-glibc libthread_db">
|
---|
1083 | <primary sortas="c-libthread_db">libthread_db</primary>
|
---|
1084 | </indexterm>
|
---|
1085 | </listitem>
|
---|
1086 | </varlistentry>
|
---|
1087 |
|
---|
1088 | <varlistentry id="libutil">
|
---|
1089 | <term><filename class="libraryfile">libutil</filename></term>
|
---|
1090 | <listitem>
|
---|
1091 | <para>Dummy library containing no functions. Previously contained
|
---|
1092 | code for <quote>standard</quote> functions used in
|
---|
1093 | many different Unix utilities. These functions are now in
|
---|
1094 | <filename class="libraryfile">libc</filename></para>
|
---|
1095 | <indexterm zone="ch-system-glibc libutil">
|
---|
1096 | <primary sortas="c-libutil">libutil</primary>
|
---|
1097 | </indexterm>
|
---|
1098 | </listitem>
|
---|
1099 | </varlistentry>
|
---|
1100 |
|
---|
1101 | </variablelist>
|
---|
1102 |
|
---|
1103 | </sect2>
|
---|
1104 |
|
---|
1105 | </sect1>
|
---|