source: chapter08/glibc.xml@ 7f3f152

multilib xry111/multilib
Last change on this file since 7f3f152 was 7f3f152, checked in by Thomas Trepl <thomas@…>, 4 months ago

Automatic merge of trunk into multilib

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