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