source: chapter05/glibc.xml@ 8bfbf40

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 8bfbf40 was 8bfbf40, checked in by Dan Nichilson <dnicholson@…>, 17 years ago

Apply the branch update patch to the temp Glibc, too

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

  • Property mode set to 100644
File size: 7.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/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>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
45 <para>The Glibc documentation recommends building Glibc outside of the source
46 directory in a dedicated build directory:</para>
47
48<screen><userinput>mkdir -v ../glibc-build
49cd ../glibc-build</userinput></screen>
50
51 <para>Next, prepare Glibc for compilation:</para>
52
53<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
54 --disable-profile --enable-add-ons \
55 --enable-kernel=2.6.0 --with-binutils=/tools/bin \
56 --without-gd --with-headers=/tools/include \
57 --without-selinux</userinput></screen>
58
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
130*** incompatible versions: msgfmt
131*** some features will be disabled.
132*** Check the INSTALL file for required versions.</computeroutput></screen>
133 </blockquote>
134
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>
142
143 <para>Compile the package:</para>
144
145<screen><userinput>make</userinput></screen>
146
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>
151
152<screen><userinput>make check</userinput></screen>
153
154 <para>For a discussion of test failures that are of particular
155 importance, please see <xref linkend="ch-system-glibc" role="."/></para>
156
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>
164
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>
171
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>
175
176<screen><userinput>mkdir -v /tools/etc
177touch /tools/etc/ld.so.conf</userinput></screen>
178
179 <para>Install the package:</para>
180
181<screen><userinput>make install</userinput></screen>
182
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>
188
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>
196
197 </sect2>
198
199 <sect2 role="content">
200 <title/>
201
202 <para>Details on this package are located in
203 <xref linkend="contents-glibc" role="."/></para>
204
205 </sect2>
206
207</sect1>
Note: See TracBrowser for help on using the repository browser.