source: chapter08/glibc.xml

trunk
Last change on this file was f70694d, checked in by Xi Ruoyao <xry111@…>, 3 weeks ago

PAckage updates and a security fix.

Add security fix to glibc.
Update to linux-6.8.8.
Update to ncurses-6.5.

(cherry picked from commit d0ca5ead4668649d96eb6a9ed9e0269c15dfbe01)

Reapply this change which is mistakenly reverted in
340e17adc67a1d7dc050fed51e384122f425e458.

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