source: chapter08/glibc.xml@ e9ba461b

xry111/mips64el
Last change on this file since e9ba461b was 421c12a, checked in by Xi Ruoyao <xry111@…>, 4 days ago

mips64el: glibc: Update known failures

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