source: chapter06/glibc.xml@ b7e1c21

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since b7e1c21 was b7e1c21, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Update to gcc-9.1.0.
Update to linux-5.0.11.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11589 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 35.8 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
[b06ca36]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[673b0d8]4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
[6a82dd9]7
[81fd230]8<sect1 id="ch-system-glibc" role="wrap">
[6a82dd9]9 <?dbhtml filename="glibc.html"?>
10
[e747759]11 <sect1info condition="script">
12 <productname>glibc</productname>
13 <productnumber>&glibc-version;</productnumber>
14 <address>&glibc-url;</address>
15 </sect1info>
16
[6a82dd9]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>
[e4a5635]36 <seg>&glibc-ch6-sbu;</seg>
37 <seg>&glibc-ch6-du;</seg>
[6a82dd9]38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Glibc</title>
[12836f5]45
[d730742]46 <note><para>The Glibc build system is self-contained and will install
47 perfectly, even though the compiler specs file and linker are still
48 pointing to <filename class="directory">/tools</filename>. The specs
49 and linker cannot be adjusted before the Glibc install because the
50 Glibc autoconf tests would give false results and defeat the goal
51 of achieving a clean build.</para></note>
[6a82dd9]52
[0d84af1]53 <para>Some of the Glibc programs use the non-FHS compilant
[4028929]54 <filename class="directory">/var/db</filename> directory to store
55 their runtime data. Apply the following patch to make such programs
56 store their runtime data in the FHS-compliant locations:</para>
57
58<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
[869b0966]59<!--
[3b4e848]60 <para>Fix a minor security issue with glob functions:</para>
61
62<screen><userinput remap="pre">patch -Np1 -i ../&glibc-glob-patch;</userinput></screen>
[797ada6]63--><!--
[0967c90]64 <para>First create a compatibility symlink to avoid references to /tools in
65 our final glibc:</para>
66
67<screen><userinput remap="pre">ln -sfv /tools/lib/gcc /usr/lib</userinput></screen>
[797ada6]68-->
69 <para>Create a symlink for LSB
[0967c90]70 compliance. Additionally, for x86_64, create a compatibility symlink
71 required for the dynamic loader to function correctly:</para>
[be3d9f3]72
73<screen><userinput remap="pre">case $(uname -m) in
[797ada6]74 i?86) ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3
[be3d9f3]75 ;;
[797ada6]76 x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64
[ffbeb5f]77 ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
[be3d9f3]78 ;;
79esac</userinput></screen>
[797ada6]80<!--
[ffbeb5f]81 <para>Remove a file that may be left over from a previous build attempt:
82 </para>
83
84<screen><userinput remap="pre">rm -f /usr/include/limits.h</userinput></screen>
[797ada6]85-->
[f1dd547]86 <para>The Glibc documentation recommends building Glibc
87 in a dedicated build directory:</para>
[73aedd1d]88
[f1dd547]89<screen><userinput remap="pre">mkdir -v build
90cd build</userinput></screen>
[c906b7e]91
[6a82dd9]92 <para>Prepare Glibc for compilation:</para>
[73aedd1d]93
[797ada6]94<screen><userinput remap="configure">CC="gcc -ffile-prefix-map=/tools=/usr" \
[0967c90]95../configure --prefix=/usr \
96 --disable-werror \
[5c0c6f9]97 --enable-kernel=&min-kernel; \
[0967c90]98 --enable-stack-protector=strong \
[115f65b]99 --with-headers=/usr/include \
[797ada6]100 libc_cv_slibdir=/lib</userinput></screen>
[73aedd1d]101
[5897639]102 <variablelist>
[0967c90]103 <title>The meaning of the options and new configure parameters:</title>
104
105 <varlistentry>
[797ada6]106 <term><parameter>CC="gcc -ffile-prefix-map=/tools=/usr"</parameter></term>
[0967c90]107 <listitem>
[797ada6]108 <para>Make GCC record any references to files in /tools in result
109 of the compilation as if the files resided in /usr. This avoids
110 introduction of invalid paths in debugging symbols.</para>
[0967c90]111 </listitem>
112 </varlistentry>
[5897639]113
114 <varlistentry>
115 <term><parameter>--disable-werror</parameter></term>
116 <listitem>
117 <para>This option disables the -Werror option passed to
118 GCC. This is necessary for running the test suite.</para>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term><parameter>--enable-stack-protector=strong</parameter></term>
124 <listitem>
[0d84af1]125 <para>This option increases system security by adding
126 extra code to check for buffer overflows, such as stack
127 smashing attacks.</para>
[5897639]128 </listitem>
129 </varlistentry>
130
[115f65b]131 <varlistentry>
132 <term><parameter>--with-headers=/usr/include</parameter></term>
133 <listitem>
134 <para>This option tells the build system where to find the
135 kernel API headers. By default, those headers are sought in
136 <filename class="directory">/tools/include</filename>.</para>
137 </listitem>
138 </varlistentry>
139
[5897639]140 <varlistentry>
141 <term><parameter>libc_cv_slibdir=/lib</parameter></term>
142 <listitem>
143 <para>This variable sets the correct library for all
144 systems. We do not want lib64 to be used.</para>
145 </listitem>
146 </varlistentry>
147
148 </variablelist>
149
[6a82dd9]150 <para>Compile the package:</para>
[73aedd1d]151
[0445a3d]152<screen><userinput remap="make">make</userinput></screen>
[73aedd1d]153
[6a82dd9]154 <important>
155 <para>In this section, the test suite for Glibc is considered critical.
156 Do not skip it under any circumstance.</para>
157 </important>
[81fd230]158
[0d84af1]159 <para>Generally a few tests do not pass. The test failures listed below
160 are usually safe to ignore.</para>
[d9c836b]161
[082bbce]162<!-- Use remap="make" here to work around a jhalfs issue. -->
163<screen><userinput remap="make">case $(uname -m) in
[1b3fac7]164 i?86) ln -sfnv $PWD/elf/ld-linux.so.2 /lib ;;
165 x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2 /lib ;;
[082bbce]166esac</userinput></screen>
[2e02c35]167
[70b235f4]168 <note><para>The symbolic link above is needed to run the tests at this
169 stage of building in the chroot envirnment. It will be overwritten
170 in the install phase below.</para></note>
171
[082bbce]172<screen><userinput remap="test">make check</userinput></screen>
173
[5897639]174 <para>You may see some test failures. The Glibc test suite is
[3b66f6a]175 somewhat dependent on the host system. This is a list of the most common
[5897639]176 issues seen for some versions of LFS:</para>
[6a82dd9]177
178 <itemizedlist>
[5d1f0157]179
[b7e1c21]180 <listitem>
181 <para><emphasis>misc/check-installed-headers-c</emphasis>
182 is known to fail due to changes in the kernel headers.</para>
183 </listitem>
184
[751a13d]185 <listitem>
186 <para><emphasis>misc/tst-ttyname</emphasis>
187 is known to fail in the LFS chroot environment.</para>
188 </listitem>
[f783741]189
[efca30a]190 <listitem>
191 <para><emphasis>inet/tst-idna_name_classify</emphasis>
192 is known to fail in the LFS chroot environment.</para>
193 </listitem>
[f783741]194
[0238d49]195 <listitem>
[5897639]196 <para><emphasis>posix/tst-getaddrinfo4</emphasis> and
197 <emphasis>posix/tst-getaddrinfo5</emphasis>
198 may fail on some architectures.</para>
[0238d49]199 </listitem>
[de6905d]200
201 <listitem>
202 <para>The <emphasis>nss/tst-nss-files-hosts-multi</emphasis>
203 test may fail for reasons that have not been determined.</para>
204 </listitem>
205
[d9c836b]206 <listitem>
[1b3fac7]207 <para>The <emphasis>rt/tst-cputimer{1,2,3}</emphasis> tests depend on
208 the host system kernel. Kernels 4.14.91&ndash;4.14.96,
209 4.19.13&ndash;4.19.18, and 4.20.0&ndash;4.20.5 are known to
[235556a]210 cause these tests to fail.
[1b3fac7]211 </para>
[6a82dd9]212 </listitem>
[a271796]213
[6a82dd9]214 <listitem>
[a0ec869]215 <para>The math tests sometimes fail when running on
[9218b05]216 systems where the CPU is not a relatively new Intel or
217 AMD processor.</para>
[6a82dd9]218 </listitem>
[5ed8d0a]219<!--
[6934b62]220 <listitem>
221 <para>The
222 <emphasis>nptl/tst-thread-affinity-{pthread,pthread2,sched}</emphasis>
223 tests may fail for reasons that have not been determined. </para>
224 </listitem>
[9218b05]225
[ee321a46]226 <listitem>
[5d1f0157]227 <para>Other tests known to fail on some architectures are
[326224b]228 malloc/tst-malloc-usable and nptl/tst-cleanupx4. </para>
[ee321a46]229 </listitem>
[751a13d]230-->
[6a82dd9]231 </itemizedlist>
232
233 <para>Though it is a harmless message, the install stage of Glibc will
234 complain about the absence of <filename>/etc/ld.so.conf</filename>.
235 Prevent this warning with:</para>
[1caa48e]236
[0445a3d]237<screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen>
[1caa48e]238
[1a2bc54]239 <para>Fix the generated Makefile to skip an unneeded sanity check
[ffbeb5f]240 that fails in the LFS partial environment:
241 </para>
242
243<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
244
[6a82dd9]245 <para>Install the package:</para>
[73aedd1d]246
[0445a3d]247<screen><userinput remap="install">make install</userinput></screen>
[73aedd1d]248
[4028929]249 <para>Install the configuration file and runtime directory for
250 <command>nscd</command>:</para>
251
[f1dd547]252<screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
[4028929]253mkdir -pv /var/cache/nscd</userinput></screen>
254
[1118b17]255 <para revision="systemd">Install the systemd support files for
256 <command>nscd</command>:</para>
257
258 <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
259install -v -Dm644 ../nscd/nscd.service /lib/systemd/system/nscd.service</userinput></screen>
260
[d730742]261 <para>Next, install the locales that can make the system respond in a
262 different language. None of the locales are required, but if some of them
263 are missing, the test suites of future packages would skip important
264 testcases.</para>
[6a82dd9]265
266 <para>Individual locales can be installed using the
267 <command>localedef</command> program. E.g., the first
268 <command>localedef</command> command below combines the
[fffccab]269 <filename>/usr/share/i18n/locales/cs_CZ</filename>
[6a82dd9]270 charset-independent locale definition with the
[fffccab]271 <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename>
[6a82dd9]272 charmap definition and appends the result to the
273 <filename>/usr/lib/locale/locale-archive</filename> file.
274 The following instructions will install the minimum set of
275 locales necessary for the optimal coverage of tests:</para>
[3f0c882]276
[0445a3d]277<screen role="nodump"><userinput remap="locale-test">mkdir -pv /usr/lib/locale
[75828c3]278localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
[1e77f0c]279localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
[73aedd1d]280localedef -i de_DE -f ISO-8859-1 de_DE
281localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
[1e77f0c]282localedef -i de_DE -f UTF-8 de_DE.UTF-8
[75828c3]283localedef -i el_GR -f ISO-8859-7 el_GR
[e9aabce]284localedef -i en_GB -f UTF-8 en_GB.UTF-8
[73aedd1d]285localedef -i en_HK -f ISO-8859-1 en_HK
286localedef -i en_PH -f ISO-8859-1 en_PH
287localedef -i en_US -f ISO-8859-1 en_US
[3a35b11]288localedef -i en_US -f UTF-8 en_US.UTF-8
[73aedd1d]289localedef -i es_MX -f ISO-8859-1 es_MX
[673b0d8]290localedef -i fa_IR -f UTF-8 fa_IR
[73aedd1d]291localedef -i fr_FR -f ISO-8859-1 fr_FR
292localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
[d93d1c90]293localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
[73aedd1d]294localedef -i it_IT -f ISO-8859-1 it_IT
[5b36d32]295localedef -i it_IT -f UTF-8 it_IT.UTF-8
[1e77f0c]296localedef -i ja_JP -f EUC-JP ja_JP
[75828c3]297localedef -i ja_JP -f SHIFT_JIS ja_JP.SIJS 2> /dev/null || true
[74f027f]298localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
[5b36d32]299localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
300localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
[fffccab]301localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
[75828c3]302localedef -i zh_CN -f GB18030 zh_CN.GB18030
303localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS</userinput></screen>
[73aedd1d]304
[6a82dd9]305 <para>In addition, install the locale for your own country, language and
306 character set.</para>
[fa21b3d]307
[6a82dd9]308 <para>Alternatively, install all locales listed in the
309 <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
310 (it includes every locale listed above and many more) at once with the
311 following time-consuming command:</para>
[fa21b3d]312
[0445a3d]313<screen><userinput remap="locale-full">make localedata/install-locales</userinput></screen>
[fa21b3d]314
[6a82dd9]315 <para>Then use the <command>localedef</command> command to create and
316 install locales not listed in the
317 <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
[5a25e0a]318 in the unlikely case you need them.</para>
[6a82dd9]319
[3b03219]320 <note><para>Glibc now uses libidn2 when resolving internationalized
321 domain names. This is a run time dependency. If this capability
[235556a]322 is needed, the instructions for installing libidn2 are in the
[3b03219]323 <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>.
324 </para></note>
325
[6a82dd9]326 </sect2>
[94aa6621]327
[6a82dd9]328 <sect2 id="conf-glibc" role="configuration">
329 <title>Configuring Glibc</title>
[5888299]330
[6a82dd9]331 <indexterm zone="conf-glibc">
332 <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
333 </indexterm>
[81fd230]334
[6a82dd9]335 <indexterm zone="conf-glibc">
336 <primary sortas="e-/etc/localtime">/etc/localtime</primary>
337 </indexterm>
[342b176]338
[a72ca33]339 <sect3>
340 <title>Adding nsswitch.conf</title>
341
[6a82dd9]342 <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
[a72ca33]343 because the Glibc defaults do not work well in a networked environment.
344 </para>
[6a82dd9]345
346 <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
347 following:</para>
[342b176]348
[bb55064]349<screen><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
[d72e04a]350<literal># Begin /etc/nsswitch.conf
[342b176]351
352passwd: files
353group: files
354shadow: files
355
356hosts: files dns
357networks: files
358
[4a80bec]359protocols: files
360services: files
361ethers: files
362rpc: files
[342b176]363
[d72e04a]364# End /etc/nsswitch.conf</literal>
[bb55064]365EOF</userinput></screen>
[342b176]366
[a72ca33]367 </sect3>
368
369 <sect3>
370 <title>Adding time zone data</title>
371
[edbeeb5]372 <para>Install and set up the time zone data with the following:</para>
[f1dd547]373<screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
[f1c177f]374
[ea31e92]375ZONEINFO=/usr/share/zoneinfo
[2ca8941]376mkdir -pv $ZONEINFO/{posix,right}
[ea31e92]377
378for tz in etcetera southamerica northamerica europe africa antarctica \
[fabfe841]379 asia australasia backward pacificnew systemv; do
[082bbce]380 zic -L /dev/null -d $ZONEINFO ${tz}
381 zic -L /dev/null -d $ZONEINFO/posix ${tz}
382 zic -L leapseconds -d $ZONEINFO/right ${tz}
[287a36b4]383done
[f0f7ea0]384
[f1d755b]385cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO
[ea31e92]386zic -d $ZONEINFO -p America/New_York
387unset ZONEINFO</userinput></screen>
[f1c177f]388
[7a6bcf9]389 <variablelist>
390 <title>The meaning of the zic commands:</title>
391
392 <varlistentry>
393 <term><parameter>zic -L /dev/null ...</parameter></term>
394 <listitem>
[edbeeb5]395 <para>This creates posix time zones, without any leap seconds. It is
[7a6bcf9]396 conventional to put these in both
397 <filename class="directory">zoneinfo</filename> and
398 <filename class="directory">zoneinfo/posix</filename>. It is
[edbeeb5]399 necessary to put the POSIX time zones in
[7a6bcf9]400 <filename class="directory">zoneinfo</filename>, otherwise various
401 test-suites will report errors. On an embedded system, where space is
[edbeeb5]402 tight and you do not intend to ever update the time zones, you could save
[7a6bcf9]403 1.9MB by not using the <filename class="directory">posix</filename>
[7bb9fda]404 directory, but some applications or test-suites might produce some
405 failures.</para>
[7a6bcf9]406 </listitem>
407 </varlistentry>
408 <varlistentry>
409 <term><parameter>zic -L leapseconds ...</parameter></term>
410 <listitem>
[edbeeb5]411 <para>This creates right time zones, including leap seconds. On an
[7a6bcf9]412 embedded system, where space is tight and you do not intend to
[edbeeb5]413 ever update the time zones, or care about the correct time, you could
[7a6bcf9]414 save 1.9MB by omitting the <filename class="directory">right</filename>
415 directory.</para>
416 </listitem>
417 </varlistentry>
418 <varlistentry>
419 <term><parameter>zic ... -p ...</parameter></term>
420 <listitem>
[d7f2eb0]421 <para>This creates the <filename>posixrules</filename> file. We use
[cb02946]422 New York because POSIX requires the daylight savings time rules
[e7134f1]423 to be in accordance with US rules.</para>
[7a6bcf9]424 </listitem>
425 </varlistentry>
426 </variablelist>
427
428
429 <para>One way to determine the local time zone is to run the following
[e1060de]430 script:</para>
[342b176]431
[be4be92]432<screen role="nodump"><userinput>tzselect</userinput></screen>
[342b176]433
[6a82dd9]434 <para>After answering a few questions about the location, the script will
[e1060de]435 output the name of the time zone (e.g.,
436 <emphasis>America/Edmonton</emphasis>). There are also some other possible
[edbeeb5]437 time zones listed in <filename
[e1060de]438 class='directory'>/usr/share/zoneinfo</filename> such as
439 <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that
440 are not identified by the script but can be used.</para>
441
442 <para>Then create the <filename>/etc/localtime</filename> file by
443 running:</para>
[342b176]444
[1118b17]445<screen revision="sysv"><userinput>cp -v /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
446
447<screen revision="systemd"><userinput>ln -sfv /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
[342b176]448
[e1060de]449 <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the
450 time zone selected (e.g., Canada/Eastern).</para>
[6a82dd9]451
[a72ca33]452 </sect3>
[6a82dd9]453
[a72ca33]454 <sect3 id="conf-ld" role="configuration">
[6a82dd9]455 <title>Configuring the Dynamic Loader</title>
456
457 <indexterm zone="conf-ld">
458 <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
459 </indexterm>
460
461 <para>By default, the dynamic loader (<filename
462 class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
463 <filename class="directory">/lib</filename> and <filename
464 class="directory">/usr/lib</filename> for dynamic libraries that are
465 needed by programs as they are run. However, if there are libraries in
466 directories other than <filename class="directory">/lib</filename> and
467 <filename class="directory">/usr/lib</filename>, these need to be added
468 to the <filename>/etc/ld.so.conf</filename> file in order for the
469 dynamic loader to find them. Two directories that are commonly known
470 to contain additional libraries are <filename
471 class="directory">/usr/local/lib</filename> and <filename
472 class="directory">/opt/lib</filename>, so add those directories to the
473 dynamic loader's search path.</para>
474
475 <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
476 following:</para>
[342b176]477
[bb55064]478<screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"
[d72e04a]479<literal># Begin /etc/ld.so.conf
[342b176]480/usr/local/lib
481/opt/lib
[50f648b]482</literal>
[bb55064]483EOF</userinput></screen>
[342b176]484
[50f648b]485 <para>If desired, the dynamic loader can also search a directory and
[2ca8941]486 include the contents of files found there. Generally the files in
[50f648b]487 this include directory are one line specifying the desired library path.
488 To add this capability run the following commands:</para>
489
490<screen role="nodump"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
491<literal># Add an include directory
492include /etc/ld.so.conf.d/*.conf
493</literal>
494EOF
[3d086301]495mkdir -pv /etc/ld.so.conf.d</userinput></screen>
[50f648b]496
[a72ca33]497 </sect3>
[6a82dd9]498 </sect2>
499
500 <sect2 id="contents-glibc" role="content">
501 <title>Contents of Glibc</title>
502
503 <segmentedlist>
504 <segtitle>Installed programs</segtitle>
505 <segtitle>Installed libraries</segtitle>
[fe05b08]506 <segtitle>Installed directories</segtitle>
[6a82dd9]507
508 <seglistitem>
509 <seg>catchsegv, gencat, getconf, getent, iconv, iconvconfig, ldconfig,
[5bf238b]510 ldd, lddlibc4, locale, localedef, makedb, mtrace, nscd,
[78cc3be]511 pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
[6a82dd9]512 zdump, and zic</seg>
[5ef820b]513 <seg>ld-&glibc-version;.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so},
[78cc3be]514 libc.{a,so}, libc_nonshared.a,
515 libcrypt.{a,so}, libdl.{a,so}, libg.a, libm.{a,so},
516 libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.{a,so},
517 libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
518 libpcprofile.so, libpthread.{a,so},
519 libpthread_nonshared.a, libresolv.{a,so}, librt.{a,so},
[2791a8e]520 libthread_db.so, and libutil.{a,so}</seg>
[fe05b08]521 <seg>/usr/include/arpa, /usr/include/bits, /usr/include/gnu,
522 /usr/include/net, /usr/include/netash, /usr/include/netatalk,
523 /usr/include/netax25, /usr/include/neteconet, /usr/include/netinet,
524 /usr/include/netipx, /usr/include/netiucv, /usr/include/netpacket,
525 /usr/include/netrom, /usr/include/netrose, /usr/include/nfs,
[78cc3be]526 /usr/include/protocols, /usr/include/rpc,
[4028929]527 /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale,
528 /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo,
[7bb9fda]529 /var/cache/nscd, and /var/lib/nss_db</seg>
[6a82dd9]530 </seglistitem>
531 </segmentedlist>
532
533 <variablelist>
534 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
535 <?dbfo list-presentation="list"?>
536 <?dbhtml list-presentation="table"?>
537
538 <varlistentry id="catchsegv">
539 <term><command>catchsegv</command></term>
540 <listitem>
541 <para>Can be used to create a stack trace when a program
542 terminates with a segmentation fault</para>
543 <indexterm zone="ch-system-glibc catchsegv">
544 <primary sortas="b-catchsegv">catchsegv</primary>
545 </indexterm>
546 </listitem>
547 </varlistentry>
548
549 <varlistentry id="gencat">
550 <term><command>gencat</command></term>
551 <listitem>
552 <para>Generates message catalogues</para>
553 <indexterm zone="ch-system-glibc gencat">
554 <primary sortas="b-gencat">gencat</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
559 <varlistentry id="getconf">
560 <term><command>getconf</command></term>
561 <listitem>
562 <para>Displays the system configuration values for file system
563 specific variables</para>
564 <indexterm zone="ch-system-glibc getconf">
565 <primary sortas="b-getconf">getconf</primary>
566 </indexterm>
567 </listitem>
568 </varlistentry>
569
570 <varlistentry id="getent">
571 <term><command>getent</command></term>
572 <listitem>
573 <para>Gets entries from an administrative database</para>
574 <indexterm zone="ch-system-glibc getent">
575 <primary sortas="b-getent">getent</primary>
576 </indexterm>
577 </listitem>
578 </varlistentry>
579
580 <varlistentry id="iconv">
581 <term><command>iconv</command></term>
582 <listitem>
583 <para>Performs character set conversion</para>
584 <indexterm zone="ch-system-glibc iconv">
585 <primary sortas="b-iconv">iconv</primary>
586 </indexterm>
587 </listitem>
588 </varlistentry>
589
590 <varlistentry id="iconvconfig">
591 <term><command>iconvconfig</command></term>
592 <listitem>
593 <para>Creates fastloading <command>iconv</command> module configuration
594 files</para>
595 <indexterm zone="ch-system-glibc iconvconfig">
596 <primary sortas="b-iconvconfig">iconvconfig</primary>
597 </indexterm>
598 </listitem>
599 </varlistentry>
600
601 <varlistentry id="ldconfig">
602 <term><command>ldconfig</command></term>
603 <listitem>
604 <para>Configures the dynamic linker runtime bindings</para>
605 <indexterm zone="ch-system-glibc ldconfig">
606 <primary sortas="b-ldconfig">ldconfig</primary>
607 </indexterm>
608 </listitem>
609 </varlistentry>
610
611 <varlistentry id="ldd">
612 <term><command>ldd</command></term>
613 <listitem>
614 <para>Reports which shared libraries are required
615 by each given program or shared library</para>
616 <indexterm zone="ch-system-glibc ldd">
617 <primary sortas="b-ldd">ldd</primary>
618 </indexterm>
619 </listitem>
620 </varlistentry>
621
622 <varlistentry id="lddlibc4">
623 <term><command>lddlibc4</command></term>
624 <listitem>
625 <para>Assists <command>ldd</command> with object files</para>
626 <indexterm zone="ch-system-glibc lddlibc4">
627 <primary sortas="b-lddlibc4">lddlibc4</primary>
628 </indexterm>
629 </listitem>
630 </varlistentry>
631
632 <varlistentry id="locale">
633 <term><command>locale</command></term>
634 <listitem>
635 <para>Prints various information about the current locale</para>
636 <indexterm zone="ch-system-glibc locale">
637 <primary sortas="b-locale">locale</primary>
638 </indexterm>
639 </listitem>
640 </varlistentry>
641
642 <varlistentry id="localedef">
643 <term><command>localedef</command></term>
644 <listitem>
645 <para>Compiles locale specifications</para>
646 <indexterm zone="ch-system-glibc localedef">
647 <primary sortas="b-localedef">localedef</primary>
648 </indexterm>
649 </listitem>
650 </varlistentry>
651
[ca101ad]652 <varlistentry id="makedb">
653 <term><command>makedb</command></term>
654 <listitem>
655 <para>Creates a simple database from textual input</para>
656 <indexterm zone="ch-system-glibc makedb">
657 <primary sortas="b-makedb">makedb</primary>
658 </indexterm>
659 </listitem>
660 </varlistentry>
661
[6a82dd9]662 <varlistentry id="mtrace">
663 <term><command>mtrace</command></term>
664 <listitem>
665 <para>Reads and interprets a memory trace file and displays a summary
666 in human-readable format</para>
667 <indexterm zone="ch-system-glibc mtrace">
668 <primary sortas="b-mtrace">mtrace</primary>
669 </indexterm>
670 </listitem>
671 </varlistentry>
672
673 <varlistentry id="nscd">
674 <term><command>nscd</command></term>
675 <listitem>
676 <para>A daemon that provides a cache for the most common name
677 service requests</para>
678 <indexterm zone="ch-system-glibc nscd">
679 <primary sortas="b-nscd">nscd</primary>
680 </indexterm>
681 </listitem>
682 </varlistentry>
[1118b17]683
[78cc3be]684 <varlistentry id="pcprofiledump">
685 <term><command>pcprofiledump</command></term>
686 <listitem>
687 <para>Dump information generated by PC profiling</para>
688 <indexterm zone="ch-system-glibc pcprofiledump">
689 <primary sortas="b-pcprofiledump">pcprofiledump</primary>
690 </indexterm>
691 </listitem>
692 </varlistentry>
693
[ca101ad]694 <varlistentry id="pldd">
695 <term><command>pldd</command></term>
696 <listitem>
697 <para>Lists dynamic shared objects used by running processes</para>
698 <indexterm zone="ch-system-glibc pldd">
699 <primary sortas="b-pldd">pldd</primary>
700 </indexterm>
701 </listitem>
702 </varlistentry>
[1118b17]703
[6a82dd9]704 <varlistentry id="sln">
705 <term><command>sln</command></term>
706 <listitem>
707 <para>A statically linked <command>ln</command> program</para>
708 <indexterm zone="ch-system-glibc sln">
709 <primary sortas="b-sln">sln</primary>
710 </indexterm>
711 </listitem>
712 </varlistentry>
713
[3119ddc]714 <varlistentry id="sotruss">
715 <term><command>sotruss</command></term>
716 <listitem>
717 <para>Traces shared library procedure calls of a specified command</para>
718 <indexterm zone="ch-system-glibc sotruss">
719 <primary sortas="b-sotruss">sotruss</primary>
720 </indexterm>
721 </listitem>
722 </varlistentry>
723
[6a82dd9]724 <varlistentry id="sprof">
725 <term><command>sprof</command></term>
726 <listitem>
727 <para>Reads and displays shared object profiling data</para>
728 <indexterm zone="ch-system-glibc sprof">
729 <primary sortas="b-sprof">sprof</primary>
730 </indexterm>
731 </listitem>
732 </varlistentry>
733
734 <varlistentry id="tzselect">
735 <term><command>tzselect</command></term>
736 <listitem>
737 <para>Asks the user about the location of the system and reports
738 the corresponding time zone description</para>
739 <indexterm zone="ch-system-glibc tzselect">
740 <primary sortas="b-tzselect">tzselect</primary>
741 </indexterm>
742 </listitem>
743 </varlistentry>
744
745 <varlistentry id="xtrace">
746 <term><command>xtrace</command></term>
747 <listitem>
748 <para>Traces the execution of a program by printing the currently
749 executed function</para>
750 <indexterm zone="ch-system-glibc xtrace">
751 <primary sortas="b-xtrace">xtrace</primary>
752 </indexterm>
753 </listitem>
754 </varlistentry>
755
756 <varlistentry id="zdump">
757 <term><command>zdump</command></term>
758 <listitem>
759 <para>The time zone dumper</para>
760 <indexterm zone="ch-system-glibc zdump">
761 <primary sortas="b-zdump">zdump</primary>
762 </indexterm>
763 </listitem>
764 </varlistentry>
765
766 <varlistentry id="zic">
767 <term><command>zic</command></term>
768 <listitem>
769 <para>The time zone compiler</para>
770 <indexterm zone="ch-system-glibc zic">
771 <primary sortas="b-zic">zic</primary>
772 </indexterm>
773 </listitem>
774 </varlistentry>
775
776 <varlistentry id="ld.so">
[5ef820b]777 <term><filename class="libraryfile">ld-&glibc-version;.so</filename></term>
[6a82dd9]778 <listitem>
779 <para>The helper program for shared library executables</para>
780 <indexterm zone="ch-system-glibc ld.so">
[5ef820b]781 <primary sortas="c-ld.so">ld-&glibc-version;.so</primary>
[6a82dd9]782 </indexterm>
783 </listitem>
784 </varlistentry>
785
786 <varlistentry id="libBrokenLocale">
787 <term><filename class="libraryfile">libBrokenLocale</filename></term>
788 <listitem>
789 <para>Used internally by Glibc as a gross hack to get broken programs
790 (e.g., some Motif applications) running. See comments in
791 <filename>glibc-&glibc-version;/locale/broken_cur_max.c</filename>
792 for more information</para>
793 <indexterm zone="ch-system-glibc libBrokenLocale">
794 <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
795 </indexterm>
796 </listitem>
797 </varlistentry>
798
799 <varlistentry id="libSegFault">
800 <term><filename class="libraryfile">libSegFault</filename></term>
801 <listitem>
802 <para>The segmentation fault signal handler, used by
803 <command>catchsegv</command></para>
804 <indexterm zone="ch-system-glibc libSegFault">
805 <primary sortas="c-libSegFault">libSegFault</primary>
806 </indexterm>
807 </listitem>
808 </varlistentry>
809
810 <varlistentry id="libanl">
811 <term><filename class="libraryfile">libanl</filename></term>
812 <listitem>
813 <para>An asynchronous name lookup library</para>
814 <indexterm zone="ch-system-glibc libanl">
815 <primary sortas="c-libanl">libanl</primary>
816 </indexterm>
817 </listitem>
818 </varlistentry>
819
820 <varlistentry id="libc">
821 <term><filename class="libraryfile">libc</filename></term>
822 <listitem>
823 <para>The main C library</para>
824 <indexterm zone="ch-system-glibc libc">
825 <primary sortas="c-libc">libc</primary>
826 </indexterm>
827 </listitem>
828 </varlistentry>
829
830 <varlistentry id="libcrypt">
831 <term><filename class="libraryfile">libcrypt</filename></term>
832 <listitem>
833 <para>The cryptography library</para>
834 <indexterm zone="ch-system-glibc libcrypt">
835 <primary sortas="c-libcrypt">libcrypt</primary>
836 </indexterm>
837 </listitem>
838 </varlistentry>
839
840 <varlistentry id="libdl">
841 <term><filename class="libraryfile">libdl</filename></term>
842 <listitem>
843 <para>The dynamic linking interface library</para>
844 <indexterm zone="ch-system-glibc libdl">
845 <primary sortas="c-libdl">libdl</primary>
846 </indexterm>
847 </listitem>
848 </varlistentry>
849
850 <varlistentry id="libg">
851 <term><filename class="libraryfile">libg</filename></term>
852 <listitem>
853 <para>Dummy library containing no functions. Previously was a runtime
854 library for <command>g++</command></para>
855 <indexterm zone="ch-system-glibc libg">
856 <primary sortas="c-libg">libg</primary>
857 </indexterm>
858 </listitem>
859 </varlistentry>
860
861 <varlistentry id="libm">
862 <term><filename class="libraryfile">libm</filename></term>
863 <listitem>
864 <para>The mathematical library</para>
865 <indexterm zone="ch-system-glibc libm">
866 <primary sortas="c-libm">libm</primary>
867 </indexterm>
868 </listitem>
869 </varlistentry>
870
871 <varlistentry id="libmcheck">
872 <term><filename class="libraryfile">libmcheck</filename></term>
873 <listitem>
874 <para>Turns on memory allocation checking when linked to</para>
875 <indexterm zone="ch-system-glibc libmcheck">
876 <primary sortas="c-libmcheck">libmcheck</primary>
877 </indexterm>
878 </listitem>
879 </varlistentry>
880
881 <varlistentry id="libmemusage">
882 <term><filename class="libraryfile">libmemusage</filename></term>
883 <listitem>
884 <para>Used by <command>memusage</command> to help collect
885 information about the memory usage of a program</para>
886 <indexterm zone="ch-system-glibc libmemusage">
887 <primary sortas="c-libmemusage">libmemusage</primary>
888 </indexterm>
889 </listitem>
890 </varlistentry>
891
892 <varlistentry id="libnsl">
893 <term><filename class="libraryfile">libnsl</filename></term>
894 <listitem>
895 <para>The network services library</para>
896 <indexterm zone="ch-system-glibc libnsl">
897 <primary sortas="c-libnsl">libnsl</primary>
898 </indexterm>
899 </listitem>
900 </varlistentry>
901
902 <varlistentry id="libnss">
903 <term><filename class="libraryfile">libnss</filename></term>
904 <listitem>
905 <para>The Name Service Switch libraries, containing functions for
906 resolving host names, user names, group names, aliases, services,
907 protocols, etc.</para>
908 <indexterm zone="ch-system-glibc libnss">
909 <primary sortas="c-libnss">libnss</primary>
910 </indexterm>
911 </listitem>
912 </varlistentry>
[1118b17]913
[78cc3be]914 <varlistentry id="libpcprofile">
915 <term><filename class="libraryfile">libpcprofile</filename></term>
916 <listitem>
917 <para>Can be preloaded to PC profile an executable</para>
918 <indexterm zone="ch-system-glibc libpcprofile">
919 <primary sortas="c-libpcprofile">libpcprofile</primary>
920 </indexterm>
921 </listitem>
922 </varlistentry>
923
[6a82dd9]924 <varlistentry id="libpthread">
925 <term><filename class="libraryfile">libpthread</filename></term>
926 <listitem>
927 <para>The POSIX threads library</para>
928 <indexterm zone="ch-system-glibc libpthread">
929 <primary sortas="c-libpthread">libpthread</primary>
930 </indexterm>
931 </listitem>
932 </varlistentry>
933
934 <varlistentry id="libresolv">
935 <term><filename class="libraryfile">libresolv</filename></term>
936 <listitem>
937 <para>Contains functions for creating, sending, and interpreting
938 packets to the Internet domain name servers</para>
939 <indexterm zone="ch-system-glibc libresolv">
940 <primary sortas="c-libresolv">libresolv</primary>
941 </indexterm>
942 </listitem>
943 </varlistentry>
944
945 <varlistentry id="librt">
946 <term><filename class="libraryfile">librt</filename></term>
947 <listitem>
948 <para>Contains functions providing most of the interfaces specified
949 by the POSIX.1b Realtime Extension</para>
950 <indexterm zone="ch-system-glibc librt">
951 <primary sortas="c-librt">librt</primary>
952 </indexterm>
953 </listitem>
954 </varlistentry>
955
956 <varlistentry id="libthread_db">
957 <term><filename class="libraryfile">libthread_db</filename></term>
958 <listitem>
959 <para>Contains functions useful for building debuggers for
960 multi-threaded programs</para>
961 <indexterm zone="ch-system-glibc libthread_db">
962 <primary sortas="c-libthread_db">libthread_db</primary>
963 </indexterm>
964 </listitem>
965 </varlistentry>
966
967 <varlistentry id="libutil">
968 <term><filename class="libraryfile">libutil</filename></term>
969 <listitem>
970 <para>Contains code for <quote>standard</quote> functions used in
971 many different Unix utilities</para>
972 <indexterm zone="ch-system-glibc libutil">
973 <primary sortas="c-libutil">libutil</primary>
974 </indexterm>
975 </listitem>
976 </varlistentry>
977
978 </variablelist>
979
980 </sect2>
[673b0d8]981
982</sect1>
Note: See TracBrowser for help on using the repository browser.