source: chapter08/glibc.xml@ 800ee38

multilib xry111/multilib
Last change on this file since 800ee38 was 800ee38, checked in by Thomas Trepl <thomas@…>, 3 months ago

More updates on glibc instr

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