Ignore:
Timestamp:
02/19/2005 10:16:42 PM (19 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
3d31fc4
Parents:
2f9131f
Message:

Trunk is now identical to Testing

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/glibc.xml

    r2f9131f r81fd230  
    88<?dbhtml filename="glibc.html"?>
    99
     10<indexterm zone="ch-tools-glibc">
     11<primary sortas="a-Glibc">Glibc</primary>
     12<secondary>tools</secondary></indexterm>
     13
    1014<sect2 role="package"><title/>
     15<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    1116
    1217<segmentedlist>
     
    1621</segmentedlist>
    1722
     23<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
     24
    1825</sect2>
    1926
     
    2128<title>Installation of Glibc</title>
    2229
    23 <para>Create a build dir:</para>
     30<para>This package is known to have issues when its default
     31optimization flags (including the <parameter>-march</parameter> and
     32<parameter>-mcpu</parameter> options) are changed. If any environment
     33variables that override default optimizations have been defined, such
     34as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
     35unset them when building Glibc.</para>
     36
     37<para>It should be noted that compiling Glibc in any way other than
     38the method suggested in this book puts the stability of the system at
     39risk.</para>
     40
     41<para>The Glibc documentation recommends building Glibc outside of the source
     42directory in a dedicated build directory:</para>
    2443
    2544<screen><userinput>mkdir ../glibc-build
     
    3453    --disable-selinux</userinput></screen>
    3554
     55<para>The meaning of the configure options:</para>
     56
     57<variablelist>
     58<varlistentry>
     59<term><parameter>--disable-profile</parameter></term>
     60<listitem><para>This builds the libraries without profiling
     61information. Omit this option if profiling on the temporary tools is
     62necessary.</para></listitem>
     63</varlistentry>
     64
     65<varlistentry>
     66<term><parameter>--enable-add-ons</parameter></term>
     67<listitem><para>This tells Glibc to use the NPTL add-on as its threading
     68library.</para></listitem>
     69</varlistentry>
     70
     71<varlistentry>
     72<term><parameter>--enable-kernel=2.6.0</parameter></term>
     73<listitem><para>This tells Glibc to compile the library with support
     74for 2.6.x Linux kernels.</para></listitem>
     75</varlistentry>
     76
     77<varlistentry>
     78<term><parameter>--with-binutils=/tools/bin</parameter></term>
     79<listitem><para>While not required, this switch ensures that there are
     80no errors pertaining to which Binutils programs get used during the
     81Glibc build.</para></listitem>
     82</varlistentry>
     83
     84<varlistentry>
     85<term><parameter>--without-gd</parameter></term>
     86<listitem><para>This prevents the build of the
     87<command>memusagestat</command> program, which insists on linking
     88against the host's libraries (libgd, libpng, libz,
     89etc.).</para></listitem>
     90</varlistentry>
     91
     92<varlistentry>
     93<term><parameter>--without-cvs</parameter></term>
     94<listitem><para>This prevents the Makefile files from
     95attempting automatic CVS checkouts when using a CVS snapshot. While
     96this command is not required, it is recommended because it suppresses
     97an annoying, but harmless, warning about a missing autoconf
     98program.</para></listitem>
     99</varlistentry>
     100
     101<varlistentry>
     102<term><parameter>--with-headers=/tools/include</parameter></term>
     103<listitem><para>This tells Glibc to compile itself against the headers recently
     104installed to the tools directory, so that it knows exactly what features the
     105kernel has and can optimize itself accordingly.</para></listitem>
     106</varlistentry>
     107
     108<!-- Edit Me -->
     109<varlistentry>
     110<term><parameter>--disable-selinux</parameter></term>
     111<listitem><para>When building from hosts using SELinux functionality
     112(i.e. Fedora Core 3), glibc will try to integrate this functionality into
     113itself, but will fail, because we do not have this functionality in the LFS
     114tools enviornment.  This option will disable this, allowing glibc to build
     115correctly, but will not otherwise affect the build.</para></listitem>
     116</varlistentry>
     117<!-- -->
     118</variablelist>
     119
     120<para>During this stage the following warning might appear:</para>
     121
     122<blockquote><screen><computeroutput>configure: WARNING:
     123*** These auxiliary programs are missing or
     124*** incompatible versions: msgfmt
     125*** some features will be disabled.
     126*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
     127
     128<para>The missing or incompatible <command>msgfmt</command> program is
     129generally harmless, but it can sometimes cause issues when running the
     130test suite. This <command>msgfmt</command> program is part of the
     131Gettext package which the host distribution should provide. If
     132<command>msgfmt</command> is present but deemed incompatible, upgrade
     133the host system's Gettext package or continue without it and see if
     134the test suite runs without problems regardless.</para>
     135
    36136<para>Compile the package:</para>
    37137
    38138<screen><userinput>make</userinput></screen>
    39139
    40 <para>Test the results:</para>
     140<para>Compilation is now complete. As mentioned earlier, running the
     141test suites for the temporary tools installed in this chapter is not
     142mandatory. To run the Glibc test suite (if desired), the following
     143command will do so:</para>
    41144
    42145<screen><userinput>make check</userinput></screen>
    43146
    44147<para>For a discussion of test failures that are of particular
    45 importance, please see <xref linkend="ch-system-glibc"/>.</para>
     148importance, please see <xref linkend="ch-system-glibc" role="."/></para>
     149
     150<para>In this chapter, some tests can be adversely effected by
     151existing tools or environmental issues on the host system. Glibc test
     152suite failures in this chapter are typically not worrisome. The Glibc
     153installed in <xref linkend="chapter-building-system"/> is the one that
     154will ultimately end up being used, so that is the one that needs to pass
     155most tests (even in <xref linkend="chapter-building-system"/>, some
     156failures could still occur, for example, with the math tests).</para>
     157
     158<para>When experiencing a failure, make a note of it, then continue by
     159reissuing the <command>make check</command> command. The test suite should pick up where it left
     160off and continue. This stop-start sequence can be circumvented by
     161issuing a <command>make -k check</command> command. If using this option, be sure to log the
     162output so that the log file can be examined for failures later.</para>
     163
     164<para>The install stage of Glibc will issue a harmless warning at the
     165end about the absence of <filename>/tools/etc/ld.so.conf</filename>.
     166Prevent this warning with:</para>
    46167
    47168<screen><userinput>mkdir /tools/etc
    48169touch /tools/etc/ld.so.conf</userinput></screen>
    49170
    50 <para>Now install the package:</para>
     171<para>Install the package:</para>
    51172
    52173<screen><userinput>make install</userinput></screen>
    53174
    54 <para>To install the Glibc locales, use the following
     175<para>Different countries and cultures have varying conventions for
     176how to communicate. These conventions range from the format for
     177representing dates and times to more complex issues, such as the
     178language spoken. The <quote>internationalization</quote> of GNU
     179programs works by locale.</para>
     180
     181<note><para>If the test suites are not being run in this chapter (as
     182per the recommendation), there is no need to install the locales now.
     183The appropriate locales will be installed in the next
     184chapter.</para></note>
     185
     186<para>To install the Glibc locales anyway, use the following
    55187command:</para>
    56188
    57189<screen><userinput>make localedata/install-locales</userinput></screen>
    58190
    59 <para>An alternative to running the previous command is to install only those
    60 locales which you need or want. The following instructions, instead of the
    61 install-locales target above, will install the minimum set of locales necessary
     191<para>To save time, an alternative to running the
     192previous command (which generates and installs every locale Glibc is
     193aware of) is to install only those locales that are wanted and needed.
     194This can be achieved by using the <command>localedef</command>
     195command. Information on this command is located in the
     196<filename>INSTALL</filename> file in the Glibc source.  However, there
     197are a number of locales that are essential in order for the tests of
     198future packages to pass, in particular, the
     199<emphasis>libstdc++</emphasis> tests from GCC. The following
     200instructions, instead of the <parameter>install-locales</parameter>
     201target used above, will install the minimum set of locales necessary
    62202for the tests to run successfully:</para>
    63203
     
    77217</sect2>
    78218
     219<sect2 role="content"><title/>
     220<para>Details on this package are located in <xref
     221linkend="contents-glibc" role="."/></para>
     222</sect2>
     223
    79224</sect1>
     225
Note: See TracChangeset for help on using the changeset viewer.