source: chapter05/glibc.xml@ 9c9d585

Last change on this file since 9c9d585 was 1375d26, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • (chapter05/*.xml) RELAX NG validation fixes

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

  • Property mode set to 100644
File size: 8.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE section [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<section xmlns="http://docbook.org/docbook-ng"
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xml:id="ch-tools-glibc" role="wrap">
9<title>Glibc-&glibc-version;</title>
10<?dbhtml filename="glibc.html"?>
11
12<indexterm zone="ch-tools-glibc">
13<primary sortas="a-Glibc">Glibc</primary>
14<secondary>tools</secondary></indexterm>
15
16<section role="package"><title/>
17<xi:include href="../chapter06/glibc.xml" xpointer="xpointer(/*[1]/*[3]/*[2])"/>
18
19<segmentedlist>
20<segtitle>&buildtime;</segtitle>
21<segtitle>&diskspace;</segtitle>
22<seglistitem><seg>11.8 SBU</seg><seg>800 MB</seg></seglistitem>
23</segmentedlist>
24
25<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/*[1]/*[3]/*[4])"/>
26
27</section>
28
29<section role="installation">
30<title>Installation of Glibc</title>
31
32<para>This package is known to behave badly when you change its default
33optimization flags (including the <parameter>-march</parameter> and
34<parameter>-mcpu</parameter> options). Therefore, if you have defined any
35environment variables that override default optimizations, such as CFLAGS and
36CXXFLAGS, we recommend un-setting them when building Glibc.</para>
37
38<para>Basically, compiling Glibc in any other way than the book suggests
39is putting the stability of your system at risk.</para>
40
41<para>The Glibc documentation recommends building Glibc outside of the source
42directory in a dedicated build directory:</para>
43
44<screen><userinput>mkdir ../glibc-build
45cd ../glibc-build</userinput></screen>
46
47<para>Next, prepare Glibc for compilation:</para>
48
49<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
50 --disable-profile --enable-add-ons \
51 --enable-kernel=2.6.0 --with-binutils=/tools/bin \
52 --without-gd --without-cvs --with-headers=/tools/include</userinput></screen>
53
54<para>The meaning of the configure options:</para>
55
56<variablelist>
57<varlistentry>
58<term><parameter>--disable-profile</parameter></term>
59<listitem><para>This builds the
60libraries without profiling information. Omit this option if you plan to do
61profiling on the temporary tools.</para></listitem>
62</varlistentry>
63
64<varlistentry>
65<term><parameter>--enable-add-ons</parameter></term>
66<listitem><para>This tells Glibc to use the add-on' that it can use like NPTL
67as its threading library.</para></listitem>
68</varlistentry>
69
70<varlistentry>
71<term><parameter>--enable-kernel=2.6.0</parameter></term>
72<listitem><para>This tells Glibc to compile the library for support of
73linux 2.6.x kernels.
74</para></listitem>
75</varlistentry>
76
77<varlistentry>
78<term><parameter>--with-binutils=/tools/bin</parameter></term>
79<listitem><para>Strictly speaking this switch is not required. But it does ensure
80nothing can go wrong with regard to what 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 <command>memusagestat</command>
87program, which strangely enough insists on linking against the host's libraries
88(libgd, libpng, libz, and so forth). </para></listitem>
89</varlistentry>
90
91<varlistentry>
92<term><parameter>--without-cvs</parameter></term>
93<listitem><para>This is meant to prevent
94the Makefiles from attempting automatic CVS checkouts when using a CVS
95snapshot. But it's not actually needed these days. We use it because it
96suppresses an annoying but harmless warning about a missing
97<command>autoconf</command> program.</para></listitem>
98</varlistentry>
99
100<varlistentry>
101<term><parameter>--with-headers=/tools/include</parameter></term>
102<listitem><para>This forces glibc to use the linux-libc-headers installed
103in /tools/include, rather than those on the host, which may be too old to
104support needed functionality.</para></listitem>
105</varlistentry>
106
107</variablelist>
108
109<para>During this stage you might see the following warning:</para>
110
111<blockquote><screen><computeroutput>configure: WARNING:
112*** These auxiliary programs are missing or incompatible versions: msgfmt
113*** some features will be disabled.
114*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
115
116<para>The missing or incompatible <command>msgfmt</command> program is
117generally harmless, but it's believed it can sometimes cause problems when
118running the test suite.</para>
119
120<para>Compile the package:</para>
121
122<screen><userinput>make</userinput></screen>
123
124<para>Compilation is now complete. As mentioned earlier, running the test suites
125for the temporary tools installed in this chapter is not mandatory. If you want
126to run the Glibc test suite though, the following command will do so:</para>
127
128<screen><userinput>make check</userinput></screen>
129
130<para>For a discussion of test failures that are of particular
131importance, please see <xref linkend="ch-system-glibc"/>.</para>
132
133<para>In this chapter, some tests can be adversely affected by existing tools or
134environmental issues on the host system. In short, don't worry too much if you
135see Glibc test suite failures in this chapter. The Glibc in
136<xref linkend="chapter-building-system"/> is the one we'll ultimately end up
137using, so that is the one we would really like to see pass the tests (but even
138there some failures could still occur -- the <emphasis>math</emphasis> tests,
139for example).</para>
140
141<para>When experiencing a failure, make a note of it, then continue by reissuing
142the <command>make check</command>. The test suite should pick up where it left
143off and continue. You can circumvent this stop-start sequence by issuing a
144<command>make -k check</command>. If you do that though, be sure to log the
145output so that you can later peruse the log file and examine the total number of
146failures.</para>
147
148<para>Though it is a harmless message, the install stage of Glibc will at the
149end complain about the absence of <filename>/tools/etc/ld.so.conf</filename>.
150Prevent this confusing little warning with:</para>
151
152<screen><userinput>mkdir /tools/etc
153touch /tools/etc/ld.so.conf</userinput></screen>
154
155<para>Now install the package:</para>
156
157<screen><userinput>make install</userinput></screen>
158
159<para>Different countries and cultures have varying conventions for how to
160communicate. These conventions range from very simple ones, such as the format
161for representing dates and times, to very complex ones, such as the language
162spoken. The <quote>internationalization</quote> of GNU programs works by means
163of <emphasis>locales</emphasis>.</para>
164
165<note><para>If you are not running the test suites here in this chapter as per
166our recommendation, there is little point in installing the locales now. We'll
167be installing the locales in the next chapter.</para></note>
168
169<para>If you still want to install the Glibc locales anyway, the following
170command will do so:</para>
171
172<screen><userinput>make localedata/install-locales</userinput></screen>
173
174<para>An alternative to running the previous command is to install only those
175locales which you need or want. This can be achieved by using the
176<command>localedef</command> command. Information on this can be found in
177the <filename>INSTALL</filename> file in the Glibc source. However, there are
178a number of locales that are essential for the tests of future packages to
179pass, in particular, the <emphasis>libstdc++</emphasis> tests from GCC. The
180following instructions, instead of the install-locales target above, will
181install the minimum set of locales necessary for the tests to run
182successfully:</para>
183
184<screen><userinput>mkdir -p /tools/lib/locale
185localedef -i de_DE -f ISO-8859-1 de_DE
186localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
187localedef -i en_HK -f ISO-8859-1 en_HK
188localedef -i en_PH -f ISO-8859-1 en_PH
189localedef -i en_US -f ISO-8859-1 en_US
190localedef -i es_MX -f ISO-8859-1 es_MX
191localedef -i fa_IR -f UTF-8 fa_IR
192localedef -i fr_FR -f ISO-8859-1 fr_FR
193localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
194localedef -i it_IT -f ISO-8859-1 it_IT
195localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
196
197</section>
198
199<section role="content"><title/>
200<para>The details on this package are found in <xref linkend="contents-glibc"/>.</para>
201</section>
202
203</section>
Note: See TracBrowser for help on using the repository browser.