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-partitioning-hostreqs" xreflabel="Host System Requirements">
|
---|
9 | <?dbhtml filename="hostreqs.html"?>
|
---|
10 |
|
---|
11 | <title>Host System Requirements</title>
|
---|
12 |
|
---|
13 | <sect2>
|
---|
14 | <title>Hardware</title>
|
---|
15 |
|
---|
16 | <para>The LFS editors recommend that the system CPU have at least
|
---|
17 | four cores and that the system have at least 8 GB of memory.
|
---|
18 | Older systems that do not meet these requirements will still work,
|
---|
19 | but the time to build packages will be significantly longer
|
---|
20 | than documented.
|
---|
21 | </para>
|
---|
22 |
|
---|
23 | </sect2>
|
---|
24 |
|
---|
25 | <sect2>
|
---|
26 | <title>Software</title>
|
---|
27 |
|
---|
28 | <para>Your host system should have the following software with the
|
---|
29 | minimum versions indicated. This should not be an issue for most
|
---|
30 | modern Linux distributions. Also note that many distributions will
|
---|
31 | place software headers into separate packages, often in the form of
|
---|
32 | <quote><package-name>-devel</quote> or
|
---|
33 | <quote><package-name>-dev</quote>. Be sure to install those if
|
---|
34 | your distribution provides them.</para>
|
---|
35 |
|
---|
36 | <para>Earlier versions of the listed software packages may work, but have
|
---|
37 | not been tested.</para>
|
---|
38 |
|
---|
39 | <itemizedlist spacing="compact">
|
---|
40 |
|
---|
41 | <listitem>
|
---|
42 | <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
|
---|
43 | should be a symbolic or hard link to bash)</para>
|
---|
44 | </listitem>
|
---|
45 |
|
---|
46 | <listitem>
|
---|
47 | <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
|
---|
48 | greater than &binutils-version; are not recommended as they have
|
---|
49 | not been tested)</para>
|
---|
50 | </listitem>
|
---|
51 |
|
---|
52 | <listitem>
|
---|
53 | <para><emphasis role="strong">Bison-2.7</emphasis> (/usr/bin/yacc
|
---|
54 | should be a link to bison or a small script that executes bison)</para>
|
---|
55 | </listitem>
|
---|
56 |
|
---|
57 | <listitem>
|
---|
58 | <para><emphasis role="strong">Coreutils-7.0</emphasis></para>
|
---|
59 | </listitem>
|
---|
60 |
|
---|
61 | <listitem>
|
---|
62 | <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
|
---|
63 | </listitem>
|
---|
64 |
|
---|
65 | <listitem>
|
---|
66 | <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
|
---|
67 | </listitem>
|
---|
68 |
|
---|
69 | <listitem>
|
---|
70 | <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
|
---|
71 | should be a link to gawk)</para>
|
---|
72 | </listitem>
|
---|
73 |
|
---|
74 | <listitem>
|
---|
75 | <!-- Pass 1 GCC FTBFS with GCC-5.1 because of
|
---|
76 | https://gcc.gnu.org/PR65801. -->
|
---|
77 | <para><emphasis role="strong">GCC-5.2</emphasis> including the C++
|
---|
78 | compiler, <command>g++</command> (Versions greater than &gcc-version; are
|
---|
79 | not recommended as they have not been tested). C and C++ standard
|
---|
80 | libraries (with headers) must also be present so the C++ compiler can
|
---|
81 | build hosted programs</para>
|
---|
82 | </listitem>
|
---|
83 |
|
---|
84 | <listitem>
|
---|
85 | <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
|
---|
86 | </listitem>
|
---|
87 |
|
---|
88 | <listitem>
|
---|
89 | <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
|
---|
90 | </listitem>
|
---|
91 |
|
---|
92 | <listitem>
|
---|
93 | <para><emphasis role="strong">Linux Kernel-&min-kernel;</emphasis></para>
|
---|
94 |
|
---|
95 | <para>The reason for the kernel version requirement is that we specify
|
---|
96 | that version when building <application>glibc</application> in
|
---|
97 | <xref linkend="chapter-cross-tools"/> and
|
---|
98 | <xref linkend="chapter-building-system"/>, so the workarounds for
|
---|
99 | older kernels are not enabled and the compiled
|
---|
100 | <application>glibc</application> is slightly faster and smaller.
|
---|
101 | As at June 2023, &min-kernel; is the oldest kernel release still
|
---|
102 | supported by the kernel developers.</para>
|
---|
103 |
|
---|
104 | <para>If the host kernel is earlier than &min-kernel; you will need to replace
|
---|
105 | the kernel with a more up-to-date version. There are two ways
|
---|
106 | you can go about this. First, see if your Linux vendor provides a &min-kernel;
|
---|
107 | or later kernel package. If so, you may wish to install it. If your
|
---|
108 | vendor doesn't offer an acceptable kernel package, or you would prefer not to
|
---|
109 | install it, you can compile a kernel yourself. Instructions for
|
---|
110 | compiling the kernel and configuring the boot loader (assuming the host
|
---|
111 | uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
|
---|
112 |
|
---|
113 | <para>We require the host kernel to support UNIX 98 pseudo terminal
|
---|
114 | (PTY). It should be enabled on all desktop or server distros shipping
|
---|
115 | Linux &min-kernel; or a newer kernel. If you are building a custom
|
---|
116 | host kernel, ensure <option>CONFIG_UNIX98_PTYS</option> is set to
|
---|
117 | <literal>y</literal> in the kernel configuration.</para>
|
---|
118 |
|
---|
119 | </listitem>
|
---|
120 |
|
---|
121 | <listitem>
|
---|
122 | <para><emphasis role="strong">M4-1.4.10</emphasis></para>
|
---|
123 | </listitem>
|
---|
124 |
|
---|
125 | <listitem>
|
---|
126 | <para><emphasis role="strong">Make-4.0</emphasis></para>
|
---|
127 | </listitem>
|
---|
128 |
|
---|
129 | <listitem>
|
---|
130 | <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
|
---|
131 | </listitem>
|
---|
132 |
|
---|
133 | <listitem>
|
---|
134 | <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
|
---|
135 | </listitem>
|
---|
136 |
|
---|
137 | <listitem>
|
---|
138 | <para><emphasis role="strong">Python-3.4</emphasis></para>
|
---|
139 | </listitem>
|
---|
140 |
|
---|
141 | <listitem>
|
---|
142 | <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
|
---|
143 | </listitem>
|
---|
144 |
|
---|
145 | <listitem>
|
---|
146 | <para><emphasis role="strong">Tar-1.22</emphasis></para>
|
---|
147 | </listitem>
|
---|
148 |
|
---|
149 | <listitem>
|
---|
150 | <para><emphasis role="strong">Texinfo-5.0</emphasis></para>
|
---|
151 | </listitem>
|
---|
152 |
|
---|
153 | <listitem>
|
---|
154 | <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
|
---|
155 | </listitem>
|
---|
156 |
|
---|
157 | </itemizedlist>
|
---|
158 |
|
---|
159 | <important>
|
---|
160 | <para>Note that the symlinks mentioned above are required to build an LFS
|
---|
161 | system using the instructions contained within this book. Symlinks that
|
---|
162 | point to other software (such as dash, mawk, etc.) may work, but are not
|
---|
163 | tested or supported by the LFS development team, and may require either
|
---|
164 | deviation from the instructions or additional patches to some
|
---|
165 | packages.</para>
|
---|
166 | </important>
|
---|
167 |
|
---|
168 | <!-- Use an empty sect2 element to prevent a pdf warning. -->
|
---|
169 | <bridgehead renderas="sect2"
|
---|
170 | id="version-check"
|
---|
171 | xreflabel="Host System Requirements">
|
---|
172 | </bridgehead>
|
---|
173 | <!--<title> </title>-->
|
---|
174 |
|
---|
175 | <para >To see whether your host system has all the appropriate versions, and
|
---|
176 | the ability to compile programs, run the following commands:</para>
|
---|
177 |
|
---|
178 | <screen role="nodump"><?dbfo keep-together="auto"?><userinput>cat > version-check.sh << "EOF"
|
---|
179 | <literal>#!/bin/bash
|
---|
180 | # A script to list version numbers of critical development tools
|
---|
181 |
|
---|
182 | # If you have tools installed in other directories, adjust PATH here AND
|
---|
183 | # in ~lfs/.bashrc (section 4.4) as well.
|
---|
184 |
|
---|
185 | LC_ALL=C
|
---|
186 | PATH=/usr/bin:/bin
|
---|
187 |
|
---|
188 | bail() { echo "FATAL: $1"; exit 1; }
|
---|
189 | grep --version > /dev/null 2> /dev/null || bail "grep does not work"
|
---|
190 | sed '' /dev/null || bail "sed does not work"
|
---|
191 | sort /dev/null || bail "sort does not work"
|
---|
192 |
|
---|
193 | ver_check()
|
---|
194 | {
|
---|
195 | if ! type -p $2 &>/dev/null
|
---|
196 | then
|
---|
197 | echo "ERROR: Cannot find $2 ($1)"; return 1;
|
---|
198 | fi
|
---|
199 | v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
|
---|
200 | if printf '%s\n' $3 $v | sort --version-sort --check &>/dev/null
|
---|
201 | then
|
---|
202 | printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
|
---|
203 | else
|
---|
204 | printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
|
---|
205 | return 1;
|
---|
206 | fi
|
---|
207 | }
|
---|
208 |
|
---|
209 | ver_kernel()
|
---|
210 | {
|
---|
211 | kver=$(uname -r | grep -E -o '^[0-9\.]+')
|
---|
212 | if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null
|
---|
213 | then
|
---|
214 | printf "OK: Linux Kernel $kver >= $1\n"; return 0;
|
---|
215 | else
|
---|
216 | printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver";
|
---|
217 | return 1;
|
---|
218 | fi
|
---|
219 | }
|
---|
220 |
|
---|
221 | # Coreutils first because-sort needs Coreutils >= 7.0
|
---|
222 | ver_check Coreutils sort 7.0 || bail "--version-sort unsupported"
|
---|
223 | ver_check Bash bash 3.2
|
---|
224 | ver_check Binutils ld 2.13.1
|
---|
225 | ver_check Bison bison 2.7
|
---|
226 | ver_check Diffutils diff 2.8.1
|
---|
227 | ver_check Findutils find 4.2.31
|
---|
228 | ver_check Gawk gawk 4.0.1
|
---|
229 | ver_check GCC gcc 5.2
|
---|
230 | ver_check "GCC (C++)" g++ 5.2
|
---|
231 | ver_check Grep grep 2.5.1a
|
---|
232 | ver_check Gzip gzip 1.3.12
|
---|
233 | ver_check M4 m4 1.4.10
|
---|
234 | ver_check Make make 4.0
|
---|
235 | ver_check Patch patch 2.5.4
|
---|
236 | ver_check Perl perl 5.8.8
|
---|
237 | ver_check Python python3 3.4
|
---|
238 | ver_check Sed sed 4.1.5
|
---|
239 | ver_check Tar tar 1.22
|
---|
240 | ver_check Texinfo texi2any 5.0
|
---|
241 | ver_check Xz xz 5.0.0
|
---|
242 | ver_kernel &min-kernel;
|
---|
243 |
|
---|
244 | if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ]
|
---|
245 | then echo "OK: Linux Kernel supports UNIX 98 PTY";
|
---|
246 | else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi
|
---|
247 |
|
---|
248 | alias_check() {
|
---|
249 | if $1 --version 2>&1 | grep -qi $2
|
---|
250 | then printf "OK: %-4s is $2\n" "$1";
|
---|
251 | else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
|
---|
252 | }
|
---|
253 | echo "Aliases:"
|
---|
254 | alias_check awk GNU
|
---|
255 | alias_check yacc Bison
|
---|
256 | alias_check sh Bash
|
---|
257 |
|
---|
258 | echo "Compiler check:"
|
---|
259 | if printf "int main(){}" | g++ -x c++ -
|
---|
260 | then echo "OK: g++ works";
|
---|
261 | else echo "ERROR: g++ does NOT work"; fi
|
---|
262 | rm -f a.out</literal>
|
---|
263 | EOF
|
---|
264 |
|
---|
265 | bash version-check.sh</userinput></screen>
|
---|
266 |
|
---|
267 | <para arch="ml_32,ml_x32,ml_all">
|
---|
268 | Building multilib support requires the kernel of the host system
|
---|
269 | to have 32-bit emulation support included.
|
---|
270 | </para>
|
---|
271 | <screen arch="ml_32,ml_x32,ml_all">Binary Emulations --->
|
---|
272 | [*] IA32 Emulation
|
---|
273 | <M> IA32 a.out support
|
---|
274 | [*] x32 ABI for 64-bit mode
|
---|
275 | </screen>
|
---|
276 |
|
---|
277 | <para arch="ml_32,ml_x32,ml_all">The option 'IA32 a.out support' is
|
---|
278 | optional. In case your kernel does not have 'x32 ABI for 64-bit mode'
|
---|
279 | enabled but only 'IA32 Emulation', you can continue to build your
|
---|
280 | system but you have to leave out any sections showing instructions
|
---|
281 | for building x32 objects. If neither 'IA32 Emulation' nor
|
---|
282 | 'x32 ABI for 64-bit mode' is enabled, you will run in errors
|
---|
283 | latest when building <application>glibc</application> in Chapter 6,
|
---|
284 | so an upgrade of your host system kernel is required.
|
---|
285 | </para>
|
---|
286 |
|
---|
287 | </sect2>
|
---|
288 |
|
---|
289 | </sect1>
|
---|