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