[519ee45] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-tools-glibc" role="wrap">
|
---|
| 9 | <?dbhtml filename="glibc.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Glibc-&glibc-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-tools-glibc">
|
---|
| 14 | <primary sortas="a-Glibc">Glibc</primary>
|
---|
| 15 | <secondary>tools</secondary>
|
---|
| 16 | </indexterm>
|
---|
| 17 |
|
---|
| 18 | <sect2 role="package">
|
---|
| 19 | <title/>
|
---|
| 20 |
|
---|
| 21 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 22 | href="../chapter06/glibc.xml"
|
---|
| 23 | xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
---|
| 24 |
|
---|
| 25 | <segmentedlist>
|
---|
| 26 | <segtitle>&buildtime;</segtitle>
|
---|
| 27 | <segtitle>&diskspace;</segtitle>
|
---|
| 28 |
|
---|
| 29 | <seglistitem>
|
---|
| 30 | <seg>&glibc-ch5-sbu;</seg>
|
---|
| 31 | <seg>&glibc-ch5-du;</seg>
|
---|
| 32 | </seglistitem>
|
---|
| 33 | </segmentedlist>
|
---|
| 34 |
|
---|
| 35 | </sect2>
|
---|
| 36 |
|
---|
| 37 | <sect2 role="installation">
|
---|
| 38 | <title>Installation of Glibc</title>
|
---|
| 39 |
|
---|
| 40 | <para>The Glibc documentation recommends building Glibc outside of the source
|
---|
| 41 | directory in a dedicated build directory:</para>
|
---|
| 42 |
|
---|
| 43 | <screen><userinput>mkdir -v ../glibc-build
|
---|
| 44 | cd ../glibc-build</userinput></screen>
|
---|
| 45 |
|
---|
| 46 | <para>Next, prepare Glibc for compilation:</para>
|
---|
| 47 |
|
---|
| 48 | <screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
|
---|
| 49 | --disable-profile --enable-add-ons \
|
---|
| 50 | --enable-kernel=2.6.0 --with-binutils=/tools/bin \
|
---|
| 51 | --without-gd --with-headers=/tools/include \
|
---|
| 52 | --without-selinux</userinput></screen>
|
---|
| 53 |
|
---|
| 54 | <variablelist>
|
---|
| 55 | <title>The meaning of the configure options:</title>
|
---|
| 56 |
|
---|
| 57 | <varlistentry>
|
---|
| 58 | <term><parameter>--disable-profile</parameter></term>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>This builds the libraries without profiling information. Omit
|
---|
| 61 | this option if profiling on the temporary tools is necessary.</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | </varlistentry>
|
---|
| 64 |
|
---|
| 65 | <varlistentry>
|
---|
| 66 | <term><parameter>--enable-add-ons</parameter></term>
|
---|
| 67 | <listitem>
|
---|
| 68 | <para>This tells Glibc to use the NPTL add-on as its threading
|
---|
| 69 | library.</para>
|
---|
| 70 | </listitem>
|
---|
| 71 | </varlistentry>
|
---|
| 72 |
|
---|
| 73 | <varlistentry>
|
---|
| 74 | <term><parameter>--enable-kernel=2.6.0</parameter></term>
|
---|
| 75 | <listitem>
|
---|
| 76 | <para>This tells Glibc to compile the library with support
|
---|
| 77 | for 2.6.x Linux kernels.</para>
|
---|
| 78 | </listitem>
|
---|
| 79 | </varlistentry>
|
---|
| 80 |
|
---|
| 81 | <varlistentry>
|
---|
| 82 | <term><parameter>--with-binutils=/tools/bin</parameter></term>
|
---|
| 83 | <listitem>
|
---|
| 84 | <para>While not required, this switch ensures that there are
|
---|
| 85 | no errors pertaining to which Binutils programs get used during the
|
---|
| 86 | Glibc build.</para>
|
---|
| 87 | </listitem>
|
---|
| 88 | </varlistentry>
|
---|
| 89 |
|
---|
| 90 | <varlistentry>
|
---|
| 91 | <term><parameter>--without-gd</parameter></term>
|
---|
| 92 | <listitem>
|
---|
| 93 | <para>This prevents the build of the <command>memusagestat</command>
|
---|
| 94 | program, which insists on linking against the host's libraries
|
---|
| 95 | (libgd, libpng, libz, etc.).</para>
|
---|
| 96 | </listitem>
|
---|
| 97 | </varlistentry>
|
---|
| 98 |
|
---|
| 99 | <varlistentry>
|
---|
| 100 | <term><parameter>--with-headers=/tools/include</parameter></term>
|
---|
| 101 | <listitem>
|
---|
| 102 | <para>This tells Glibc to compile itself against the headers recently
|
---|
| 103 | installed to the tools directory, so that it knows exactly what
|
---|
| 104 | features the kernel has and can optimize itself accordingly.</para>
|
---|
| 105 | </listitem>
|
---|
| 106 | </varlistentry>
|
---|
| 107 |
|
---|
| 108 | <varlistentry>
|
---|
| 109 | <term><parameter>--without-selinux</parameter></term>
|
---|
| 110 | <listitem>
|
---|
| 111 | <para>When building from hosts that include SELinux functionality
|
---|
| 112 | (e.g., Fedora Core 3), Glibc will build with support for SELinux.
|
---|
| 113 | As the LFS tools environment does not contain support for SELinux, a
|
---|
| 114 | Glibc compiled with such support will fail to operate correctly.</para>
|
---|
| 115 | </listitem>
|
---|
| 116 | </varlistentry>
|
---|
| 117 |
|
---|
| 118 | </variablelist>
|
---|
| 119 |
|
---|
| 120 | <para>During this stage the following warning might appear:</para>
|
---|
| 121 |
|
---|
| 122 | <blockquote>
|
---|
| 123 | <screen><computeroutput>configure: WARNING:
|
---|
| 124 | *** These auxiliary programs are missing or
|
---|
| 125 | *** incompatible versions: msgfmt
|
---|
| 126 | *** some features will be disabled.
|
---|
| 127 | *** Check the INSTALL file for required versions.</computeroutput></screen>
|
---|
| 128 | </blockquote>
|
---|
| 129 |
|
---|
| 130 | <para>The missing or incompatible <command>msgfmt</command> program is
|
---|
| 131 | generally harmless, but it can sometimes cause issues when running the
|
---|
| 132 | test suite. This <command>msgfmt</command> program is part of the
|
---|
| 133 | Gettext package which the host distribution should provide. If
|
---|
| 134 | <command>msgfmt</command> is present but deemed incompatible, upgrade
|
---|
| 135 | the host system's Gettext package or continue without it and see if
|
---|
| 136 | the test suite runs without problems regardless.</para>
|
---|
| 137 |
|
---|
| 138 | <para>Compile the package:</para>
|
---|
| 139 |
|
---|
| 140 | <screen><userinput>make</userinput></screen>
|
---|
| 141 |
|
---|
| 142 | <para>Compilation is now complete. As mentioned earlier, running the
|
---|
| 143 | test suites for the temporary tools installed in this chapter is not
|
---|
| 144 | mandatory. To run the Glibc test suite (if desired), the following
|
---|
| 145 | command will do so:</para>
|
---|
| 146 |
|
---|
| 147 | <screen><userinput>make check</userinput></screen>
|
---|
| 148 |
|
---|
| 149 | <para>For a discussion of test failures that are of particular
|
---|
| 150 | importance, please see <xref linkend="ch-system-glibc" role="."/></para>
|
---|
| 151 |
|
---|
| 152 | <para>In this chapter, some tests can be adversely affected by
|
---|
| 153 | existing tools or environmental issues on the host system. Glibc test
|
---|
| 154 | suite failures in this chapter are typically not worrisome. The Glibc
|
---|
| 155 | installed in <xref linkend="chapter-building-system"/> is the one that
|
---|
| 156 | will ultimately end up being used, so that is the one that needs to pass
|
---|
| 157 | most tests (even in <xref linkend="chapter-building-system"/>, some
|
---|
| 158 | failures could still occur, for example, with the math tests).</para>
|
---|
| 159 |
|
---|
| 160 | <para>When experiencing a failure, make a note of it, then continue by
|
---|
| 161 | reissuing the <command>make check</command> command. The test suite
|
---|
| 162 | should pick up where it left off and continue. This stop-start sequence
|
---|
| 163 | can be circumvented by issuing a <command>make -k check</command> command.
|
---|
| 164 | If using this option, be sure to log the output so that the log file can
|
---|
| 165 | be examined for failures later.</para>
|
---|
| 166 |
|
---|
| 167 | <para>The install stage of Glibc will issue a harmless warning at the
|
---|
| 168 | end about the absence of <filename>/tools/etc/ld.so.conf</filename>.
|
---|
| 169 | Prevent this warning with:</para>
|
---|
| 170 |
|
---|
| 171 | <screen><userinput>mkdir -v /tools/etc
|
---|
| 172 | touch /tools/etc/ld.so.conf</userinput></screen>
|
---|
| 173 |
|
---|
| 174 | <para>Install the package:</para>
|
---|
| 175 |
|
---|
| 176 | <screen><userinput>make install</userinput></screen>
|
---|
| 177 |
|
---|
| 178 | <para>Different countries and cultures have varying conventions for
|
---|
| 179 | how to communicate. These conventions range from the format for
|
---|
| 180 | representing dates and times to more complex issues, such as the
|
---|
| 181 | language spoken. The <quote>internationalization</quote> of GNU
|
---|
| 182 | programs works by locale.</para>
|
---|
| 183 |
|
---|
| 184 | <note>
|
---|
| 185 | <para>If the test suites are not being run in this chapter (as per
|
---|
| 186 | the recommendation), there is no need to install the locales now.
|
---|
| 187 | The appropriate locales will be installed in the next chapter.
|
---|
| 188 | To install the Glibc locales anyway, use instructions from
|
---|
| 189 | <xref linkend="ch-system-glibc" role="."/></para>
|
---|
| 190 | </note>
|
---|
| 191 |
|
---|
| 192 | </sect2>
|
---|
| 193 |
|
---|
| 194 | <sect2 role="content">
|
---|
| 195 | <title/>
|
---|
| 196 |
|
---|
| 197 | <para>Details on this package are located in
|
---|
| 198 | <xref linkend="contents-glibc" role="."/></para>
|
---|
| 199 |
|
---|
| 200 | </sect2>
|
---|
| 201 |
|
---|
| 202 | </sect1>
|
---|