2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-01-20 21:02:23 +00:00
|
|
|
|
2004-05-16 01:06:08 +01:00
|
|
|
<sect1 id="ch-tools-glibc" role="wrap">
|
2006-01-20 21:02:23 +00:00
|
|
|
<?dbhtml filename="glibc.html"?>
|
|
|
|
|
2007-09-07 20:16:43 +01:00
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>glibc</productname>
|
|
|
|
<productnumber>&glibc-version;</productnumber>
|
|
|
|
<address>&glibc-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<title>Glibc-&glibc-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="ch-tools-glibc">
|
|
|
|
<primary sortas="a-Glibc">Glibc</primary>
|
|
|
|
<secondary>tools</secondary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
|
|
|
href="../chapter06/glibc.xml"
|
|
|
|
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<seglistitem>
|
2006-05-14 21:16:56 +01:00
|
|
|
<seg>&glibc-ch5-sbu;</seg>
|
|
|
|
<seg>&glibc-ch5-du;</seg>
|
2006-01-20 21:02:23 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
</sect2>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Glibc</title>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2008-10-05 17:11:41 +01:00
|
|
|
<para>Though not mandatory in this chapter, if you plan on running the test
|
|
|
|
suite, you should apply the following patches:</para>
|
|
|
|
|
2008-10-09 19:35:09 +01:00
|
|
|
<screen><userinput remap="pre">patch -Np1 -i &glibc-iconv-test-fixes-patch;
|
2008-10-05 17:11:41 +01:00
|
|
|
patch -Np1 -i &glibc-ildoubl-test-fix-patch;</userinput></screen>
|
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>The Glibc documentation recommends building Glibc outside of the source
|
|
|
|
directory in a dedicated build directory:</para>
|
2004-12-22 12:06:22 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="pre">mkdir -v ../glibc-build
|
2003-11-01 22:31:50 +00:00
|
|
|
cd ../glibc-build</userinput></screen>
|
|
|
|
|
2007-09-16 01:21:26 +01:00
|
|
|
<para>Because Glibc no longer supports i386, its developers say to use the
|
|
|
|
compiler flag <parameter>-march=i486</parameter> when building it for x86
|
|
|
|
machines. There are several ways to accomplish that, but testing shows that
|
|
|
|
the flag is best placed inside the build variable <quote>CFLAGS</quote>.
|
|
|
|
Instead of overriding completely what Glibc's internal build system uses
|
|
|
|
for CFLAGS, append the new flag to the existing contents of CFLAGS by
|
2008-04-23 19:33:53 +01:00
|
|
|
making use of the special file <filename>configparms</filename>. The
|
|
|
|
-mtune=native flag is also necessary to reset a reasonable value for -mtune
|
|
|
|
that is changed when setting -march.</para>
|
2007-09-16 01:21:26 +01:00
|
|
|
|
2008-04-23 19:33:53 +01:00
|
|
|
<screen><userinput remap="configure">echo "CFLAGS += -march=i486 -mtune=native" > configparms</userinput></screen>
|
2007-09-16 01:21:26 +01:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>Next, prepare Glibc for compilation:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="configure">../glibc-&glibc-version;/configure --prefix=/tools \
|
2005-12-26 19:46:12 +00:00
|
|
|
--disable-profile --enable-add-ons \
|
2004-08-31 08:11:33 +01:00
|
|
|
--enable-kernel=2.6.0 --with-binutils=/tools/bin \
|
2005-03-03 14:25:19 +00:00
|
|
|
--without-gd --with-headers=/tools/include \
|
2005-02-19 22:41:37 +00:00
|
|
|
--without-selinux</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the configure options:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--disable-profile</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This builds the libraries without profiling information. Omit
|
|
|
|
this option if profiling on the temporary tools is necessary.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--enable-add-ons</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This tells Glibc to use the NPTL add-on as its threading
|
|
|
|
library.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--enable-kernel=2.6.0</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This tells Glibc to compile the library with support
|
|
|
|
for 2.6.x Linux kernels.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-binutils=/tools/bin</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>While not required, this switch ensures that there are
|
|
|
|
no errors pertaining to which Binutils programs get used during the
|
|
|
|
Glibc build.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--without-gd</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This prevents the build of the <command>memusagestat</command>
|
|
|
|
program, which insists on linking against the host's libraries
|
|
|
|
(libgd, libpng, libz, etc.).</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-headers=/tools/include</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This tells Glibc to compile itself against the headers recently
|
|
|
|
installed to the tools directory, so that it knows exactly what
|
|
|
|
features the kernel has and can optimize itself accordingly.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--without-selinux</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>When building from hosts that include SELinux functionality
|
|
|
|
(e.g., Fedora Core 3), Glibc will build with support for SELinux.
|
|
|
|
As the LFS tools environment does not contain support for SELinux, a
|
|
|
|
Glibc compiled with such support will fail to operate correctly.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>During this stage the following warning might appear:</para>
|
|
|
|
|
|
|
|
<blockquote>
|
|
|
|
<screen><computeroutput>configure: WARNING:
|
|
|
|
*** These auxiliary programs are missing or
|
2005-02-19 22:16:42 +00:00
|
|
|
*** incompatible versions: msgfmt
|
|
|
|
*** some features will be disabled.
|
2006-01-20 21:02:23 +00:00
|
|
|
*** Check the INSTALL file for required versions.</computeroutput></screen>
|
|
|
|
</blockquote>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>The missing or incompatible <command>msgfmt</command> program is
|
|
|
|
generally harmless, but it can sometimes cause issues when running the
|
|
|
|
test suite. This <command>msgfmt</command> program is part of the
|
|
|
|
Gettext package which the host distribution should provide. If
|
|
|
|
<command>msgfmt</command> is present but deemed incompatible, upgrade
|
|
|
|
the host system's Gettext package or continue without it and see if
|
|
|
|
the test suite runs without problems regardless.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>Compile the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>Compilation is now complete. As mentioned earlier, running the
|
|
|
|
test suites for the temporary tools installed in this chapter is not
|
|
|
|
mandatory. To run the Glibc test suite (if desired), the following
|
2008-10-09 19:45:51 +01:00
|
|
|
commands will do so:</para>
|
2004-12-22 12:06:22 +00:00
|
|
|
|
2008-10-09 19:45:51 +01:00
|
|
|
<screen><userinput remap="test">cp -v ../glibc-&glibc-version;/iconvdata/gconv-modules iconvdata
|
|
|
|
make check</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>For a discussion of test failures that are of particular
|
|
|
|
importance, please see <xref linkend="ch-system-glibc" role="."/></para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>In this chapter, some tests can be adversely affected by
|
|
|
|
existing tools or environmental issues on the host system. Glibc test
|
|
|
|
suite failures in this chapter are typically not worrisome. The Glibc
|
|
|
|
installed in <xref linkend="chapter-building-system"/> is the one that
|
|
|
|
will ultimately end up being used, so that is the one that needs to pass
|
|
|
|
most tests (even in <xref linkend="chapter-building-system"/>, some
|
|
|
|
failures could still occur, for example, with the math tests).</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>When experiencing a failure, make a note of it, then continue by
|
|
|
|
reissuing the <command>make check</command> command. The test suite
|
|
|
|
should pick up where it left off and continue. This stop-start sequence
|
|
|
|
can be circumvented by issuing a <command>make -k check</command> command.
|
|
|
|
If using this option, be sure to log the output so that the log file can
|
|
|
|
be examined for failures later.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>The install stage of Glibc will issue a harmless warning at the
|
|
|
|
end about the absence of <filename>/tools/etc/ld.so.conf</filename>.
|
|
|
|
Prevent this warning with:</para>
|
2004-06-27 15:55:19 +01:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="install">mkdir -v /tools/etc
|
2003-12-12 23:41:37 +00:00
|
|
|
touch /tools/etc/ld.so.conf</userinput></screen>
|
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>Install the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="install">make install</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>Different countries and cultures have varying conventions for
|
|
|
|
how to communicate. These conventions range from the format for
|
|
|
|
representing dates and times to more complex issues, such as the
|
|
|
|
language spoken. The <quote>internationalization</quote> of GNU
|
|
|
|
programs works by locale.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<note>
|
|
|
|
<para>If the test suites are not being run in this chapter (as per
|
|
|
|
the recommendation), there is no need to install the locales now.
|
|
|
|
The appropriate locales will be installed in the next chapter.
|
|
|
|
To install the Glibc locales anyway, use instructions from
|
|
|
|
<xref linkend="ch-system-glibc" role="."/></para>
|
|
|
|
</note>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
</sect2>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<sect2 role="content">
|
|
|
|
<title/>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
<para>Details on this package are located in
|
|
|
|
<xref linkend="contents-glibc" role="."/></para>
|
|
|
|
|
|
|
|
</sect2>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-20 21:02:23 +00:00
|
|
|
</sect1>
|