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