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