source: chapter08/glibc.xml@ 89ef06f

multilib xry111/multilib
Last change on this file since 89ef06f was 3830377, checked in by Thomas Trepl <thomas@…>, 7 weeks ago

Automatic merge of trunk into multilib

  • Property mode set to 100644
File size: 46.2 KB
RevLine 
[7152faa]1<?xml version="1.0" encoding="UTF-8"?>
[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>
[6dfcfecc]36 <seg>&glibc-fin-sbu;</seg>
37 <seg>&glibc-fin-du;</seg>
[6a82dd9]38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Glibc</title>
[12836f5]45
[725ef3b]46 <para>Some of the Glibc programs use the non-FHS compliant
[4028929]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>
[44c3358]52<!--
[f70694d]53 <para>Now fix a security vulnerability:</para>
54
55<screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-patch;</userinput></screen>
[44c3358]56-->
[d672ab7]57 <para>The Glibc documentation recommends building Glibc
[f1dd547]58 in a dedicated build directory:</para>
[73aedd1d]59
[f1dd547]60<screen><userinput remap="pre">mkdir -v build
61cd build</userinput></screen>
[c906b7e]62
[4eee9cc]63 <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
[bcb20b4]64 utilities will be installed into
[4eee9cc]65 <filename class="directory">/usr/sbin</filename>:</para>
66
67<screen><userinput remap="pre">echo "rootsbindir=/usr/sbin" &gt; configparms</userinput></screen>
68
[6a82dd9]69 <para>Prepare Glibc for compilation:</para>
[73aedd1d]70
[62a13d02]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>
[dea5385]77
[6dfcfecc]78 <variablelist>
79 <title>The meaning of the configure options:</title>
[0967c90]80
81 <varlistentry>
[6dfcfecc]82 <term><parameter>--disable-werror</parameter></term>
[0967c90]83 <listitem>
[d672ab7]84 <para>This option disables the -Werror option passed to
[6dfcfecc]85 GCC. This is necessary for running the test suite.</para>
[0967c90]86 </listitem>
87 </varlistentry>
[5897639]88
89 <varlistentry>
[6dfcfecc]90 <term><parameter>--enable-kernel=&min-kernel;</parameter></term>
[5897639]91 <listitem>
[091d624d]92 <para>This option tells the build system that this Glibc may
[6dfcfecc]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>
[5897639]96 </listitem>
97 </varlistentry>
98
99 <varlistentry>
100 <term><parameter>--enable-stack-protector=strong</parameter></term>
101 <listitem>
[d672ab7]102 <para>This option increases system security by adding
[0d84af1]103 extra code to check for buffer overflows, such as stack
[bed3894]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>
[6702623]108 </listitem>
109 </varlistentry>
110
[25b3c0f]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
[5897639]119 <varlistentry>
[d7a9421]120 <term><parameter>libc_cv_slibdir=/usr/lib</parameter></term>
[5897639]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
[6a82dd9]129 <para>Compile the package:</para>
[73aedd1d]130
[0445a3d]131<screen><userinput remap="make">make</userinput></screen>
[73aedd1d]132
[6a82dd9]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>
[81fd230]137
[0d84af1]138 <para>Generally a few tests do not pass. The test failures listed below
139 are usually safe to ignore.</para>
[d9c836bb]140
[082bbce]141<!-- Use remap="make" here to work around a jhalfs issue. -->
[9da9d014]142<!--<screen><userinput remap="make">case $(uname -m) in
[1b3fac7]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 ;;
[082bbce]145esac</userinput></screen>
[2e02c35]146
[70b235f4]147 <note><para>The symbolic link above is needed to run the tests at this
[d7f58cc]148 stage of building in the chroot environment. It will be overwritten
[70b235f4]149 in the install phase below.</para></note>
[9da9d014]150-->
[082bbce]151<screen><userinput remap="test">make check</userinput></screen>
152
[58ccce5]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
[3bac16dc]155 over 5000 tests can generally be ignored. This is a list of the
[58ccce5]156 most common issues seen for recent versions of LFS:</para>
[6a82dd9]157
158 <itemizedlist>
[5d1f0157]159
[032dc4e8]160 <listitem>
[d672ab7]161 <para><emphasis>io/tst-lchmod</emphasis>
[032dc4e8]162 is known to fail in the LFS chroot environment.</para>
163 </listitem>
164
[582da16]165 <listitem>
[0c0b882]166 <para>Some tests, for example
[0800455]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
[887bf34f]173 <screen><userinput remap="test">grep "Timed out" $(find -name \*.out)</userinput></screen>
[0800455]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>
[de6905d]183 </listitem>
[c500323]184
[d9c836bb]185 <listitem>
[8287b51]186 <para>Additionally, some tests may fail with a relatively old CPU
[0800455]187 model (for example
188 <emphasis>elf/tst-cpu-features-cpuinfo</emphasis>) or host kernel
189 version (for example
190 <emphasis>stdlib/tst-arc4random-thread</emphasis>).</para>
[6a82dd9]191 </listitem>
192 </itemizedlist>
193
194 <para>Though it is a harmless message, the install stage of Glibc will
195 complain about the absence of <filename>/etc/ld.so.conf</filename>.
196 Prevent this warning with:</para>
[1caa48e]197
[0445a3d]198<screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen>
[1caa48e]199
[a3bd4689]200 <!-- https://sourceware.org/bugzilla/show_bug.cgi?id=21911 -->
201 <para>Fix the Makefile to skip an outdated sanity check
202 that fails with a modern Glibc configuration:</para>
[ffbeb5f]203
204<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
205
[343ab13]206 <important>
207 <para>
208 If upgrading Glibc to a new minor version (for example, from
209 Glibc-2.36 to Glibc-&glibc-version;) on a running LFS system, you
210 need to take some extra precautions to avoid breaking the system:
211 </para>
212
213 <itemizedlist>
214 <listitem>
215 <!-- There are two reasons we don't support this:
216 1. Upgrading on a system with separate /lib and /usr/lib is
217 tricky.
218 2. With Glibc prior to 2.34 libc.so.6 etc. are symlinks to
219 libc-2.33.so etc., again causing the upgradation tricky.
220 The Glibc NEWS file explicit states they no longer use
221 symlinks for the ABI names to avoid upgradation
222 issues. -->
223 <para>
224 Upgrading Glibc on a LFS system prior to 11.0 (exclusive) is
225 not supported. Rebuild LFS if you are running such an old LFS
226 system but you need a newer Glibc.
227 </para>
228 </listitem>
229
230 <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154095.html -->
231 <listitem>
232 <para>
233 If upgrading on a LFS system prior to 12.0 (exclusive), install
234 <application>Libxcrypt</application> following
235 <xref role='.' linkend='ch-system-libxcrypt'/> In addition to
236 a normal <application>Libxcrypt</application> installation,
237 <emphasis role='bold'>you MUST follow the note in Libxcrypt
238 section to install
239 <filename class='libraryfile'>libcrypt.so.1*</filename>
[4aa6831f]240 (replacing
[343ab13]241 <filename class='libraryfile'>libcrypt.so.1</filename> from the
242 prior Glibc installation)</emphasis>.
243 </para>
244 </listitem>
245
246 <!-- Otherwise on lfs-systemd nscd will fail to start on boot,
247 and on both lfs-sysv and lfs-systemd useradd etc. will try
248 to start nscd, then nscd will fail to start as well and
249 produce some spurious error message. -->
250 <listitem>
251 <para>
252 If upgrading on a LFS system prior to 12.1 (exclusive),
253 remove the <command>nscd</command> program:
254 </para>
255
256 <screen role='nodump'><userinput>rm -f /usr/sbin/nscd</userinput></screen>
257
[bd003a8]258 <para revision='systemd'>
[343ab13]259 If this system (prior to LFS 12.1, exclusive) is based on
260 Systemd, it's also needed to disable and stop the
261 <command>nscd</command> service now:
262 </para>
263
264 <screen revision='systemd' role='nodump'><userinput>systemctl disable --now nscd</userinput></screen>
265 </listitem>
266
267 <listitem>
268 <para>
269 Upgrade the kernel and reboot if it's older than &min-kernel;
270 (check the current version with <command>uname -r</command>)
271 or if you want to upgrade it anyway, following
272 <xref linkend='ch-bootable-kernel' role='.'/>
273 </para>
274 </listitem>
275
276 <listitem>
277 <para>
278 Upgrade the kernel API headers if it's older than &min-kernel;
279 (check the current version with
280 <command>cat /usr/include/linux/version.h</command>)
281 or if you want to upgrade it anyway, following
282 <xref linkend='ch-tools-linux-headers'/> (but removing
283 <envar>$LFS</envar> from the <command>cp</command> command).
284 </para>
285 </listitem>
286
287 <!-- This is to ensure we don't start a process at the time point
288 where some Glibc shared libraries are updated but the others
289 are not. Such mismatches can cause programs crash on startup,
290 esp. a mismatch between ld-linux-x86-64.so.2 and
291 libc.so.6. Note that a crash in the installation process
292 will leave the system in a state with the mismatch forever,
293 unrecoverable without the help of another distro. -->
294 <listitem>
295 <para>
296 Perform a <envar>DESTDIR</envar> installation and upgrade
297 the Glibc shared libraries on the system using one single
298 <command>install</command> command:
299 </para>
300
301 <screen role='nodump'><userinput>make DESTDIR=$PWD/dest install
302install -vm755 dest/usr/lib/*.so.* /usr/lib</userinput></screen>
303 </listitem>
304 </itemizedlist>
305
306 <para>
307 It's imperative to strictly follow these steps above unless you
308 completely understand what you are doing.
309 <emphasis role='bold'>Any unexpected deviation may render the
310 system completely unusable. YOU ARE WARNED.</emphasis>
311 </para>
312
313 <para>
[677f795]314 Then continue to run the <command>make install</command> command,
315 the <command>sed</command> command against
316 <filename>/usr/bin/ldd</filename>, and the commands to install
317 the locales. Once they are finished, reboot the system
318 immediately.
[343ab13]319 </para>
320 </important>
321
[6a82dd9]322 <para>Install the package:</para>
[73aedd1d]323
[0445a3d]324<screen><userinput remap="install">make install</userinput></screen>
[73aedd1d]325
[091d624d]326 <para>Fix a hardcoded path to the executable loader in the
[0ebda11]327 <command>ldd</command> script:</para>
328
329<screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd</userinput></screen>
[25b3c0f]330<!--
[4028929]331 <para>Install the configuration file and runtime directory for
332 <command>nscd</command>:</para>
333
[f1dd547]334<screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
[4028929]335mkdir -pv /var/cache/nscd</userinput></screen>
336
[d672ab7]337 <para revision="systemd">Install the systemd support files for
[1118b17]338 <command>nscd</command>:</para>
339
340 <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
[d7a9421]341install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
[25b3c0f]342-->
[d730742]343 <para>Next, install the locales that can make the system respond in a
[091d624d]344 different language. None of these locales are required, but if some of them
345 are missing, the test suites of some packages will skip important
346 test cases.</para>
[6a82dd9]347
348 <para>Individual locales can be installed using the
[a5d31dd]349 <command>localedef</command> program. E.g., the second
[6a82dd9]350 <command>localedef</command> command below combines the
[fffccab]351 <filename>/usr/share/i18n/locales/cs_CZ</filename>
[6a82dd9]352 charset-independent locale definition with the
[fffccab]353 <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename>
[6a82dd9]354 charmap definition and appends the result to the
355 <filename>/usr/lib/locale/locale-archive</filename> file.
356 The following instructions will install the minimum set of
357 locales necessary for the optimal coverage of tests:</para>
[3f0c882]358
[9c7437f]359<screen role="nodump"><userinput remap="locale-test">localedef -i C -f UTF-8 C.UTF-8
[1e77f0c]360localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
[73aedd1d]361localedef -i de_DE -f ISO-8859-1 de_DE
362localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
[1e77f0c]363localedef -i de_DE -f UTF-8 de_DE.UTF-8
[75828c3]364localedef -i el_GR -f ISO-8859-7 el_GR
[cefe505]365localedef -i en_GB -f ISO-8859-1 en_GB
[e9aabce]366localedef -i en_GB -f UTF-8 en_GB.UTF-8
[73aedd1d]367localedef -i en_HK -f ISO-8859-1 en_HK
368localedef -i en_PH -f ISO-8859-1 en_PH
369localedef -i en_US -f ISO-8859-1 en_US
[3a35b11]370localedef -i en_US -f UTF-8 en_US.UTF-8
[cefe505]371localedef -i es_ES -f ISO-8859-15 es_ES@euro
[73aedd1d]372localedef -i es_MX -f ISO-8859-1 es_MX
[673b0d8]373localedef -i fa_IR -f UTF-8 fa_IR
[73aedd1d]374localedef -i fr_FR -f ISO-8859-1 fr_FR
375localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
[d93d1c90]376localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
[cefe505]377localedef -i is_IS -f ISO-8859-1 is_IS
378localedef -i is_IS -f UTF-8 is_IS.UTF-8
[73aedd1d]379localedef -i it_IT -f ISO-8859-1 it_IT
[cefe505]380localedef -i it_IT -f ISO-8859-15 it_IT@euro
[5b36d32]381localedef -i it_IT -f UTF-8 it_IT.UTF-8
[1e77f0c]382localedef -i ja_JP -f EUC-JP ja_JP
[8dd179b]383localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
[74f027f]384localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
[cefe505]385localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro
[5b36d32]386localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
387localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
[cefe505]388localedef -i se_NO -f UTF-8 se_NO.UTF-8
389localedef -i ta_IN -f UTF-8 ta_IN.UTF-8
[fffccab]390localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
[75828c3]391localedef -i zh_CN -f GB18030 zh_CN.GB18030
[cefe505]392localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS
393localedef -i zh_TW -f UTF-8 zh_TW.UTF-8</userinput></screen>
[73aedd1d]394
[6a82dd9]395 <para>In addition, install the locale for your own country, language and
396 character set.</para>
[fa21b3d]397
[091d624d]398 <para>Alternatively, install all the locales listed in the
[6a82dd9]399 <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
400 (it includes every locale listed above and many more) at once with the
401 following time-consuming command:</para>
[fa21b3d]402
[0445a3d]403<screen><userinput remap="locale-full">make localedata/install-locales</userinput></screen>
[fa21b3d]404
[6a82dd9]405 <para>Then use the <command>localedef</command> command to create and
406 install locales not listed in the
407 <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
[49e360b9]408 when you need them. For instance, the following two locales are
409 needed for some tests later in this chapter:</para>
[d672ab7]410
[fecc287]411<screen role="nodump"><userinput remap="locale-full">localedef -i C -f UTF-8 C.UTF-8
[8dd179b]412localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true</userinput></screen>
[6a82dd9]413
[d672ab7]414 <note><para>Glibc now uses libidn2 when resolving internationalized
[3b03219]415 domain names. This is a run time dependency. If this capability
[d672ab7]416 is needed, the instructions for installing libidn2 are in the
[3b03219]417 <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>.
418 </para></note>
419
[6a82dd9]420 </sect2>
[94aa6621]421
[6a82dd9]422 <sect2 id="conf-glibc" role="configuration">
423 <title>Configuring Glibc</title>
[5888299]424
[6a82dd9]425 <indexterm zone="conf-glibc">
426 <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
427 </indexterm>
[81fd230]428
[6a82dd9]429 <indexterm zone="conf-glibc">
430 <primary sortas="e-/etc/localtime">/etc/localtime</primary>
431 </indexterm>
[342b176]432
[a72ca33]433 <sect3>
434 <title>Adding nsswitch.conf</title>
435
[6a82dd9]436 <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
[a72ca33]437 because the Glibc defaults do not work well in a networked environment.
438 </para>
[6a82dd9]439
440 <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
441 following:</para>
[342b176]442
[ba40e32]443<screen revision='sysv'><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
[d72e04a]444<literal># Begin /etc/nsswitch.conf
[342b176]445
446passwd: files
447group: files
448shadow: files
449
450hosts: files dns
451networks: files
452
[4a80bec]453protocols: files
454services: files
455ethers: files
456rpc: files
[342b176]457
[ba40e32]458# End /etc/nsswitch.conf</literal>
459EOF</userinput></screen>
460
461<screen revision='systemd'><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
462<literal># Begin /etc/nsswitch.conf
463
464passwd: files systemd
465group: files systemd
466shadow: files systemd
467
468hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
469networks: files
470
471protocols: files
472services: files
473ethers: files
474rpc: files
475
[d72e04a]476# End /etc/nsswitch.conf</literal>
[bb55064]477EOF</userinput></screen>
[342b176]478
[a72ca33]479 </sect3>
480
481 <sect3>
[091d624d]482 <title>Adding Time Zone Data</title>
[a72ca33]483
[edbeeb5]484 <para>Install and set up the time zone data with the following:</para>
[f1dd547]485<screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
[f1c177f]486
[ea31e92]487ZONEINFO=/usr/share/zoneinfo
[2ca8941]488mkdir -pv $ZONEINFO/{posix,right}
[ea31e92]489
490for tz in etcetera southamerica northamerica europe africa antarctica \
[fb95c5c]491 asia australasia backward; do
[082bbce]492 zic -L /dev/null -d $ZONEINFO ${tz}
493 zic -L /dev/null -d $ZONEINFO/posix ${tz}
494 zic -L leapseconds -d $ZONEINFO/right ${tz}
[287a36b4]495done
[f0f7ea0]496
[f1d755b]497cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO
[ea31e92]498zic -d $ZONEINFO -p America/New_York
499unset ZONEINFO</userinput></screen>
[f1c177f]500
[7a6bcf9]501 <variablelist>
502 <title>The meaning of the zic commands:</title>
503
504 <varlistentry>
505 <term><parameter>zic -L /dev/null ...</parameter></term>
506 <listitem>
[6dfcfecc]507 <para>This creates posix time zones without any leap seconds. It is
[7a6bcf9]508 conventional to put these in both
509 <filename class="directory">zoneinfo</filename> and
510 <filename class="directory">zoneinfo/posix</filename>. It is
[edbeeb5]511 necessary to put the POSIX time zones in
[7a6bcf9]512 <filename class="directory">zoneinfo</filename>, otherwise various
[3c5ecc9]513 test suites will report errors. On an embedded system, where space is
[edbeeb5]514 tight and you do not intend to ever update the time zones, you could save
[6dfcfecc]515 1.9 MB by not using the <filename class="directory">posix</filename>
[3c5ecc9]516 directory, but some applications or test suites might produce some
[7bb9fda]517 failures.</para>
[7a6bcf9]518 </listitem>
519 </varlistentry>
520 <varlistentry>
521 <term><parameter>zic -L leapseconds ...</parameter></term>
522 <listitem>
[edbeeb5]523 <para>This creates right time zones, including leap seconds. On an
[7a6bcf9]524 embedded system, where space is tight and you do not intend to
[edbeeb5]525 ever update the time zones, or care about the correct time, you could
[7a6bcf9]526 save 1.9MB by omitting the <filename class="directory">right</filename>
527 directory.</para>
528 </listitem>
529 </varlistentry>
530 <varlistentry>
531 <term><parameter>zic ... -p ...</parameter></term>
532 <listitem>
[d7f2eb0]533 <para>This creates the <filename>posixrules</filename> file. We use
[283f7119]534 New York because POSIX requires the daylight saving time rules
[e7134f1]535 to be in accordance with US rules.</para>
[7a6bcf9]536 </listitem>
537 </varlistentry>
538 </variablelist>
539
540
541 <para>One way to determine the local time zone is to run the following
[e1060de]542 script:</para>
[342b176]543
[be4be92]544<screen role="nodump"><userinput>tzselect</userinput></screen>
[342b176]545
[6a82dd9]546 <para>After answering a few questions about the location, the script will
[e1060de]547 output the name of the time zone (e.g.,
548 <emphasis>America/Edmonton</emphasis>). There are also some other possible
[edbeeb5]549 time zones listed in <filename
[e1060de]550 class='directory'>/usr/share/zoneinfo</filename> such as
551 <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that
552 are not identified by the script but can be used.</para>
553
554 <para>Then create the <filename>/etc/localtime</filename> file by
555 running:</para>
[342b176]556
[1daca67]557<screen><userinput>ln -sfv /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
[342b176]558
[e1060de]559 <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the
560 time zone selected (e.g., Canada/Eastern).</para>
[6a82dd9]561
[a72ca33]562 </sect3>
[6a82dd9]563
[a72ca33]564 <sect3 id="conf-ld" role="configuration">
[6a82dd9]565 <title>Configuring the Dynamic Loader</title>
566
567 <indexterm zone="conf-ld">
568 <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
569 </indexterm>
570
571 <para>By default, the dynamic loader (<filename
572 class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
[85cdcb09]573 <filename class="directory">/usr/lib</filename> for dynamic libraries
574 that are needed by programs as they are run. However, if there are
575 libraries in directories other than
[6a82dd9]576 <filename class="directory">/usr/lib</filename>, these need to be added
577 to the <filename>/etc/ld.so.conf</filename> file in order for the
578 dynamic loader to find them. Two directories that are commonly known
579 to contain additional libraries are <filename
580 class="directory">/usr/local/lib</filename> and <filename
581 class="directory">/opt/lib</filename>, so add those directories to the
582 dynamic loader's search path.</para>
583
584 <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
585 following:</para>
[342b176]586
[bb55064]587<screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"
[d72e04a]588<literal># Begin /etc/ld.so.conf
[342b176]589/usr/local/lib
590/opt/lib
[50f648b]591</literal>
[bb55064]592EOF</userinput></screen>
[342b176]593
[6dfcfecc]594 <para>If desired, the dynamic loader can also search a directory and
[2ca8941]595 include the contents of files found there. Generally the files in
[50f648b]596 this include directory are one line specifying the desired library path.
597 To add this capability run the following commands:</para>
598
[6dfcfecc]599<screen role="nodump"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
[50f648b]600<literal># Add an include directory
601include /etc/ld.so.conf.d/*.conf
602</literal>
603EOF
[3d086301]604mkdir -pv /etc/ld.so.conf.d</userinput></screen>
[50f648b]605
[a72ca33]606 </sect3>
[6a82dd9]607 </sect2>
608
[6dfcfecc]609 <!-- - - - - - - - - - -->
610 <!-- Multilib - 32bit -->
611 <!-- - - - - - - - - - -->
612 <sect2 arch="ml_32,ml_all">
613 <title>Building Glibc - 32bit</title>
614
615 <para>Now recompile for m32. The extracted source can be
[0ebda11]616 reused but needs to be cleaned before installing the m32
[6dfcfecc]617 version of Glibc.</para>
618
619 <para>Clear the build directory and remove artefacts from
620 previous build:</para>
621
622<screen><userinput remap="pre">rm -rf ./*
623find .. -name "*.a" -delete</userinput></screen>
624
625 <para>Configure Glibc for m32 with the following commands:</para>
626
627<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \
628../configure \
629 --prefix=/usr \
630 --host=i686-pc-linux-gnu \
631 --build=$(../scripts/config.guess) \
632 --enable-kernel=&min-kernel; \
[800ee38]633 --disable-nscd \
[0ebda11]634 --libdir=/usr/lib32 \
635 --libexecdir=/usr/lib32 \
[d4b5218]636 libc_cv_slibdir=/usr/lib32</userinput></screen>
[6dfcfecc]637
638 <para>Compile the package:</para>
639
640<screen><userinput remap="make">make</userinput></screen>
641
642 <para>Install the package:</para>
643
644<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
[0ebda11]645cp -a DESTDIR/usr/lib32/* /usr/lib32/
[6dfcfecc]646install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \
[0ebda11]647 /usr/include/gnu/</userinput></screen>
648<!-- no longer required as they are created in chap5
649ln -svf ../lib32/ld-linux.so.2 /lib/ld-linux.so.2
650-->
[6dfcfecc]651
652 <para>Add the library name to the dynamic loader config:</para>
653
[0ebda11]654<screen role="install"><userinput>echo "/usr/lib32" &gt;&gt; /etc/ld.so.conf</userinput></screen>
[6dfcfecc]655
656 <caution>
657 <para>At this point, it is imperative to stop and ensure that the basic
658 functions (compiling and linking) of the new toolchain are working as
659 expected. To perform a sanity check, run the following commands:</para>
660
661<screen><userinput>echo 'int main(){}' &gt; dummy.c
662gcc -m32 dummy.c
663readelf -l a.out | grep '/ld-linux'</userinput></screen>
664
665 <para>If everything is working correctly, there should be no errors,
666 and the output of the last command will be of the form:</para>
667
668<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>
669
670 <para>If the output is not shown as above or there was no output at all,
671 then something is wrong. Investigate and retrace the steps to find out
672 where the problem is and correct it. This issue must be resolved before
673 continuing on.</para>
674
675 <para>Once all is well, clean up the test files:</para>
676
677<screen><userinput>rm -v dummy.c a.out</userinput></screen>
678
679 </caution>
680
681 </sect2><!-- m32 -->
682
683 <!-- - - - - - - - - - -->
684 <!-- Multilib - x32bit -->
685 <!-- - - - - - - - - - -->
686
687 <sect2 arch="ml_x32,ml_all">
688 <title>Building Glibc - x32bit</title>
689
690 <para>Now recompile for mx32. The extracted source can be
[0ebda11]691 reused but needs to be cleaned before installing the mx32
[6dfcfecc]692 version of Glibc.</para>
693
694 <para>Clear the build directory and remove artefacts from
695 previous build:</para>
696
697<screen><userinput remap="pre">rm -rf ./*
698find .. -name "*.a" -delete</userinput></screen>
699
700 <para>Configure Glibc for mx32 with the following commands:</para>
701
702<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \
703../configure \
704 --prefix=/usr \
705 --host=x86_64-pc-linux-gnux32 \
706 --build=$(../scripts/config.guess) \
707 --enable-kernel=&min-kernel; \
[800ee38]708 --disable-nscd \
[0ebda11]709 --libdir=/usr/libx32 \
710 --libexecdir=/usr/libx32 \
[d4b5218]711 libc_cv_slibdir=/usr/libx32</userinput></screen>
[6dfcfecc]712
713 <para>Compile the package:</para>
714
715<screen><userinput remap="make">make</userinput></screen>
716
717 <para>Install the package:</para>
718
719<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
[0ebda11]720cp -a DESTDIR/usr/libx32/* /usr/libx32/
[6dfcfecc]721install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-x32.h \
[0ebda11]722 /usr/include/gnu/</userinput></screen>
723<!-- no longer required as they are created in chap5
724ln -svf ../libx32/ld-linux-x32.so.2 /lib/ld-linux-x32.so.2
725-->
[6dfcfecc]726 <para>Add the library name to the dynamic loader config:</para>
727
[0ebda11]728<screen role="install"><userinput>echo "/usr/libx32" &gt;&gt; /etc/ld.so.conf</userinput></screen>
[6dfcfecc]729
730 <caution>
731 <para>At this point, it is imperative to stop and ensure that the basic
732 functions (compiling and linking) of the new toolchain are working as
733 expected. To perform a sanity check, run the following commands:</para>
734
735<screen><userinput>echo 'int main(){}' &gt; dummy.c
736gcc -mx32 dummy.c
737readelf -l a.out | grep '/ld-linux-x32'</userinput></screen>
738
739 <para>If everything is working correctly, there should be no errors,
740 and the output of the last command will be of the form:</para>
741
[d7e0db5]742<screen><computeroutput>[Requesting program interpreter: /libx32/ld-linux-x32.so.2]</computeroutput></screen>
[6dfcfecc]743
744 <para>If the output is not shown as above or there was no output at all,
745 then something is wrong. Investigate and retrace the steps to find out
746 where the problem is and correct it. This issue must be resolved before
747 continuing on.</para>
748
749 <para>Once all is well, clean up the test files:</para>
750
751<screen><userinput>rm -v dummy.c a.out</userinput></screen>
752
753 </caution>
754
755 </sect2><!-- mx32 -->
756
[6a82dd9]757 <sect2 id="contents-glibc" role="content">
758 <title>Contents of Glibc</title>
759
760 <segmentedlist>
761 <segtitle>Installed programs</segtitle>
762 <segtitle>Installed libraries</segtitle>
[fe05b08]763 <segtitle>Installed directories</segtitle>
[6a82dd9]764
765 <seglistitem>
[db3c501]766 <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
[81d3242]767 ldd, lddlibc4,
768 ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
[09d148d]769 locale, localedef, makedb, mtrace,
[78cc3be]770 pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
[6a82dd9]771 zdump, and zic</seg>
[9c7598cc]772 <seg>ld-linux-x86-64.so.2, ld-linux.so.2,
[db3c501]773 libBrokenLocale.{a,so}, libanl.{a,so},
[b7daa52a]774 libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
[bbfb090]775 libdl.{a,so.2}, libg.a, libm.{a,so},
[9c7598cc]776 libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.so.1,
[78cc3be]777 libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
[9c7598cc]778 libpcprofile.so, libpthread.{a,so.0},
779 libresolv.{a,so}, librt.{a,so.1},
780 libthread_db.so, and libutil.{a,so.1}</seg>
[fe05b08]781 <seg>/usr/include/arpa, /usr/include/bits, /usr/include/gnu,
782 /usr/include/net, /usr/include/netash, /usr/include/netatalk,
783 /usr/include/netax25, /usr/include/neteconet, /usr/include/netinet,
784 /usr/include/netipx, /usr/include/netiucv, /usr/include/netpacket,
785 /usr/include/netrom, /usr/include/netrose, /usr/include/nfs,
[78cc3be]786 /usr/include/protocols, /usr/include/rpc,
[4028929]787 /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale,
788 /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo,
[09d148d]789 and /var/lib/nss_db</seg>
[6a82dd9]790 </seglistitem>
791 </segmentedlist>
792
793 <variablelist>
794 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
795 <?dbfo list-presentation="list"?>
796 <?dbhtml list-presentation="table"?>
797
798 <varlistentry id="gencat">
799 <term><command>gencat</command></term>
800 <listitem>
801 <para>Generates message catalogues</para>
802 <indexterm zone="ch-system-glibc gencat">
803 <primary sortas="b-gencat">gencat</primary>
804 </indexterm>
805 </listitem>
806 </varlistentry>
807
808 <varlistentry id="getconf">
809 <term><command>getconf</command></term>
810 <listitem>
811 <para>Displays the system configuration values for file system
812 specific variables</para>
813 <indexterm zone="ch-system-glibc getconf">
814 <primary sortas="b-getconf">getconf</primary>
815 </indexterm>
816 </listitem>
817 </varlistentry>
818
819 <varlistentry id="getent">
820 <term><command>getent</command></term>
821 <listitem>
822 <para>Gets entries from an administrative database</para>
823 <indexterm zone="ch-system-glibc getent">
824 <primary sortas="b-getent">getent</primary>
825 </indexterm>
826 </listitem>
827 </varlistentry>
828
829 <varlistentry id="iconv">
830 <term><command>iconv</command></term>
831 <listitem>
832 <para>Performs character set conversion</para>
833 <indexterm zone="ch-system-glibc iconv">
834 <primary sortas="b-iconv">iconv</primary>
835 </indexterm>
836 </listitem>
837 </varlistentry>
838
839 <varlistentry id="iconvconfig">
840 <term><command>iconvconfig</command></term>
841 <listitem>
842 <para>Creates fastloading <command>iconv</command> module configuration
843 files</para>
844 <indexterm zone="ch-system-glibc iconvconfig">
845 <primary sortas="b-iconvconfig">iconvconfig</primary>
846 </indexterm>
847 </listitem>
848 </varlistentry>
849
850 <varlistentry id="ldconfig">
851 <term><command>ldconfig</command></term>
852 <listitem>
853 <para>Configures the dynamic linker runtime bindings</para>
854 <indexterm zone="ch-system-glibc ldconfig">
855 <primary sortas="b-ldconfig">ldconfig</primary>
856 </indexterm>
857 </listitem>
858 </varlistentry>
859
860 <varlistentry id="ldd">
861 <term><command>ldd</command></term>
862 <listitem>
863 <para>Reports which shared libraries are required
864 by each given program or shared library</para>
865 <indexterm zone="ch-system-glibc ldd">
866 <primary sortas="b-ldd">ldd</primary>
867 </indexterm>
868 </listitem>
869 </varlistentry>
870
871 <varlistentry id="lddlibc4">
872 <term><command>lddlibc4</command></term>
873 <listitem>
[db3c501]874 <para>Assists <command>ldd</command> with object files.
875 It does not exist on newer architectures like x86_64</para>
[6a82dd9]876 <indexterm zone="ch-system-glibc lddlibc4">
877 <primary sortas="b-lddlibc4">lddlibc4</primary>
878 </indexterm>
879 </listitem>
880 </varlistentry>
881
882 <varlistentry id="locale">
883 <term><command>locale</command></term>
884 <listitem>
885 <para>Prints various information about the current locale</para>
886 <indexterm zone="ch-system-glibc locale">
887 <primary sortas="b-locale">locale</primary>
888 </indexterm>
889 </listitem>
890 </varlistentry>
891
892 <varlistentry id="localedef">
893 <term><command>localedef</command></term>
894 <listitem>
895 <para>Compiles locale specifications</para>
896 <indexterm zone="ch-system-glibc localedef">
897 <primary sortas="b-localedef">localedef</primary>
898 </indexterm>
899 </listitem>
900 </varlistentry>
901
[ca101ad]902 <varlistentry id="makedb">
903 <term><command>makedb</command></term>
904 <listitem>
905 <para>Creates a simple database from textual input</para>
906 <indexterm zone="ch-system-glibc makedb">
907 <primary sortas="b-makedb">makedb</primary>
908 </indexterm>
909 </listitem>
910 </varlistentry>
911
[6a82dd9]912 <varlistentry id="mtrace">
913 <term><command>mtrace</command></term>
914 <listitem>
915 <para>Reads and interprets a memory trace file and displays a summary
916 in human-readable format</para>
917 <indexterm zone="ch-system-glibc mtrace">
918 <primary sortas="b-mtrace">mtrace</primary>
919 </indexterm>
920 </listitem>
921 </varlistentry>
922
[78cc3be]923 <varlistentry id="pcprofiledump">
924 <term><command>pcprofiledump</command></term>
925 <listitem>
926 <para>Dump information generated by PC profiling</para>
927 <indexterm zone="ch-system-glibc pcprofiledump">
928 <primary sortas="b-pcprofiledump">pcprofiledump</primary>
929 </indexterm>
930 </listitem>
931 </varlistentry>
932
[ca101ad]933 <varlistentry id="pldd">
934 <term><command>pldd</command></term>
935 <listitem>
936 <para>Lists dynamic shared objects used by running processes</para>
937 <indexterm zone="ch-system-glibc pldd">
938 <primary sortas="b-pldd">pldd</primary>
939 </indexterm>
940 </listitem>
941 </varlistentry>
[1118b17]942
[6a82dd9]943 <varlistentry id="sln">
944 <term><command>sln</command></term>
945 <listitem>
946 <para>A statically linked <command>ln</command> program</para>
947 <indexterm zone="ch-system-glibc sln">
948 <primary sortas="b-sln">sln</primary>
949 </indexterm>
950 </listitem>
951 </varlistentry>
952
[3119ddc]953 <varlistentry id="sotruss">
954 <term><command>sotruss</command></term>
955 <listitem>
956 <para>Traces shared library procedure calls of a specified command</para>
957 <indexterm zone="ch-system-glibc sotruss">
958 <primary sortas="b-sotruss">sotruss</primary>
959 </indexterm>
960 </listitem>
961 </varlistentry>
962
[6a82dd9]963 <varlistentry id="sprof">
964 <term><command>sprof</command></term>
965 <listitem>
966 <para>Reads and displays shared object profiling data</para>
967 <indexterm zone="ch-system-glibc sprof">
968 <primary sortas="b-sprof">sprof</primary>
969 </indexterm>
970 </listitem>
971 </varlistentry>
972
973 <varlistentry id="tzselect">
974 <term><command>tzselect</command></term>
975 <listitem>
976 <para>Asks the user about the location of the system and reports
977 the corresponding time zone description</para>
978 <indexterm zone="ch-system-glibc tzselect">
979 <primary sortas="b-tzselect">tzselect</primary>
980 </indexterm>
981 </listitem>
982 </varlistentry>
983
984 <varlistentry id="xtrace">
985 <term><command>xtrace</command></term>
986 <listitem>
987 <para>Traces the execution of a program by printing the currently
988 executed function</para>
989 <indexterm zone="ch-system-glibc xtrace">
990 <primary sortas="b-xtrace">xtrace</primary>
991 </indexterm>
992 </listitem>
993 </varlistentry>
994
995 <varlistentry id="zdump">
996 <term><command>zdump</command></term>
997 <listitem>
998 <para>The time zone dumper</para>
999 <indexterm zone="ch-system-glibc zdump">
1000 <primary sortas="b-zdump">zdump</primary>
1001 </indexterm>
1002 </listitem>
1003 </varlistentry>
1004
1005 <varlistentry id="zic">
1006 <term><command>zic</command></term>
1007 <listitem>
1008 <para>The time zone compiler</para>
1009 <indexterm zone="ch-system-glibc zic">
1010 <primary sortas="b-zic">zic</primary>
1011 </indexterm>
1012 </listitem>
1013 </varlistentry>
1014
1015 <varlistentry id="ld.so">
[9c7598cc]1016 <term><filename class="libraryfile">ld-*.so</filename></term>
[6a82dd9]1017 <listitem>
1018 <para>The helper program for shared library executables</para>
1019 <indexterm zone="ch-system-glibc ld.so">
[5ef820b]1020 <primary sortas="c-ld.so">ld-&glibc-version;.so</primary>
[6a82dd9]1021 </indexterm>
1022 </listitem>
1023 </varlistentry>
1024
1025 <varlistentry id="libBrokenLocale">
1026 <term><filename class="libraryfile">libBrokenLocale</filename></term>
1027 <listitem>
1028 <para>Used internally by Glibc as a gross hack to get broken programs
1029 (e.g., some Motif applications) running. See comments in
1030 <filename>glibc-&glibc-version;/locale/broken_cur_max.c</filename>
1031 for more information</para>
1032 <indexterm zone="ch-system-glibc libBrokenLocale">
1033 <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
1034 </indexterm>
1035 </listitem>
1036 </varlistentry>
1037
1038 <varlistentry id="libanl">
1039 <term><filename class="libraryfile">libanl</filename></term>
1040 <listitem>
[e9ab2b3]1041 <para>Dummy library containing no functions. Previously was the
1042 asynchronous name lookup library, whose functions are now in
1043 <filename class='libraryfile'>libc</filename></para>
[6a82dd9]1044 <indexterm zone="ch-system-glibc libanl">
1045 <primary sortas="c-libanl">libanl</primary>
1046 </indexterm>
1047 </listitem>
1048 </varlistentry>
1049
1050 <varlistentry id="libc">
1051 <term><filename class="libraryfile">libc</filename></term>
1052 <listitem>
1053 <para>The main C library</para>
1054 <indexterm zone="ch-system-glibc libc">
1055 <primary sortas="c-libc">libc</primary>
1056 </indexterm>
1057 </listitem>
1058 </varlistentry>
1059
[b7daa52a]1060 <varlistentry id="libc_malloc_debug">
1061 <term><filename class="libraryfile">libc_malloc_debug</filename></term>
1062 <listitem>
1063 <para>Turns on memory allocation checking when preloaded</para>
1064 <indexterm zone="ch-system-glibc libc_malloc_debug">
1065 <primary sortas="c-libc_malloc_debug">libc_malloc_debug</primary>
1066 </indexterm>
1067 </listitem>
1068 </varlistentry>
1069
[6a82dd9]1070 <varlistentry id="libdl">
1071 <term><filename class="libraryfile">libdl</filename></term>
1072 <listitem>
[9c7598cc]1073 <para>Dummy library containing no functions. Previously was the
1074 dynamic linking interface library, whose functions are now in
1075 <filename class="libraryfile">libc</filename></para>
[6a82dd9]1076 <indexterm zone="ch-system-glibc libdl">
1077 <primary sortas="c-libdl">libdl</primary>
1078 </indexterm>
1079 </listitem>
1080 </varlistentry>
1081
1082 <varlistentry id="libg">
1083 <term><filename class="libraryfile">libg</filename></term>
1084 <listitem>
1085 <para>Dummy library containing no functions. Previously was a runtime
1086 library for <command>g++</command></para>
1087 <indexterm zone="ch-system-glibc libg">
1088 <primary sortas="c-libg">libg</primary>
1089 </indexterm>
1090 </listitem>
1091 </varlistentry>
1092
1093 <varlistentry id="libm">
1094 <term><filename class="libraryfile">libm</filename></term>
1095 <listitem>
1096 <para>The mathematical library</para>
1097 <indexterm zone="ch-system-glibc libm">
1098 <primary sortas="c-libm">libm</primary>
1099 </indexterm>
1100 </listitem>
1101 </varlistentry>
1102
[b7daa52a]1103 <varlistentry id="libmvec">
1104 <term><filename class="libraryfile">libmvec</filename></term>
1105 <listitem>
1106 <para>The vector math library, linked in as needed
1107 when <filename class='libraryfile'>libm</filename> is used</para>
1108 <indexterm zone="ch-system-glibc libmvec">
1109 <primary sortas="c-libmvec">libmvec</primary>
1110 </indexterm>
1111 </listitem>
1112 </varlistentry>
1113
[6a82dd9]1114 <varlistentry id="libmcheck">
1115 <term><filename class="libraryfile">libmcheck</filename></term>
1116 <listitem>
1117 <para>Turns on memory allocation checking when linked to</para>
1118 <indexterm zone="ch-system-glibc libmcheck">
1119 <primary sortas="c-libmcheck">libmcheck</primary>
1120 </indexterm>
1121 </listitem>
1122 </varlistentry>
1123
1124 <varlistentry id="libmemusage">
1125 <term><filename class="libraryfile">libmemusage</filename></term>
1126 <listitem>
1127 <para>Used by <command>memusage</command> to help collect
1128 information about the memory usage of a program</para>
1129 <indexterm zone="ch-system-glibc libmemusage">
1130 <primary sortas="c-libmemusage">libmemusage</primary>
1131 </indexterm>
1132 </listitem>
1133 </varlistentry>
1134
1135 <varlistentry id="libnsl">
1136 <term><filename class="libraryfile">libnsl</filename></term>
1137 <listitem>
[9c7598cc]1138 <para>The network services library, now deprecated</para>
[6a82dd9]1139 <indexterm zone="ch-system-glibc libnsl">
1140 <primary sortas="c-libnsl">libnsl</primary>
1141 </indexterm>
1142 </listitem>
1143 </varlistentry>
1144
1145 <varlistentry id="libnss">
[b7daa52a]1146 <term><filename class="libraryfile">libnss_*</filename></term>
[6a82dd9]1147 <listitem>
[b7daa52a]1148 <para>The Name Service Switch modules, containing functions for
[6a82dd9]1149 resolving host names, user names, group names, aliases, services,
[b7daa52a]1150 protocols, etc. Loaded by
1151 <filename class='libraryfile'>libc</filename> according to the
1152 configuration in <filename>/etc/nsswitch.conf</filename></para>
[6a82dd9]1153 <indexterm zone="ch-system-glibc libnss">
[b7daa52a]1154 <primary sortas="c-libnss">libnss_*</primary>
[6a82dd9]1155 </indexterm>
1156 </listitem>
1157 </varlistentry>
[1118b17]1158
[78cc3be]1159 <varlistentry id="libpcprofile">
1160 <term><filename class="libraryfile">libpcprofile</filename></term>
1161 <listitem>
1162 <para>Can be preloaded to PC profile an executable</para>
1163 <indexterm zone="ch-system-glibc libpcprofile">
1164 <primary sortas="c-libpcprofile">libpcprofile</primary>
1165 </indexterm>
1166 </listitem>
1167 </varlistentry>
1168
[6a82dd9]1169 <varlistentry id="libpthread">
1170 <term><filename class="libraryfile">libpthread</filename></term>
1171 <listitem>
[9c7598cc]1172 <para>Dummy library containing no functions. Previously contained
1173 functions providing most of the interfaces specified
[91d8e69]1174 by the POSIX.1c Threads Extensions and the semaphore interfaces
1175 specified by the POSIX.1b Real-time Extensions, now the functions
1176 are in <filename class="libraryfile">libc</filename></para>
[6a82dd9]1177 <indexterm zone="ch-system-glibc libpthread">
1178 <primary sortas="c-libpthread">libpthread</primary>
1179 </indexterm>
1180 </listitem>
1181 </varlistentry>
1182
1183 <varlistentry id="libresolv">
1184 <term><filename class="libraryfile">libresolv</filename></term>
1185 <listitem>
1186 <para>Contains functions for creating, sending, and interpreting
1187 packets to the Internet domain name servers</para>
1188 <indexterm zone="ch-system-glibc libresolv">
1189 <primary sortas="c-libresolv">libresolv</primary>
1190 </indexterm>
1191 </listitem>
1192 </varlistentry>
1193
1194 <varlistentry id="librt">
1195 <term><filename class="libraryfile">librt</filename></term>
1196 <listitem>
1197 <para>Contains functions providing most of the interfaces specified
[91d8e69]1198 by the POSIX.1b Real-time Extensions</para>
[6a82dd9]1199 <indexterm zone="ch-system-glibc librt">
1200 <primary sortas="c-librt">librt</primary>
1201 </indexterm>
1202 </listitem>
1203 </varlistentry>
1204
1205 <varlistentry id="libthread_db">
1206 <term><filename class="libraryfile">libthread_db</filename></term>
1207 <listitem>
1208 <para>Contains functions useful for building debuggers for
1209 multi-threaded programs</para>
1210 <indexterm zone="ch-system-glibc libthread_db">
1211 <primary sortas="c-libthread_db">libthread_db</primary>
1212 </indexterm>
1213 </listitem>
1214 </varlistentry>
1215
1216 <varlistentry id="libutil">
1217 <term><filename class="libraryfile">libutil</filename></term>
1218 <listitem>
[99b2938]1219 <para>Dummy library containing no functions. Previously contained
[9c7598cc]1220 code for <quote>standard</quote> functions used in
1221 many different Unix utilities. These functions are now in
1222 <filename class="libraryfile">libc</filename></para>
[6a82dd9]1223 <indexterm zone="ch-system-glibc libutil">
1224 <primary sortas="c-libutil">libutil</primary>
1225 </indexterm>
1226 </listitem>
1227 </varlistentry>
1228
1229 </variablelist>
1230
1231 </sect2>
[673b0d8]1232
1233</sect1>
Note: See TracBrowser for help on using the repository browser.