source: chapter08/glibc.xml@ efa633e

multilib-10.1
Last change on this file since efa633e was efa633e, checked in by Thomas Trepl <thomas@…>, 3 years ago

Merge changes from trunk to multilib

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@12142 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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