source: chapter02/hostreqs.xml@ 835e40c

12.0 12.0-rc1 12.1 12.1-rc1 bdubbs/gcc13 multilib renodr/libudev-from-systemd trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/update-glibc
Last change on this file since 835e40c was 835e40c, checked in by Xi Ruoyao <xry111@…>, 14 months ago

Adjustments for /dev/pts

  1. Declare UNIX98 PTY requirement in host system requirements and check it in the script. All desktop or server distros should have it now, but let's stop anyone from building on a embedded distro w/o UNIX98 PTY early...
  2. Use Expect test suite as a guard against mishandled $LFS/dev/pts.
  3. No need to test the basic function of Expect in Binutils anymore because if ($LFS)/dev/pts is not good, the Expect test suite would have failed.
  • Property mode set to 100644
File size: 8.6 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-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>&lt;package-name&gt;-devel</quote> or
33 <quote>&lt;package-name&gt;-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 <para><emphasis role="strong">GCC-5.1</emphasis> including the C++
76 compiler, <command>g++</command> (Versions greater than &gcc-version; are
77 not recommended as they have not been tested). C and C++ standard
78 libraries (with headers) must also be present so the C++ compiler can
79 build hosted programs</para>
80 </listitem>
81
82 <listitem>
83 <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
84 </listitem>
85
86 <listitem>
87 <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
88 </listitem>
89
90 <listitem>
91 <para><emphasis role="strong">Linux Kernel-&min-kernel;</emphasis></para>
92
93 <para>The reason for the kernel version requirement is that we specify
94 that version when building <application>glibc</application> in
95 <xref linkend="chapter-cross-tools"/> and
96 <xref linkend="chapter-building-system"/>,
97 at the recommendation of the developers.</para>
98
99 <para>If the host kernel is earlier than &min-kernel; you will need to replace
100 the kernel with a more up-to-date version. There are two ways
101 you can go about this. First, see if your Linux vendor provides a &min-kernel;
102 or later kernel package. If so, you may wish to install it. If your
103 vendor doesn't offer an acceptable kernel package, or you would prefer not to
104 install it, you can compile a kernel yourself. Instructions for
105 compiling the kernel and configuring the boot loader (assuming the host
106 uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
107
108 <para>We require the host kernel to support UNIX 98 pseudo terminal
109 (PTY). It should be enabled on all desktop or server distros shipping
110 Linux &min-kernel; or a newer kernel. If you are building a custom
111 host kernel, ensure <option>CONFIG_UNIX98_PTYS</option> is set to
112 <literal>y</literal> in the kernel configuration.</para>
113
114 </listitem>
115
116 <listitem>
117 <para><emphasis role="strong">M4-1.4.10</emphasis></para>
118 </listitem>
119
120 <listitem>
121 <para><emphasis role="strong">Make-4.0</emphasis></para>
122 </listitem>
123
124 <listitem>
125 <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
126 </listitem>
127
128 <listitem>
129 <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
130 </listitem>
131
132 <listitem>
133 <para><emphasis role="strong">Python-3.4</emphasis></para>
134 </listitem>
135
136 <listitem>
137 <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
138 </listitem>
139
140 <listitem>
141 <para><emphasis role="strong">Tar-1.22</emphasis></para>
142 </listitem>
143
144 <listitem>
145 <para><emphasis role="strong">Texinfo-4.7</emphasis></para>
146 </listitem>
147
148 <listitem>
149 <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
150 </listitem>
151
152 </itemizedlist>
153
154 <important>
155 <para>Note that the symlinks mentioned above are required to build an LFS
156 system using the instructions contained within this book. Symlinks that
157 point to other software (such as dash, mawk, etc.) may work, but are not
158 tested or supported by the LFS development team, and may require either
159 deviation from the instructions or additional patches to some
160 packages.</para>
161 </important>
162
163 <!-- Use an empty sect2 element to prevent a pdf warning. -->
164 <bridgehead renderas="sect2"
165 id="version-check"
166 xreflabel="Host System Requirements">
167 </bridgehead>
168 <!--<title> </title>-->
169
170 <para >To see whether your host system has all the appropriate versions, and
171 the ability to compile programs, run the following commands:</para>
172
173<screen role="nodump"><userinput>cat &gt; version-check.sh &lt;&lt; "EOF"
174<literal>#!/bin/bash
175# A script to list version numbers of critical development tools
176
177# If you have tools installed in other directories, adjust PATH here AND
178# in ~lfs/.bashrc (section 4.4) as well.
179
180LC_ALL=C
181PATH=/usr/bin:/bin
182
183bail() { echo "FATAL: $1"; exit 1; }
184grep --version > /dev/null 2> /dev/null || bail "grep does not work"
185sed '' /dev/null || bail "sed does not work"
186sort /dev/null || bail "sort does not work"
187
188ver_check()
189{
190 if ! type -p $2 &amp;>/dev/null
191 then
192 echo "ERROR: Cannot find $2 ($1)"; return 1;
193 fi
194 v=$($2 --version 2>&amp;1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
195 if printf '%s\n' $3 $v | sort --version-sort --check &amp;>/dev/null
196 then
197 printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
198 else
199 printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
200 return 1;
201 fi
202}
203
204ver_kernel()
205{
206 kver=$(uname -r | grep -E -o '[0-9\.]+')
207 if printf '%s\n' $1 $kver | sort --version-sort --check &amp;>/dev/null
208 then
209 printf "OK: Linux Kernel $kver >= $1\n"; return 0;
210 else
211 printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver";
212 return 1;
213 fi
214}
215
216# Coreutils first because-sort needs Coreutils >= 7.0
217ver_check Coreutils sort 7.0 || bail "--version-sort unsupported"
218ver_check Bash bash 3.2
219ver_check Binutils ld 2.13.1
220ver_check Bison bison 2.7
221ver_check Diffutils diff 2.8.1
222ver_check Findutils find 4.2.31
223ver_check Gawk gawk 4.0.1
224ver_check GCC gcc 5.1
225ver_check "GCC (C++)" g++ 5.1
226ver_check Grep grep 2.5.1a
227ver_check Gzip gzip 1.3.12
228ver_check M4 m4 1.4.10
229ver_check Make make 4.0
230ver_check Patch patch 2.5.4
231ver_check Perl perl 5.8.8
232ver_check Python python3 3.4
233ver_check Sed sed 4.1.5
234ver_check Tar tar 1.22
235ver_check Texinfo texi2any 4.7
236ver_check Xz xz 5.0.0
237ver_kernel &min-kernel;
238
239if mount | grep -q 'devpts on /dev/pts' &amp;&amp; [ -e /dev/ptmx ]
240then echo "OK: Linux Kernel supports UNIX 98 PTY";
241else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi
242
243alias_check() {
244 if $1 --version 2>&amp;1 | grep -qi $2
245 then printf "OK: %-4s is $2\n" "$1";
246 else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
247}
248echo "Aliases:"
249alias_check awk GNU
250alias_check yacc Bison
251alias_check sh Bash
252
253echo "Compiler check:"
254if printf "int main(){}" | g++ -x c++ -
255then echo "OK: g++ works";
256else echo "ERROR: g++ does NOT work"; fi
257rm -f a.out</literal>
258EOF
259
260bash version-check.sh</userinput></screen>
261
262 </sect2>
263</sect1>
Note: See TracBrowser for help on using the repository browser.