source: chapter05/glibc.xml@ 2889cb5

Last change on this file since 2889cb5 was c9214d5, checked in by Jeremy Utley <jeremy@…>, 20 years ago

Massive package updates - see changelog for details - first update to Testing since 6.0 went to publishers

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

  • Property mode set to 100644
File size: 8.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-tools-glibc" role="wrap">
7<title>Glibc-&glibc-version;</title>
8<?dbhtml filename="glibc.html"?>
9
10<indexterm zone="ch-tools-glibc">
11<primary sortas="a-Glibc">Glibc</primary>
12<secondary>tools</secondary></indexterm>
13
14<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])"/>
16
17<segmentedlist>
18<segtitle>&buildtime;</segtitle>
19<segtitle>&diskspace;</segtitle>
20<seglistitem><seg>11.8 SBU</seg><seg>800 MB</seg></seglistitem>
21</segmentedlist>
22
23<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
24
25</sect2>
26
27<sect2 role="installation">
28<title>Installation of Glibc</title>
29
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>
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<beginpage/>
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</variablelist>
108
109<beginpage/>
110<para>During this stage the following warning might appear:</para>
111
112<blockquote><screen><computeroutput>configure: WARNING:
113*** These auxiliary programs are missing or
114*** incompatible versions: msgfmt
115*** some features will be disabled.
116*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
117
118<para>The missing or incompatible <command>msgfmt</command> program is
119generally harmless, but it can sometimes cause issues when running the
120test suite. This <command>msgfmt</command> program is part of the
121Gettext package which the host distribution should provide. If
122<command>msgfmt</command> is present but deemed incompatible, upgrade
123the host system's Gettext package or continue without it and see if
124the test suite runs without problems regardless.</para>
125
126<para>Compile the package:</para>
127
128<screen><userinput>make</userinput></screen>
129
130<para>Compilation is now complete. As mentioned earlier, running the
131test suites for the temporary tools installed in this chapter is not
132mandatory. To run the Glibc test suite (if desired), the following
133command will do so:</para>
134
135<screen><userinput>make check</userinput></screen>
136
137<para>For a discussion of test failures that are of particular
138importance, please see <xref linkend="ch-system-glibc" role="."/></para>
139
140<para>In this chapter, some tests can be adversely effected by
141existing tools or environmental issues on the host system. Glibc test
142suite failures in this chapter are typically not worrisome. The Glibc
143installed in <xref linkend="chapter-building-system"/> is the one that
144will ultimately end up being used, so that is the one that needs to pass
145most tests (even in <xref linkend="chapter-building-system"/>, some
146failures could still occur, for example, with the math tests).</para>
147
148<para>When experiencing a failure, make a note of it, then continue by
149reissuing the <command>make check</command> command. The test suite should pick up where it left
150off and continue. This stop-start sequence can be circumvented by
151issuing a <command>make -k check</command> command. If using this option, be sure to log the
152output so that the log file can be examined for failures later.</para>
153
154<beginpage/>
155<para>The install stage of Glibc will issue a harmless warning at the
156end about the absence of <filename>/tools/etc/ld.so.conf</filename>.
157Prevent this warning with:</para>
158
159<screen><userinput>mkdir /tools/etc
160touch /tools/etc/ld.so.conf</userinput></screen>
161
162<para>Install the package:</para>
163
164<screen><userinput>make install</userinput></screen>
165
166<para>Different countries and cultures have varying conventions for
167how to communicate. These conventions range from the format for
168representing dates and times to more complex issues, such as the
169language spoken. The <quote>internationalization</quote> of GNU
170programs works by locale.</para>
171
172<note><para>If the test suites are not being run in this chapter (as
173per the recommendation), there is no need to install the locales now.
174The appropriate locales will be installed in the next
175chapter.</para></note>
176
177<para>To install the Glibc locales anyway, use the following
178command:</para>
179
180<screen><userinput>make localedata/install-locales</userinput></screen>
181
182<beginpage/>
183<para>To save time, an alternative to running the
184previous command (which generates and installs every locale Glibc is
185aware of) is to install only those locales that are wanted and needed.
186This can be achieved by using the <command>localedef</command>
187command. Information on this command is located in the
188<filename>INSTALL</filename> file in the Glibc source. However, there
189are a number of locales that are essential in order for the tests of
190future packages to pass, in particular, the
191<emphasis>libstdc++</emphasis> tests from GCC. The following
192instructions, instead of the <parameter>install-locales</parameter>
193target used above, will install the minimum set of locales necessary
194for the tests to run successfully:</para>
195
196<screen><userinput>mkdir -p /tools/lib/locale
197localedef -i de_DE -f ISO-8859-1 de_DE
198localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
199localedef -i en_HK -f ISO-8859-1 en_HK
200localedef -i en_PH -f ISO-8859-1 en_PH
201localedef -i en_US -f ISO-8859-1 en_US
202localedef -i es_MX -f ISO-8859-1 es_MX
203localedef -i fa_IR -f UTF-8 fa_IR
204localedef -i fr_FR -f ISO-8859-1 fr_FR
205localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
206localedef -i it_IT -f ISO-8859-1 it_IT
207localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
208
209</sect2>
210
211<sect2 role="content"><title/>
212<para>Details on this package are located in <xref
213linkend="contents-glibc" role="."/></para>
214</sect2>
215
216</sect1>
217
Note: See TracBrowser for help on using the repository browser.