source: chapter08/glibc.xml@ 66bfc2b

ml-11.0 multilib
Last change on this file since 66bfc2b was 66bfc2b, checked in by Thomas Trepl (Moody) <thomas@…>, 3 years ago

Automatic merge of trunk into multilib

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