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