Ignore:
Timestamp:
08/08/2004 02:11:09 AM (20 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
6.0
Children:
5ba3d1d
Parents:
6e41459
Message:

Completed global edits for upcoming 6.0 release

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4000 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/glibc.xml

    r6e41459 ref13657  
    3232<title>Installation of Glibc</title>
    3333
    34 <para>The Glibc build system is very well self-contained and will install
    35 perfectly, even though our compiler specs file and linker are still pointing
    36 at <filename class="directory">/tools</filename>. We cannot adjust the specs and linker before
    37 the Glibc install, because the Glibc autoconf tests would then give bogus
    38 results and thus defeat our goal of achieving a clean build.</para>
    39 
    40 <para>Before starting to build Glibc, remember to unset any environment
    41 variables that override the default optimization flags.</para>
     34<para>The Glibc build system is self-contained and will install
     35perfectly, even though the compiler specs file and linker are still
     36pointing at <filename class="directory">/tools</filename>. The specs
     37and linker cannot be adjusted before the Glibc install because the
     38Glibc autoconf tests would then give false results and defeat the goal
     39of achieving a clean build.</para>
     40
     41<para>Before starting to build Glibc, remember to unset any
     42environment variables that override the default optimization
     43flags.</para>
    4244
    4345<para>The Glibc documentation recommends building Glibc outside of the source
     
    5254    --disable-profile --enable-add-ons=nptl --with-tls \
    5355    --with-__thread --enable-kernel=2.6.0 --without-cvs \
     56    --libexecdir=/usr/lib/glibc \
    5457    --with-headers=/tools/glibc-kernheaders</userinput></screen>
    5558
     59<para>The meaning of the new configure option:</para>
     60
     61<variablelist>
     62<varlistentry>
     63<term><parameter>--libexecdir=/usr/lib/glibc</parameter></term>
     64<listitem><para>This changes the location of the
     65<command>pt_chown</command> program from its default of <filename
     66class="directory">/usr/libexec</filename> to <filename
     67class="directory">/usr/lib/glibc</filename>.</para></listitem>
     68</varlistentry>
     69</variablelist>
     70
    5671<para>Compile the package:</para>
    5772
    5873<screen><userinput>make</userinput></screen>
    5974
    60 <important><para>The test suite for Glibc in this section is considered
    61 <emphasis>critical</emphasis>. Our advice is to not skip it under any
     75<important><para>In this section, the test suite for Glibc is
     76considered critical. Do not skip it under any
    6277circumstance.</para></important>
    6378
     
    6681<screen><userinput>make check</userinput></screen>
    6782
    68 <para>The Glibc test suite is highly dependent on certain functions of your host
    69 system, in particular the kernel.  In general, the Glibc test suite is always
    70 expected to pass. However, in certain circumstances some failures are
    71 unavoidable. Here is a list of the most common issues we are aware of:</para>
     83<para>The Glibc test suite is highly dependent on certain functions of
     84the host system, in particular the kernel. In general, the Glibc test
     85suite is always expected to pass. However, in certain circumstances,
     86some failures are unavoidable. This is a list of the most common
     87issues:</para>
    7288
    7389<itemizedlist>
     
    7995host system issues. The exact reasons are not yet clear.</para></listitem>
    8096
    81 <listitem><para>The <emphasis>atime</emphasis> test sometimes fails when the
    82 LFS partition is mounted with the <parameter>noatime</parameter> option, or due
    83 to other file system quirks.</para></listitem>
    84 
    85 <listitem><para>The <emphasis>shm</emphasis> test might fail when the host
    86 system is running the devfs file system but doesn't have the <systemitem class="filesystem">tmpfs</systemitem> file system
    87 mounted at <filename class="directory">/dev/shm</filename> due to lack of support for tmpfs in
    88 the kernel.</para></listitem>
    89 
    90 <listitem><para>When running on older and slower hardware, some tests might
    91 fail due to test timeouts being exceeded.</para></listitem>
     97<listitem><para>The <emphasis>atime</emphasis> test sometimes fails
     98when the LFS partition is mounted with the
     99<parameter>noatime</parameter> option. This sometimes occurs because
     100of other file system quirks as well.</para></listitem>
     101
     102<listitem><para>The <emphasis>shm</emphasis> test can fail when the
     103host system is using the <systemitem
     104class="filesystem">devfs</systemitem> file system but does not have
     105the <systemitem class="filesystem">tmpfs</systemitem> file system
     106mounted at <filename class="directory">/dev/shm</filename>.  This
     107occurs because of a lack of support for tmpfs in the
     108kernel.</para></listitem>
     109
     110<listitem><para>When running on older and slower hardware, some tests
     111can fail because of test timeouts being exceeded.</para></listitem>
    92112</itemizedlist>
    93113
    94114<para>Though it is a harmless message, the install stage of Glibc will
    95 complain about the absence of <filename>/etc/ld.so.conf</filename>. Fix this
    96 annoying little warning with:</para>
     115complain about the absence of <filename>/etc/ld.so.conf</filename>.
     116Prevent this warning with:</para>
    97117
    98118<screen><userinput>touch /etc/ld.so.conf</userinput></screen>
    99119
    100 <para>And install the package:</para>
     120<para>Install the package:</para>
    101121
    102122<screen><userinput>make install</userinput></screen>
    103123
    104 <para>The locales that can make your system respond in a different language
    105 weren't installed by the above command. Do it with this:</para>
     124<para>The locales that can make the system respond in a different
     125language were not installed by the above command. Install this
     126with:</para>
    106127
    107128<screen><userinput>make localedata/install-locales</userinput></screen>
    108129
    109 <para>An alternative to running the previous command is to install only those
    110 locales which you need or want. This can be achieved by using the
    111 <command>localedef</command> command. Information on this can be found in
    112 the <filename>INSTALL</filename> file in the Glibc source. However, there are
    113 a number of locales that are essential for the tests of future packages to
    114 pass, in particular, the <emphasis>libstdc++</emphasis> tests from GCC. The
    115 following instructions, instead of the install-locales target above, will
    116 install the minimum set of locales necessary for the tests to run
    117 successfully:</para>
     130<para>To save yourself a lot of time, an alternative to running the
     131previous command (which generates and installs every locale Glibc is
     132aware of) is to install only those locales that are wanted and needed.
     133This can be achieved by using the <command>localedef</command>
     134command. Information on this command is located in the
     135<filename>INSTALL</filename> file in the Glibc source.  However, there
     136are a number of locales that are essential in order for the tests of
     137future packages to pass, in particular, the
     138<emphasis>libstdc++</emphasis> tests from GCC. The following
     139instructions, instead of the <emphasis>install-locales</emphasis>
     140target used above, will install the minimum set of locales necessary
     141for the tests to run successfully:</para>
    118142
    119143<screen><userinput>mkdir -p /usr/lib/locale
     
    130154localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
    131155
    132 <para>In fact, some locales installed by the
    133 <command>make localedata/install-locales</command>
    134 command above are not properly
    135 supported by some applications that are in LFS and BLFS books. Because
    136 of various problems that arise
    137 due to application programmers making
    138 assumptions that break in such locales, LFS <emphasis>should not</emphasis>
    139 be used in locales that utilize
    140 multibyte character sets (including UTF-8) or
    141 right-to-left writing order.
    142 Numerous unofficial and unstable patches are required to fix these problems,
    143 and it has been decided not to support such complex locales.
    144 This applies to the ja_JP and fa_IR locales as well:
    145 they have been installed only
    146 for GCC and Gettext tests to pass, and e.g.
    147 the <command>watch</command> program (part of Procps)
    148 compiled according to this book doesn't work properly in them.
    149 Various attempts to circumvent these
    150 restrictions are documented in internationalization-related hints.</para>
    151 
    152 <para>Finally, build the linuxthreads man pages, which are a great reference
     156<para>Some locales installed by the <command>make
     157localedata/install-locales</command> command above are not properly
     158supported by some applications that are in the LFS and BLFS books.
     159Because of the various problems that arise due to application
     160programmers making assumptions that break in such locales, LFS should
     161not be used in locales that utilize multibyte character sets
     162(including UTF-8) or right-to-left writing order.  Numerous unofficial
     163and unstable patches are required to fix these problems, and it has
     164been decided not to support such complex locales.  This applies to the
     165ja_JP and fa_IR locales as well -- they have been installed only for
     166GCC and Gettext tests to pass and the <command>watch</command> program
     167(part of the Procps package) does not work properly in them. Various
     168attempts to circumvent these restrictions are documented in
     169internationalization-related hints.</para>
     170
     171<para>Build the linuxthreads man pages, which are a great reference
    153172on the threading API (applicable to NPTL as well):</para>
    154173
    155174<screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man</userinput></screen>
    156175
    157 <para>And install these pages:</para>
     176<para>Install these pages:</para>
    158177
    159178<screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man install</userinput></screen>
    160179
    161180</sect2>
    162 
    163181
    164182<sect2 id="conf-glibc" role="configuration"><title>Configuring Glibc</title>
     
    166184<indexterm zone="conf-glibc"><primary sortas="e-/etc/localtime">/etc/localtime</primary></indexterm>
    167185
    168 <para>We need to create the <filename>/etc/nsswitch.conf</filename> file,
    169 because, although Glibc provides defaults when this file is missing or corrupt,
    170 the Glibc defaults don't work well with networking. Also, our time zone needs
    171 to be set up.</para>
     186<para>The <filename>/etc/nsswitch.conf</filename> file needs to be
     187created because, although Glibc provides defaults when this file is
     188missing or corrupt, the Glibc defaults do not work well with
     189networking. The time zone also needs to be set up.</para>
    172190
    173191<para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
     
    196214<screen><userinput>tzselect</userinput></screen>
    197215
    198 <para>When you've answered a few questions about your location, the script will
    199 output the name of your time zone, something like <emphasis>EST5EDT</emphasis>
    200 or <emphasis>Canada/Eastern</emphasis>. Then create the
    201 <filename>/etc/localtime</filename> file by running:</para>
    202 
    203 <screen><userinput>cp --remove-destination /usr/share/zoneinfo/Canada/Eastern /etc/localtime</userinput></screen>
    204 
    205 <para>The meaning of the option:</para>
     216<para>After answering a few questions about the location, the script
     217will output the name of the time zone (e.g.,
     218<emphasis>EST5EDT</emphasis> or <emphasis>Canada/Eastern</emphasis>).
     219Then create the <filename>/etc/localtime</filename> file by
     220running:</para>
     221
     222<screen><userinput>cp --remove-destination /usr/share/zoneinfo/<replaceable>[xxx]</replaceable> /etc/localtime</userinput></screen>
     223
     224<para>Replace [xxx] with the name of the time zone that the
     225<command>tzselect</command> provided (e.g., Canada/Eastern).</para>
     226
     227<para>The meaning of the cp option:</para>
    206228
    207229<variablelist>
    208230<varlistentry>
    209231<term><parameter>--remove-destination</parameter></term>
    210 <listitem><para>This is needed to force removal of the already existing symbolic
    211 link. The reason why we copy instead of symlink is to cover the situation where
    212 <filename class="directory">/usr</filename> is on a separate partition. This could matter, for
    213 example, when booted into single user mode.</para></listitem>
     232<listitem><para>This is needed to force removal of the already
     233existing symbolic link. The reason for copying the file instead of
     234using a symlink is to cover the situation where <filename
     235class="directory">/usr</filename> is on a separate partition. This
     236could be important when booted into single user
     237mode.</para></listitem>
    214238</varlistentry>
    215239</variablelist>
    216 
    217 <para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in
    218 the name of the time zone that the <command>tzselect</command> script
    219 gave you.</para>
    220240
    221241</sect2>
     
    226246<indexterm zone="conf-ld"><primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary></indexterm>
    227247
    228 <para>By default, the dynamic loader
    229 (<filename class="libraryfile">/lib/ld-linux.so.2</filename>) searches through <filename
    230 class="directory">/lib</filename> and <filename class="directory">/usr/lib</filename>
    231 for dynamic libraries that are needed
    232 by programs when you run them. However, if there are libraries in
     248<para>By default, the dynamic loader (<filename
     249class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
     250<filename class="directory">/lib</filename> and <filename
     251class="directory">/usr/lib</filename> for dynamic libraries that are
     252needed by programs as they are run. However, if there are libraries in
    233253directories other than <filename class="directory">/lib</filename> and
    234 <filename class="directory">/usr/lib</filename>, you need to add them to
    235 the <filename>/etc/ld.so.conf</filename> file for the dynamic
    236 loader to find them. Two directories that are commonly known to contain
    237 additional libraries are <filename class="directory">/usr/local/lib</filename>
    238 and <filename class="directory">/opt/lib</filename>, so we add those directories to the
     254<filename class="directory">/usr/lib</filename>, these need to be
     255added them to the <filename>/etc/ld.so.conf</filename> file in order
     256for the dynamic loader to find them. Two directories that are commonly
     257known to contain additional libraries are <filename
     258class="directory">/usr/local/lib</filename> and <filename
     259class="directory">/opt/lib</filename>, so add those directories to the
    239260dynamic loader's search path.</para>
    240261
     
    278299<listitem>
    279300<indexterm zone="ch-system-glibc catchsegv"><primary sortas="b-catchsegv">catchsegv</primary></indexterm>
    280 <para>can be used to create a stack trace
    281 when a program terminates with a segmentation fault.</para>
     301<para>can be used to create a stack trace when a program
     302terminates with a segmentation fault.</para>
    282303</listitem>
    283304</varlistentry>
     
    327348<listitem>
    328349<indexterm zone="ch-system-glibc iconvconfig"><primary sortas="b-iconvconfig">iconvconfig</primary></indexterm>
    329 <para>creates fastloading <command>iconv</command> module configuration file.</para>
     350<para>creates fastloading <command>iconv</command> module configuration files.</para>
    330351</listitem>
    331352</varlistentry>
     
    360381<listitem>
    361382<indexterm zone="ch-system-glibc locale"><primary sortas="b-locale">locale</primary></indexterm>
    362 <para>is a Perl program that tells the compiler
     383<para>a Perl program that tells the compiler
    363384to enable or disable the use of POSIX locales for built-in operations.</para>
    364385</listitem>
     
    377398<listitem>
    378399<indexterm zone="ch-system-glibc mtrace"><primary sortas="b-mtrace">mtrace</primary></indexterm>
    379 <para>...</para>
     400<para>a program that reads and interprets a memory trace file and
     401ouputs a summary in human-readable format.</para>
    380402</listitem>
    381403</varlistentry>
     
    385407<listitem>
    386408<indexterm zone="ch-system-glibc nscd"><primary sortas="b-nscd">nscd</primary></indexterm>
    387 <para>is a name service cache daemon providing a
    388 cache for the most common name service requests.</para>
     409<para>a daemon that provides a cache for the most common name
     410service requests.</para>
    389411</listitem>
    390412</varlistentry>
     
    410432<listitem>
    411433<indexterm zone="ch-system-glibc pt_chown"><primary sortas="b-pt_chown">pt_chown</primary></indexterm>
    412 <para>is a helper program for grantpt to set
     434<para>is a helper program for <command>grantpt</command> to set
    413435the owner, group and access permissions of a slave pseudo terminal.</para>
    414436</listitem>
     
    419441<listitem>
    420442<indexterm zone="ch-system-glibc rpcgen"><primary sortas="b-rpcgen">rpcgen</primary></indexterm>
    421 <para>generates C code to implement the RPC protocol.</para>
     443<para>generates C code to implement the Remote Procecure call (RPC) protocol.</para>
    422444</listitem>
    423445</varlistentry>
     
    435457<listitem>
    436458<indexterm zone="ch-system-glibc sln"><primary sortas="b-sln">sln</primary></indexterm>
    437 <para>is used to make symbolic links. The program
    438 is statically linked, so it is useful for making symbolic links to dynamic
    439 libraries if the dynamic linking system for some reason is nonfunctional.</para>
     459<para>a statically linked <command>ln</command> program.</para>
    440460</listitem>
    441461</varlistentry>
     
    471491<listitem>
    472492<indexterm zone="ch-system-glibc zdump"><primary sortas="b-zdump">zdump</primary></indexterm>
    473 <para>is the time zone dumper.</para>
     493<para>the time zone dumper.</para>
    474494</listitem>
    475495</varlistentry>
     
    479499<listitem>
    480500<indexterm zone="ch-system-glibc zic"><primary sortas="b-zic">zic</primary></indexterm>
    481 <para>is the time zone compiler.</para>
     501<para>the time zone compiler.</para>
    482502</listitem>
    483503</varlistentry>
     
    487507<listitem>
    488508<indexterm zone="ch-system-glibc ld.so"><primary sortas="c-ld.so">ld.so</primary></indexterm>
    489 <para>is the helper program for shared library executables.</para>
     509<para>the helper program for shared library executables.</para>
    490510</listitem>
    491511</varlistentry>
     
    495515<listitem>
    496516<indexterm zone="ch-system-glibc libBrokenLocale"><primary sortas="c-libBrokenLocale">libBrokenLocale</primary></indexterm>
    497 <para>is used by programs, such as Mozilla, to solve broken locales.</para>
     517<para>used by programs, such as Mozilla, to solve broken locales.</para>
    498518</listitem>
    499519</varlistentry>
     
    503523<listitem>
    504524<indexterm zone="ch-system-glibc libSegFault"><primary sortas="c-libSegFault">libSegFault</primary></indexterm>
    505 <para>is a segmentation fault signal handler. It tries to catch segfaults.</para>
     525<para>the segmentation fault signal handler.</para>
    506526</listitem>
    507527</varlistentry>
     
    511531<listitem>
    512532<indexterm zone="ch-system-glibc libanl"><primary sortas="c-libanl">libanl</primary></indexterm>
    513 <para>is an asynchronous name lookup library.</para>
     533<para>an asynchronous name lookup library.</para>
    514534</listitem>
    515535</varlistentry>
     
    528548<listitem>
    529549<indexterm zone="ch-system-glibc libc"><primary sortas="c-libc">libc</primary></indexterm>
    530 <para>is the main C library -- a collection of commonly used functions.</para>
     550<para>the main C library.</para>
    531551</listitem>
    532552</varlistentry>
     
    536556<listitem>
    537557<indexterm zone="ch-system-glibc libcrypt"><primary sortas="c-libcrypt">libcrypt</primary></indexterm>
    538 <para>is the cryptography library.</para>
     558<para>the cryptography library.</para>
    539559</listitem>
    540560</varlistentry>
     
    544564<listitem>
    545565<indexterm zone="ch-system-glibc libdl"><primary sortas="c-libdl">libdl</primary></indexterm>
    546 <para>is the dynamic linking interface library.</para>
     566<para>the dynamic linking interface library.</para>
    547567</listitem>
    548568</varlistentry>
     
    552572<listitem>
    553573<indexterm zone="ch-system-glibc libg"><primary sortas="c-libg">libg</primary></indexterm>
    554 <para>is a runtime library for <command>g++</command>.</para>
     574<para>a runtime library for <command>g++</command>.</para>
    555575</listitem>
    556576</varlistentry>
     
    560580<listitem>
    561581<indexterm zone="ch-system-glibc libieee"><primary sortas="c-libieee">libieee</primary></indexterm>
    562 <para>is the IEEE floating point library.</para>
     582<para>the Institute of Electrical and Electronic Engineers (IEEE) floating point library.</para>
    563583</listitem>
    564584</varlistentry>
     
    568588<listitem>
    569589<indexterm zone="ch-system-glibc libm"><primary sortas="c-libm">libm</primary></indexterm>
    570 <para>is the mathematical library.</para>
     590<para>the mathematical library.</para>
    571591</listitem>
    572592</varlistentry>
     
    584604<listitem>
    585605<indexterm zone="ch-system-glibc libmemusage"><primary sortas="c-libmemusage">libmemusage</primary></indexterm>
    586 <para>is used by <command>memusage</command> to help collect
     606<para>used by <command>memusage</command> to help collect
    587607information about the memory usage of a program.</para>
    588608</listitem>
     
    593613<listitem>
    594614<indexterm zone="ch-system-glibc libnsl"><primary sortas="c-libnsl">libnsl</primary></indexterm>
    595 <para>is the network services library.</para>
     615<para>the network services library.</para>
    596616</listitem>
    597617</varlistentry>
     
    601621<listitem>
    602622<indexterm zone="ch-system-glibc libnss"><primary sortas="c-libnss*">libnss*</primary></indexterm>
    603 <para>are the Name Service Switch libraries,
     623<para>the Name Service Switch libraries,
    604624containing functions for resolving host names, user names, group names,
    605 aliases, services, protocols, and the like.</para>
     625aliases, services, protocols, etc.</para>
    606626</listitem>
    607627</varlistentry>
     
    671691
    672692</sect1>
     693
Note: See TracChangeset for help on using the changeset viewer.