source: chapter06/glibc.xml@ 338c63f

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 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 338c63f was e8d05b3f, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Remove a workaround for sysdeps/unix/sysv/linux/bits/socket.h
that is no longer needed.

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

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