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
|
---|
57 | cd build</userinput></screen>
|
---|
58 |
|
---|
59 | <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
|
---|
60 | utilities will be installed into
|
---|
61 | <filename class="directory">/usr/sbin</filename>:</para>
|
---|
62 |
|
---|
63 | <screen><userinput remap="pre">echo "rootsbindir=/usr/sbin" > 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 ;;
|
---|
145 | esac</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. A few failures out of
|
---|
155 | over 5000 tests can generally be ignored. This is a list of the
|
---|
156 | most common issues seen for recent versions of LFS:</para>
|
---|
157 |
|
---|
158 | <itemizedlist>
|
---|
159 |
|
---|
160 | <listitem>
|
---|
161 | <para><emphasis>io/tst-lchmod</emphasis>
|
---|
162 | is known to fail in the LFS chroot environment.</para>
|
---|
163 | </listitem>
|
---|
164 |
|
---|
165 | <!-- Did not fail with glibc-2.38
|
---|
166 | <listitem>
|
---|
167 | <para><emphasis>misc/tst-ttyname</emphasis>
|
---|
168 | is known to fail in the LFS chroot environment.</para>
|
---|
169 | </listitem>
|
---|
170 | -->
|
---|
171 |
|
---|
172 | <!-- https://sourceware.org/pipermail/libc-alpha/2022-August/141567.html -->
|
---|
173 | <listitem>
|
---|
174 | <para>The <emphasis>stdlib/tst-arc4random-thread</emphasis>
|
---|
175 | test is known to fail if the host kernel is relatively old.</para>
|
---|
176 | </listitem>
|
---|
177 |
|
---|
178 | <listitem>
|
---|
179 | <para>Some tests, for example
|
---|
180 | <emphasis>nss/tst-nss-files-hosts-multi</emphasis>,
|
---|
181 | are known to fail on relatively slow systems due to an internal
|
---|
182 | timeout.</para>
|
---|
183 | </listitem>
|
---|
184 |
|
---|
185 | <listitem>
|
---|
186 | <para>Additionally, some tests may fail with a relatively old CPU
|
---|
187 | model or host kernel version.</para>
|
---|
188 | </listitem>
|
---|
189 | </itemizedlist>
|
---|
190 |
|
---|
191 | <para>Though it is a harmless message, the install stage of Glibc will
|
---|
192 | complain about the absence of <filename>/etc/ld.so.conf</filename>.
|
---|
193 | Prevent this warning with:</para>
|
---|
194 |
|
---|
195 | <screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen>
|
---|
196 |
|
---|
197 | <!-- https://sourceware.org/bugzilla/show_bug.cgi?id=21911 -->
|
---|
198 | <para>Fix the Makefile to skip an outdated sanity check
|
---|
199 | that fails with a modern Glibc configuration:</para>
|
---|
200 |
|
---|
201 | <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
|
---|
202 |
|
---|
203 | <para>Install the package:</para>
|
---|
204 |
|
---|
205 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
206 |
|
---|
207 | <para>Fix a hardcoded path to the executable loader in the
|
---|
208 | <command>ldd</command> script:</para>
|
---|
209 |
|
---|
210 | <screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd</userinput></screen>
|
---|
211 |
|
---|
212 | <para>Install the configuration file and runtime directory for
|
---|
213 | <command>nscd</command>:</para>
|
---|
214 |
|
---|
215 | <screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
|
---|
216 | mkdir -pv /var/cache/nscd</userinput></screen>
|
---|
217 |
|
---|
218 | <para revision="systemd">Install the systemd support files for
|
---|
219 | <command>nscd</command>:</para>
|
---|
220 |
|
---|
221 | <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
|
---|
222 | install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
|
---|
223 |
|
---|
224 | <para>Next, install the locales that can make the system respond in a
|
---|
225 | different language. None of these locales are required, but if some of them
|
---|
226 | are missing, the test suites of some packages will skip important
|
---|
227 | test cases.</para>
|
---|
228 |
|
---|
229 | <para>Individual locales can be installed using the
|
---|
230 | <command>localedef</command> program. E.g., the second
|
---|
231 | <command>localedef</command> command below combines the
|
---|
232 | <filename>/usr/share/i18n/locales/cs_CZ</filename>
|
---|
233 | charset-independent locale definition with the
|
---|
234 | <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename>
|
---|
235 | charmap definition and appends the result to the
|
---|
236 | <filename>/usr/lib/locale/locale-archive</filename> file.
|
---|
237 | The following instructions will install the minimum set of
|
---|
238 | locales necessary for the optimal coverage of tests:</para>
|
---|
239 |
|
---|
240 | <screen role="nodump"><userinput remap="locale-test">mkdir -pv /usr/lib/locale
|
---|
241 | localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
|
---|
242 | localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
|
---|
243 | localedef -i de_DE -f ISO-8859-1 de_DE
|
---|
244 | localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
|
---|
245 | localedef -i de_DE -f UTF-8 de_DE.UTF-8
|
---|
246 | localedef -i el_GR -f ISO-8859-7 el_GR
|
---|
247 | localedef -i en_GB -f ISO-8859-1 en_GB
|
---|
248 | localedef -i en_GB -f UTF-8 en_GB.UTF-8
|
---|
249 | localedef -i en_HK -f ISO-8859-1 en_HK
|
---|
250 | localedef -i en_PH -f ISO-8859-1 en_PH
|
---|
251 | localedef -i en_US -f ISO-8859-1 en_US
|
---|
252 | localedef -i en_US -f UTF-8 en_US.UTF-8
|
---|
253 | localedef -i es_ES -f ISO-8859-15 es_ES@euro
|
---|
254 | localedef -i es_MX -f ISO-8859-1 es_MX
|
---|
255 | localedef -i fa_IR -f UTF-8 fa_IR
|
---|
256 | localedef -i fr_FR -f ISO-8859-1 fr_FR
|
---|
257 | localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
|
---|
258 | localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
|
---|
259 | localedef -i is_IS -f ISO-8859-1 is_IS
|
---|
260 | localedef -i is_IS -f UTF-8 is_IS.UTF-8
|
---|
261 | localedef -i it_IT -f ISO-8859-1 it_IT
|
---|
262 | localedef -i it_IT -f ISO-8859-15 it_IT@euro
|
---|
263 | localedef -i it_IT -f UTF-8 it_IT.UTF-8
|
---|
264 | localedef -i ja_JP -f EUC-JP ja_JP
|
---|
265 | localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
|
---|
266 | localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
|
---|
267 | localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro
|
---|
268 | localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
|
---|
269 | localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
|
---|
270 | localedef -i se_NO -f UTF-8 se_NO.UTF-8
|
---|
271 | localedef -i ta_IN -f UTF-8 ta_IN.UTF-8
|
---|
272 | localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
|
---|
273 | localedef -i zh_CN -f GB18030 zh_CN.GB18030
|
---|
274 | localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS
|
---|
275 | localedef -i zh_TW -f UTF-8 zh_TW.UTF-8</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 the 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 | when you need them. For instance, the following two locales are
|
---|
291 | needed for some tests later in this chapter:</para>
|
---|
292 |
|
---|
293 | <screen role="nodump"><userinput remap="locale-full">localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
|
---|
294 | localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true</userinput></screen>
|
---|
295 |
|
---|
296 | <note><para>Glibc now uses libidn2 when resolving internationalized
|
---|
297 | domain names. This is a run time dependency. If this capability
|
---|
298 | is needed, the instructions for installing libidn2 are in the
|
---|
299 | <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>.
|
---|
300 | </para></note>
|
---|
301 |
|
---|
302 | </sect2>
|
---|
303 |
|
---|
304 | <sect2 id="conf-glibc" role="configuration">
|
---|
305 | <title>Configuring Glibc</title>
|
---|
306 |
|
---|
307 | <indexterm zone="conf-glibc">
|
---|
308 | <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
|
---|
309 | </indexterm>
|
---|
310 |
|
---|
311 | <indexterm zone="conf-glibc">
|
---|
312 | <primary sortas="e-/etc/localtime">/etc/localtime</primary>
|
---|
313 | </indexterm>
|
---|
314 |
|
---|
315 | <sect3>
|
---|
316 | <title>Adding nsswitch.conf</title>
|
---|
317 |
|
---|
318 | <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
|
---|
319 | because the Glibc defaults do not work well in a networked environment.
|
---|
320 | </para>
|
---|
321 |
|
---|
322 | <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
|
---|
323 | following:</para>
|
---|
324 |
|
---|
325 | <screen><userinput>cat > /etc/nsswitch.conf << "EOF"
|
---|
326 | <literal># Begin /etc/nsswitch.conf
|
---|
327 |
|
---|
328 | passwd: files
|
---|
329 | group: files
|
---|
330 | shadow: files
|
---|
331 |
|
---|
332 | hosts: files dns
|
---|
333 | networks: files
|
---|
334 |
|
---|
335 | protocols: files
|
---|
336 | services: files
|
---|
337 | ethers: files
|
---|
338 | rpc: files
|
---|
339 |
|
---|
340 | # End /etc/nsswitch.conf</literal>
|
---|
341 | EOF</userinput></screen>
|
---|
342 |
|
---|
343 | </sect3>
|
---|
344 |
|
---|
345 | <sect3>
|
---|
346 | <title>Adding Time Zone Data</title>
|
---|
347 |
|
---|
348 | <para>Install and set up the time zone data with the following:</para>
|
---|
349 | <screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
|
---|
350 |
|
---|
351 | ZONEINFO=/usr/share/zoneinfo
|
---|
352 | mkdir -pv $ZONEINFO/{posix,right}
|
---|
353 |
|
---|
354 | for tz in etcetera southamerica northamerica europe africa antarctica \
|
---|
355 | asia australasia backward; do
|
---|
356 | zic -L /dev/null -d $ZONEINFO ${tz}
|
---|
357 | zic -L /dev/null -d $ZONEINFO/posix ${tz}
|
---|
358 | zic -L leapseconds -d $ZONEINFO/right ${tz}
|
---|
359 | done
|
---|
360 |
|
---|
361 | cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO
|
---|
362 | zic -d $ZONEINFO -p America/New_York
|
---|
363 | unset ZONEINFO</userinput></screen>
|
---|
364 |
|
---|
365 | <variablelist>
|
---|
366 | <title>The meaning of the zic commands:</title>
|
---|
367 |
|
---|
368 | <varlistentry>
|
---|
369 | <term><parameter>zic -L /dev/null ...</parameter></term>
|
---|
370 | <listitem>
|
---|
371 | <para>This creates posix time zones without any leap seconds. It is
|
---|
372 | conventional to put these in both
|
---|
373 | <filename class="directory">zoneinfo</filename> and
|
---|
374 | <filename class="directory">zoneinfo/posix</filename>. It is
|
---|
375 | necessary to put the POSIX time zones in
|
---|
376 | <filename class="directory">zoneinfo</filename>, otherwise various
|
---|
377 | test suites will report errors. On an embedded system, where space is
|
---|
378 | tight and you do not intend to ever update the time zones, you could save
|
---|
379 | 1.9 MB by not using the <filename class="directory">posix</filename>
|
---|
380 | directory, but some applications or test suites might produce some
|
---|
381 | failures.</para>
|
---|
382 | </listitem>
|
---|
383 | </varlistentry>
|
---|
384 | <varlistentry>
|
---|
385 | <term><parameter>zic -L leapseconds ...</parameter></term>
|
---|
386 | <listitem>
|
---|
387 | <para>This creates right time zones, including leap seconds. On an
|
---|
388 | embedded system, where space is tight and you do not intend to
|
---|
389 | ever update the time zones, or care about the correct time, you could
|
---|
390 | save 1.9MB by omitting the <filename class="directory">right</filename>
|
---|
391 | directory.</para>
|
---|
392 | </listitem>
|
---|
393 | </varlistentry>
|
---|
394 | <varlistentry>
|
---|
395 | <term><parameter>zic ... -p ...</parameter></term>
|
---|
396 | <listitem>
|
---|
397 | <para>This creates the <filename>posixrules</filename> file. We use
|
---|
398 | New York because POSIX requires the daylight savings time rules
|
---|
399 | to be in accordance with US rules.</para>
|
---|
400 | </listitem>
|
---|
401 | </varlistentry>
|
---|
402 | </variablelist>
|
---|
403 |
|
---|
404 |
|
---|
405 | <para>One way to determine the local time zone is to run the following
|
---|
406 | script:</para>
|
---|
407 |
|
---|
408 | <screen role="nodump"><userinput>tzselect</userinput></screen>
|
---|
409 |
|
---|
410 | <para>After answering a few questions about the location, the script will
|
---|
411 | output the name of the time zone (e.g.,
|
---|
412 | <emphasis>America/Edmonton</emphasis>). There are also some other possible
|
---|
413 | time zones listed in <filename
|
---|
414 | class='directory'>/usr/share/zoneinfo</filename> such as
|
---|
415 | <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that
|
---|
416 | are not identified by the script but can be used.</para>
|
---|
417 |
|
---|
418 | <para>Then create the <filename>/etc/localtime</filename> file by
|
---|
419 | running:</para>
|
---|
420 |
|
---|
421 | <screen><userinput>ln -sfv /usr/share/zoneinfo/<replaceable><xxx></replaceable> /etc/localtime</userinput></screen>
|
---|
422 |
|
---|
423 | <para>Replace <replaceable><xxx></replaceable> with the name of the
|
---|
424 | time zone selected (e.g., Canada/Eastern).</para>
|
---|
425 |
|
---|
426 | </sect3>
|
---|
427 |
|
---|
428 | <sect3 id="conf-ld" role="configuration">
|
---|
429 | <title>Configuring the Dynamic Loader</title>
|
---|
430 |
|
---|
431 | <indexterm zone="conf-ld">
|
---|
432 | <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
|
---|
433 | </indexterm>
|
---|
434 |
|
---|
435 | <para>By default, the dynamic loader (<filename
|
---|
436 | class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
|
---|
437 | <filename class="directory">/usr/lib</filename> for dynamic libraries
|
---|
438 | that are needed by programs as they are run. However, if there are
|
---|
439 | libraries in directories other than
|
---|
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 > /etc/ld.so.conf << "EOF"
|
---|
452 | <literal># Begin /etc/ld.so.conf
|
---|
453 | /usr/local/lib
|
---|
454 | /opt/lib
|
---|
455 | </literal>
|
---|
456 | EOF</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 >> /etc/ld.so.conf << "EOF"
|
---|
464 | <literal># Add an include directory
|
---|
465 | include /etc/ld.so.conf.d/*.conf
|
---|
466 | </literal>
|
---|
467 | EOF
|
---|
468 | mkdir -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 ./*
|
---|
487 | find .. -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
|
---|
510 | cp -a DESTDIR/usr/lib32/* /usr/lib32/
|
---|
511 | install -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
|
---|
514 | ln -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" >> /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(){}' > dummy.c
|
---|
527 | gcc -m32 dummy.c
|
---|
528 | readelf -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 ./*
|
---|
563 | find .. -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
|
---|
586 | cp -a DESTDIR/usr/libx32/* /usr/libx32/
|
---|
587 | install -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
|
---|
590 | ln -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" >> /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(){}' > dummy.c
|
---|
602 | gcc -mx32 dummy.c
|
---|
603 | readelf -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>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
|
---|
633 | ldd, lddlibc4,
|
---|
634 | ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
|
---|
635 | locale, localedef, makedb, mtrace, nscd,
|
---|
636 | pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
|
---|
637 | zdump, and zic</seg>
|
---|
638 | <seg>ld-linux-x86-64.so.2, ld-linux.so.2,
|
---|
639 | libBrokenLocale.{a,so}, libanl.{a,so},
|
---|
640 | libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
|
---|
641 | libdl.{a,so.2}, libg.a, libm.{a,so},
|
---|
642 | libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.so.1,
|
---|
643 | libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
|
---|
644 | libpcprofile.so, libpthread.{a,so.0},
|
---|
645 | libresolv.{a,so}, librt.{a,so.1},
|
---|
646 | libthread_db.so, and libutil.{a,so.1}</seg>
|
---|
647 | <seg>/usr/include/arpa, /usr/include/bits, /usr/include/gnu,
|
---|
648 | /usr/include/net, /usr/include/netash, /usr/include/netatalk,
|
---|
649 | /usr/include/netax25, /usr/include/neteconet, /usr/include/netinet,
|
---|
650 | /usr/include/netipx, /usr/include/netiucv, /usr/include/netpacket,
|
---|
651 | /usr/include/netrom, /usr/include/netrose, /usr/include/nfs,
|
---|
652 | /usr/include/protocols, /usr/include/rpc,
|
---|
653 | /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale,
|
---|
654 | /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo,
|
---|
655 | /var/cache/nscd, and /var/lib/nss_db</seg>
|
---|
656 | </seglistitem>
|
---|
657 | </segmentedlist>
|
---|
658 |
|
---|
659 | <variablelist>
|
---|
660 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
661 | <?dbfo list-presentation="list"?>
|
---|
662 | <?dbhtml list-presentation="table"?>
|
---|
663 |
|
---|
664 | <varlistentry id="gencat">
|
---|
665 | <term><command>gencat</command></term>
|
---|
666 | <listitem>
|
---|
667 | <para>Generates message catalogues</para>
|
---|
668 | <indexterm zone="ch-system-glibc gencat">
|
---|
669 | <primary sortas="b-gencat">gencat</primary>
|
---|
670 | </indexterm>
|
---|
671 | </listitem>
|
---|
672 | </varlistentry>
|
---|
673 |
|
---|
674 | <varlistentry id="getconf">
|
---|
675 | <term><command>getconf</command></term>
|
---|
676 | <listitem>
|
---|
677 | <para>Displays the system configuration values for file system
|
---|
678 | specific variables</para>
|
---|
679 | <indexterm zone="ch-system-glibc getconf">
|
---|
680 | <primary sortas="b-getconf">getconf</primary>
|
---|
681 | </indexterm>
|
---|
682 | </listitem>
|
---|
683 | </varlistentry>
|
---|
684 |
|
---|
685 | <varlistentry id="getent">
|
---|
686 | <term><command>getent</command></term>
|
---|
687 | <listitem>
|
---|
688 | <para>Gets entries from an administrative database</para>
|
---|
689 | <indexterm zone="ch-system-glibc getent">
|
---|
690 | <primary sortas="b-getent">getent</primary>
|
---|
691 | </indexterm>
|
---|
692 | </listitem>
|
---|
693 | </varlistentry>
|
---|
694 |
|
---|
695 | <varlistentry id="iconv">
|
---|
696 | <term><command>iconv</command></term>
|
---|
697 | <listitem>
|
---|
698 | <para>Performs character set conversion</para>
|
---|
699 | <indexterm zone="ch-system-glibc iconv">
|
---|
700 | <primary sortas="b-iconv">iconv</primary>
|
---|
701 | </indexterm>
|
---|
702 | </listitem>
|
---|
703 | </varlistentry>
|
---|
704 |
|
---|
705 | <varlistentry id="iconvconfig">
|
---|
706 | <term><command>iconvconfig</command></term>
|
---|
707 | <listitem>
|
---|
708 | <para>Creates fastloading <command>iconv</command> module configuration
|
---|
709 | files</para>
|
---|
710 | <indexterm zone="ch-system-glibc iconvconfig">
|
---|
711 | <primary sortas="b-iconvconfig">iconvconfig</primary>
|
---|
712 | </indexterm>
|
---|
713 | </listitem>
|
---|
714 | </varlistentry>
|
---|
715 |
|
---|
716 | <varlistentry id="ldconfig">
|
---|
717 | <term><command>ldconfig</command></term>
|
---|
718 | <listitem>
|
---|
719 | <para>Configures the dynamic linker runtime bindings</para>
|
---|
720 | <indexterm zone="ch-system-glibc ldconfig">
|
---|
721 | <primary sortas="b-ldconfig">ldconfig</primary>
|
---|
722 | </indexterm>
|
---|
723 | </listitem>
|
---|
724 | </varlistentry>
|
---|
725 |
|
---|
726 | <varlistentry id="ldd">
|
---|
727 | <term><command>ldd</command></term>
|
---|
728 | <listitem>
|
---|
729 | <para>Reports which shared libraries are required
|
---|
730 | by each given program or shared library</para>
|
---|
731 | <indexterm zone="ch-system-glibc ldd">
|
---|
732 | <primary sortas="b-ldd">ldd</primary>
|
---|
733 | </indexterm>
|
---|
734 | </listitem>
|
---|
735 | </varlistentry>
|
---|
736 |
|
---|
737 | <varlistentry id="lddlibc4">
|
---|
738 | <term><command>lddlibc4</command></term>
|
---|
739 | <listitem>
|
---|
740 | <para>Assists <command>ldd</command> with object files.
|
---|
741 | It does not exist on newer architectures like x86_64</para>
|
---|
742 | <indexterm zone="ch-system-glibc lddlibc4">
|
---|
743 | <primary sortas="b-lddlibc4">lddlibc4</primary>
|
---|
744 | </indexterm>
|
---|
745 | </listitem>
|
---|
746 | </varlistentry>
|
---|
747 |
|
---|
748 | <varlistentry id="locale">
|
---|
749 | <term><command>locale</command></term>
|
---|
750 | <listitem>
|
---|
751 | <para>Prints various information about the current locale</para>
|
---|
752 | <indexterm zone="ch-system-glibc locale">
|
---|
753 | <primary sortas="b-locale">locale</primary>
|
---|
754 | </indexterm>
|
---|
755 | </listitem>
|
---|
756 | </varlistentry>
|
---|
757 |
|
---|
758 | <varlistentry id="localedef">
|
---|
759 | <term><command>localedef</command></term>
|
---|
760 | <listitem>
|
---|
761 | <para>Compiles locale specifications</para>
|
---|
762 | <indexterm zone="ch-system-glibc localedef">
|
---|
763 | <primary sortas="b-localedef">localedef</primary>
|
---|
764 | </indexterm>
|
---|
765 | </listitem>
|
---|
766 | </varlistentry>
|
---|
767 |
|
---|
768 | <varlistentry id="makedb">
|
---|
769 | <term><command>makedb</command></term>
|
---|
770 | <listitem>
|
---|
771 | <para>Creates a simple database from textual input</para>
|
---|
772 | <indexterm zone="ch-system-glibc makedb">
|
---|
773 | <primary sortas="b-makedb">makedb</primary>
|
---|
774 | </indexterm>
|
---|
775 | </listitem>
|
---|
776 | </varlistentry>
|
---|
777 |
|
---|
778 | <varlistentry id="mtrace">
|
---|
779 | <term><command>mtrace</command></term>
|
---|
780 | <listitem>
|
---|
781 | <para>Reads and interprets a memory trace file and displays a summary
|
---|
782 | in human-readable format</para>
|
---|
783 | <indexterm zone="ch-system-glibc mtrace">
|
---|
784 | <primary sortas="b-mtrace">mtrace</primary>
|
---|
785 | </indexterm>
|
---|
786 | </listitem>
|
---|
787 | </varlistentry>
|
---|
788 |
|
---|
789 | <varlistentry id="nscd">
|
---|
790 | <term><command>nscd</command></term>
|
---|
791 | <listitem>
|
---|
792 | <para>A daemon that provides a cache for the most common name
|
---|
793 | service requests</para>
|
---|
794 | <indexterm zone="ch-system-glibc nscd">
|
---|
795 | <primary sortas="b-nscd">nscd</primary>
|
---|
796 | </indexterm>
|
---|
797 | </listitem>
|
---|
798 | </varlistentry>
|
---|
799 |
|
---|
800 | <varlistentry id="pcprofiledump">
|
---|
801 | <term><command>pcprofiledump</command></term>
|
---|
802 | <listitem>
|
---|
803 | <para>Dump information generated by PC profiling</para>
|
---|
804 | <indexterm zone="ch-system-glibc pcprofiledump">
|
---|
805 | <primary sortas="b-pcprofiledump">pcprofiledump</primary>
|
---|
806 | </indexterm>
|
---|
807 | </listitem>
|
---|
808 | </varlistentry>
|
---|
809 |
|
---|
810 | <varlistentry id="pldd">
|
---|
811 | <term><command>pldd</command></term>
|
---|
812 | <listitem>
|
---|
813 | <para>Lists dynamic shared objects used by running processes</para>
|
---|
814 | <indexterm zone="ch-system-glibc pldd">
|
---|
815 | <primary sortas="b-pldd">pldd</primary>
|
---|
816 | </indexterm>
|
---|
817 | </listitem>
|
---|
818 | </varlistentry>
|
---|
819 |
|
---|
820 | <varlistentry id="sln">
|
---|
821 | <term><command>sln</command></term>
|
---|
822 | <listitem>
|
---|
823 | <para>A statically linked <command>ln</command> program</para>
|
---|
824 | <indexterm zone="ch-system-glibc sln">
|
---|
825 | <primary sortas="b-sln">sln</primary>
|
---|
826 | </indexterm>
|
---|
827 | </listitem>
|
---|
828 | </varlistentry>
|
---|
829 |
|
---|
830 | <varlistentry id="sotruss">
|
---|
831 | <term><command>sotruss</command></term>
|
---|
832 | <listitem>
|
---|
833 | <para>Traces shared library procedure calls of a specified command</para>
|
---|
834 | <indexterm zone="ch-system-glibc sotruss">
|
---|
835 | <primary sortas="b-sotruss">sotruss</primary>
|
---|
836 | </indexterm>
|
---|
837 | </listitem>
|
---|
838 | </varlistentry>
|
---|
839 |
|
---|
840 | <varlistentry id="sprof">
|
---|
841 | <term><command>sprof</command></term>
|
---|
842 | <listitem>
|
---|
843 | <para>Reads and displays shared object profiling data</para>
|
---|
844 | <indexterm zone="ch-system-glibc sprof">
|
---|
845 | <primary sortas="b-sprof">sprof</primary>
|
---|
846 | </indexterm>
|
---|
847 | </listitem>
|
---|
848 | </varlistentry>
|
---|
849 |
|
---|
850 | <varlistentry id="tzselect">
|
---|
851 | <term><command>tzselect</command></term>
|
---|
852 | <listitem>
|
---|
853 | <para>Asks the user about the location of the system and reports
|
---|
854 | the corresponding time zone description</para>
|
---|
855 | <indexterm zone="ch-system-glibc tzselect">
|
---|
856 | <primary sortas="b-tzselect">tzselect</primary>
|
---|
857 | </indexterm>
|
---|
858 | </listitem>
|
---|
859 | </varlistentry>
|
---|
860 |
|
---|
861 | <varlistentry id="xtrace">
|
---|
862 | <term><command>xtrace</command></term>
|
---|
863 | <listitem>
|
---|
864 | <para>Traces the execution of a program by printing the currently
|
---|
865 | executed function</para>
|
---|
866 | <indexterm zone="ch-system-glibc xtrace">
|
---|
867 | <primary sortas="b-xtrace">xtrace</primary>
|
---|
868 | </indexterm>
|
---|
869 | </listitem>
|
---|
870 | </varlistentry>
|
---|
871 |
|
---|
872 | <varlistentry id="zdump">
|
---|
873 | <term><command>zdump</command></term>
|
---|
874 | <listitem>
|
---|
875 | <para>The time zone dumper</para>
|
---|
876 | <indexterm zone="ch-system-glibc zdump">
|
---|
877 | <primary sortas="b-zdump">zdump</primary>
|
---|
878 | </indexterm>
|
---|
879 | </listitem>
|
---|
880 | </varlistentry>
|
---|
881 |
|
---|
882 | <varlistentry id="zic">
|
---|
883 | <term><command>zic</command></term>
|
---|
884 | <listitem>
|
---|
885 | <para>The time zone compiler</para>
|
---|
886 | <indexterm zone="ch-system-glibc zic">
|
---|
887 | <primary sortas="b-zic">zic</primary>
|
---|
888 | </indexterm>
|
---|
889 | </listitem>
|
---|
890 | </varlistentry>
|
---|
891 |
|
---|
892 | <varlistentry id="ld.so">
|
---|
893 | <term><filename class="libraryfile">ld-*.so</filename></term>
|
---|
894 | <listitem>
|
---|
895 | <para>The helper program for shared library executables</para>
|
---|
896 | <indexterm zone="ch-system-glibc ld.so">
|
---|
897 | <primary sortas="c-ld.so">ld-&glibc-version;.so</primary>
|
---|
898 | </indexterm>
|
---|
899 | </listitem>
|
---|
900 | </varlistentry>
|
---|
901 |
|
---|
902 | <varlistentry id="libBrokenLocale">
|
---|
903 | <term><filename class="libraryfile">libBrokenLocale</filename></term>
|
---|
904 | <listitem>
|
---|
905 | <para>Used internally by Glibc as a gross hack to get broken programs
|
---|
906 | (e.g., some Motif applications) running. See comments in
|
---|
907 | <filename>glibc-&glibc-version;/locale/broken_cur_max.c</filename>
|
---|
908 | for more information</para>
|
---|
909 | <indexterm zone="ch-system-glibc libBrokenLocale">
|
---|
910 | <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
|
---|
911 | </indexterm>
|
---|
912 | </listitem>
|
---|
913 | </varlistentry>
|
---|
914 |
|
---|
915 | <varlistentry id="libanl">
|
---|
916 | <term><filename class="libraryfile">libanl</filename></term>
|
---|
917 | <listitem>
|
---|
918 | <para>Dummy library containing no functions. Previously was the
|
---|
919 | asynchronous name lookup library, whose functions are now in
|
---|
920 | <filename class='libraryfile'>libc</filename></para>
|
---|
921 | <indexterm zone="ch-system-glibc libanl">
|
---|
922 | <primary sortas="c-libanl">libanl</primary>
|
---|
923 | </indexterm>
|
---|
924 | </listitem>
|
---|
925 | </varlistentry>
|
---|
926 |
|
---|
927 | <varlistentry id="libc">
|
---|
928 | <term><filename class="libraryfile">libc</filename></term>
|
---|
929 | <listitem>
|
---|
930 | <para>The main C library</para>
|
---|
931 | <indexterm zone="ch-system-glibc libc">
|
---|
932 | <primary sortas="c-libc">libc</primary>
|
---|
933 | </indexterm>
|
---|
934 | </listitem>
|
---|
935 | </varlistentry>
|
---|
936 |
|
---|
937 | <varlistentry id="libc_malloc_debug">
|
---|
938 | <term><filename class="libraryfile">libc_malloc_debug</filename></term>
|
---|
939 | <listitem>
|
---|
940 | <para>Turns on memory allocation checking when preloaded</para>
|
---|
941 | <indexterm zone="ch-system-glibc libc_malloc_debug">
|
---|
942 | <primary sortas="c-libc_malloc_debug">libc_malloc_debug</primary>
|
---|
943 | </indexterm>
|
---|
944 | </listitem>
|
---|
945 | </varlistentry>
|
---|
946 |
|
---|
947 | <varlistentry id="libdl">
|
---|
948 | <term><filename class="libraryfile">libdl</filename></term>
|
---|
949 | <listitem>
|
---|
950 | <para>Dummy library containing no functions. Previously was the
|
---|
951 | dynamic linking interface library, whose functions are now in
|
---|
952 | <filename class="libraryfile">libc</filename></para>
|
---|
953 | <indexterm zone="ch-system-glibc libdl">
|
---|
954 | <primary sortas="c-libdl">libdl</primary>
|
---|
955 | </indexterm>
|
---|
956 | </listitem>
|
---|
957 | </varlistentry>
|
---|
958 |
|
---|
959 | <varlistentry id="libg">
|
---|
960 | <term><filename class="libraryfile">libg</filename></term>
|
---|
961 | <listitem>
|
---|
962 | <para>Dummy library containing no functions. Previously was a runtime
|
---|
963 | library for <command>g++</command></para>
|
---|
964 | <indexterm zone="ch-system-glibc libg">
|
---|
965 | <primary sortas="c-libg">libg</primary>
|
---|
966 | </indexterm>
|
---|
967 | </listitem>
|
---|
968 | </varlistentry>
|
---|
969 |
|
---|
970 | <varlistentry id="libm">
|
---|
971 | <term><filename class="libraryfile">libm</filename></term>
|
---|
972 | <listitem>
|
---|
973 | <para>The mathematical library</para>
|
---|
974 | <indexterm zone="ch-system-glibc libm">
|
---|
975 | <primary sortas="c-libm">libm</primary>
|
---|
976 | </indexterm>
|
---|
977 | </listitem>
|
---|
978 | </varlistentry>
|
---|
979 |
|
---|
980 | <varlistentry id="libmvec">
|
---|
981 | <term><filename class="libraryfile">libmvec</filename></term>
|
---|
982 | <listitem>
|
---|
983 | <para>The vector math library, linked in as needed
|
---|
984 | when <filename class='libraryfile'>libm</filename> is used</para>
|
---|
985 | <indexterm zone="ch-system-glibc libmvec">
|
---|
986 | <primary sortas="c-libmvec">libmvec</primary>
|
---|
987 | </indexterm>
|
---|
988 | </listitem>
|
---|
989 | </varlistentry>
|
---|
990 |
|
---|
991 | <varlistentry id="libmcheck">
|
---|
992 | <term><filename class="libraryfile">libmcheck</filename></term>
|
---|
993 | <listitem>
|
---|
994 | <para>Turns on memory allocation checking when linked to</para>
|
---|
995 | <indexterm zone="ch-system-glibc libmcheck">
|
---|
996 | <primary sortas="c-libmcheck">libmcheck</primary>
|
---|
997 | </indexterm>
|
---|
998 | </listitem>
|
---|
999 | </varlistentry>
|
---|
1000 |
|
---|
1001 | <varlistentry id="libmemusage">
|
---|
1002 | <term><filename class="libraryfile">libmemusage</filename></term>
|
---|
1003 | <listitem>
|
---|
1004 | <para>Used by <command>memusage</command> to help collect
|
---|
1005 | information about the memory usage of a program</para>
|
---|
1006 | <indexterm zone="ch-system-glibc libmemusage">
|
---|
1007 | <primary sortas="c-libmemusage">libmemusage</primary>
|
---|
1008 | </indexterm>
|
---|
1009 | </listitem>
|
---|
1010 | </varlistentry>
|
---|
1011 |
|
---|
1012 | <varlistentry id="libnsl">
|
---|
1013 | <term><filename class="libraryfile">libnsl</filename></term>
|
---|
1014 | <listitem>
|
---|
1015 | <para>The network services library, now deprecated</para>
|
---|
1016 | <indexterm zone="ch-system-glibc libnsl">
|
---|
1017 | <primary sortas="c-libnsl">libnsl</primary>
|
---|
1018 | </indexterm>
|
---|
1019 | </listitem>
|
---|
1020 | </varlistentry>
|
---|
1021 |
|
---|
1022 | <varlistentry id="libnss">
|
---|
1023 | <term><filename class="libraryfile">libnss_*</filename></term>
|
---|
1024 | <listitem>
|
---|
1025 | <para>The Name Service Switch modules, containing functions for
|
---|
1026 | resolving host names, user names, group names, aliases, services,
|
---|
1027 | protocols, etc. Loaded by
|
---|
1028 | <filename class='libraryfile'>libc</filename> according to the
|
---|
1029 | configuration in <filename>/etc/nsswitch.conf</filename></para>
|
---|
1030 | <indexterm zone="ch-system-glibc libnss">
|
---|
1031 | <primary sortas="c-libnss">libnss_*</primary>
|
---|
1032 | </indexterm>
|
---|
1033 | </listitem>
|
---|
1034 | </varlistentry>
|
---|
1035 |
|
---|
1036 | <varlistentry id="libpcprofile">
|
---|
1037 | <term><filename class="libraryfile">libpcprofile</filename></term>
|
---|
1038 | <listitem>
|
---|
1039 | <para>Can be preloaded to PC profile an executable</para>
|
---|
1040 | <indexterm zone="ch-system-glibc libpcprofile">
|
---|
1041 | <primary sortas="c-libpcprofile">libpcprofile</primary>
|
---|
1042 | </indexterm>
|
---|
1043 | </listitem>
|
---|
1044 | </varlistentry>
|
---|
1045 |
|
---|
1046 | <varlistentry id="libpthread">
|
---|
1047 | <term><filename class="libraryfile">libpthread</filename></term>
|
---|
1048 | <listitem>
|
---|
1049 | <para>Dummy library containing no functions. Previously contained
|
---|
1050 | functions providing most of the interfaces specified
|
---|
1051 | by the POSIX.1c Threads Extensions and the semaphore interfaces
|
---|
1052 | specified by the POSIX.1b Real-time Extensions, now the functions
|
---|
1053 | are in <filename class="libraryfile">libc</filename></para>
|
---|
1054 | <indexterm zone="ch-system-glibc libpthread">
|
---|
1055 | <primary sortas="c-libpthread">libpthread</primary>
|
---|
1056 | </indexterm>
|
---|
1057 | </listitem>
|
---|
1058 | </varlistentry>
|
---|
1059 |
|
---|
1060 | <varlistentry id="libresolv">
|
---|
1061 | <term><filename class="libraryfile">libresolv</filename></term>
|
---|
1062 | <listitem>
|
---|
1063 | <para>Contains functions for creating, sending, and interpreting
|
---|
1064 | packets to the Internet domain name servers</para>
|
---|
1065 | <indexterm zone="ch-system-glibc libresolv">
|
---|
1066 | <primary sortas="c-libresolv">libresolv</primary>
|
---|
1067 | </indexterm>
|
---|
1068 | </listitem>
|
---|
1069 | </varlistentry>
|
---|
1070 |
|
---|
1071 | <varlistentry id="librt">
|
---|
1072 | <term><filename class="libraryfile">librt</filename></term>
|
---|
1073 | <listitem>
|
---|
1074 | <para>Contains functions providing most of the interfaces specified
|
---|
1075 | by the POSIX.1b Real-time Extensions</para>
|
---|
1076 | <indexterm zone="ch-system-glibc librt">
|
---|
1077 | <primary sortas="c-librt">librt</primary>
|
---|
1078 | </indexterm>
|
---|
1079 | </listitem>
|
---|
1080 | </varlistentry>
|
---|
1081 |
|
---|
1082 | <varlistentry id="libthread_db">
|
---|
1083 | <term><filename class="libraryfile">libthread_db</filename></term>
|
---|
1084 | <listitem>
|
---|
1085 | <para>Contains functions useful for building debuggers for
|
---|
1086 | multi-threaded programs</para>
|
---|
1087 | <indexterm zone="ch-system-glibc libthread_db">
|
---|
1088 | <primary sortas="c-libthread_db">libthread_db</primary>
|
---|
1089 | </indexterm>
|
---|
1090 | </listitem>
|
---|
1091 | </varlistentry>
|
---|
1092 |
|
---|
1093 | <varlistentry id="libutil">
|
---|
1094 | <term><filename class="libraryfile">libutil</filename></term>
|
---|
1095 | <listitem>
|
---|
1096 | <para>Dummy library containing no functions. Previously contained
|
---|
1097 | code for <quote>standard</quote> functions used in
|
---|
1098 | many different Unix utilities. These functions are now in
|
---|
1099 | <filename class="libraryfile">libc</filename></para>
|
---|
1100 | <indexterm zone="ch-system-glibc libutil">
|
---|
1101 | <primary sortas="c-libutil">libutil</primary>
|
---|
1102 | </indexterm>
|
---|
1103 | </listitem>
|
---|
1104 | </varlistentry>
|
---|
1105 |
|
---|
1106 | </variablelist>
|
---|
1107 |
|
---|
1108 | </sect2>
|
---|
1109 |
|
---|
1110 | </sect1>
|
---|