source: chapter02/hostreqs.xml@ 39d9ed8

xry111/clfs-ng
Last change on this file since 39d9ed8 was a33431c, checked in by Xi Ruoyao <xry111@…>, 16 months ago

cross-ng: hostreqs: Adjust the new script for cross edition

  • Property mode set to 100644
File size: 7.1 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
19 For the Cross Edition, it's recommended that both the system running
20 the host distribution and the target system should meet the
21 requirements.
22
23 Older systems that do not meet these requirements will still work,
24 but the time to build packages will be significantly longer
25 than documented.
26 </para>
27
28 </sect2>
29
30 <sect2>
31 <title>Software</title>
32
33 <para>Your host system should have the following software with the
34 minimum versions indicated. This should not be an issue for most
35 modern Linux distributions. Also note that many distributions will
36 place software headers into separate packages, often in the form of
37 <quote>&lt;package-name&gt;-devel</quote> or
38 <quote>&lt;package-name&gt;-dev</quote>. Be sure to install those if
39 your distribution provides them.</para>
40
41 <para>Earlier versions of the listed software packages may work, but have
42 not been tested.</para>
43
44 <itemizedlist spacing="compact">
45
46 <listitem>
47 <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
48 should be a symbolic or hard link to bash)</para>
49 </listitem>
50
51 <listitem>
52 <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
53 greater than &binutils-version; are not recommended as they have
54 not been tested)</para>
55 </listitem>
56
57 <listitem>
58 <!-- needed to cross build the kernel in chapter 6 -->
59 <para><emphasis role="strong">Bc-1.07.0</emphasis></para>
60 </listitem>
61
62 <listitem>
63 <para><emphasis role="strong">Bison-2.7</emphasis> (/usr/bin/yacc
64 should be a link to bison or a small script that executes bison)</para>
65 </listitem>
66
67 <listitem>
68 <para><emphasis role="strong">Coreutils-7.0</emphasis></para>
69 </listitem>
70
71 <listitem>
72 <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
73 </listitem>
74
75 <listitem>
76 <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
77 </listitem>
78
79 <listitem>
80 <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
81 should be a link to gawk)</para>
82 </listitem>
83
84 <listitem>
85 <para><emphasis role="strong">GCC-5.1</emphasis> including the C++
86 compiler, <command>g++</command> (Versions greater than &gcc-version; are
87 not recommended as they have not been tested). C and C++ standard
88 libraries (with headers) must also be present so the C++ compiler can
89 build hosted programs</para>
90 </listitem>
91
92 <listitem>
93 <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
94 </listitem>
95
96 <listitem>
97 <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
98 </listitem>
99
100 <listitem>
101 <para><emphasis role="strong">M4-1.4.10</emphasis></para>
102 </listitem>
103
104 <listitem>
105 <para><emphasis role="strong">Make-4.0</emphasis></para>
106 </listitem>
107
108 <listitem>
109 <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
110 </listitem>
111
112 <listitem>
113 <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
114 </listitem>
115
116 <listitem>
117 <para><emphasis role="strong">Python-3.4</emphasis></para>
118 </listitem>
119
120 <listitem>
121 <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
122 </listitem>
123
124 <listitem>
125 <para><emphasis role="strong">Tar-1.22</emphasis></para>
126 </listitem>
127
128 <listitem>
129 <para><emphasis role="strong">Texinfo-4.7</emphasis></para>
130 </listitem>
131
132 <listitem>
133 <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
134 </listitem>
135
136 </itemizedlist>
137
138 <important>
139 <para>Note that the symlinks mentioned above are required to build an LFS
140 system using the instructions contained within this book. Symlinks that
141 point to other software (such as dash, mawk, etc.) may work, but are not
142 tested or supported by the LFS development team, and may require either
143 deviation from the instructions or additional patches to some
144 packages.</para>
145 </important>
146
147 <!-- Use an empty sect2 element to prevent a pdf warning. -->
148 <bridgehead renderas="sect2"
149 id="version-check"
150 xreflabel="Host System Requirements">
151 </bridgehead>
152 <!--<title> </title>-->
153
154 <para >To see whether your host system has all the appropriate versions, and
155 the ability to compile programs, run the following commands:</para>
156
157<screen role="nodump"><userinput>cat &gt; version-check.sh &lt;&lt; "EOF"
158<literal>#!/bin/bash
159# A script to list version numbers of critical development tools
160
161# If you have tools installed in other directories, adjust PATH here AND
162# in ~lfs/.bashrc (section 4.4) as well.
163
164LC_ALL=C
165PATH=/usr/bin:/bin
166
167bail() { echo "FATAL: $1"; exit 1; }
168grep --version > /dev/null 2> /dev/null || bail "grep does not work"
169sed '' /dev/null || bail "sed does not work"
170sort /dev/null || bail "sort does not work"
171
172ver_check()
173{
174 if ! type -p $2 &amp;>/dev/null
175 then
176 echo "ERROR: Cannot find $2 ($1)"; return 1;
177 fi
178 v=$($2 --version 2>&amp;1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
179 if printf '%s\n' $3 $v | sort --version-sort --check &amp;>/dev/null
180 then
181 printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
182 else
183 printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
184 return 1;
185 fi
186}
187
188# Coreutils first because-sort needs Coreutils >= 7.0
189ver_check Coreutils sort 7.0 || bail "--version-sort unsupported"
190ver_check Bash bash 3.2
191ver_check Bc bc 1.07.0
192ver_check Binutils ld 2.13.1
193ver_check Bison bison 2.7
194ver_check Diffutils diff 2.8.1
195ver_check Findutils find 4.2.31
196ver_check Gawk gawk 4.0.1
197ver_check GCC gcc 5.1
198ver_check "GCC (C++)" g++ 5.1
199ver_check Grep grep 2.5.1a
200ver_check Gzip gzip 1.3.12
201ver_check M4 m4 1.4.10
202ver_check Make make 4.0
203ver_check Patch patch 2.5.4
204ver_check Perl perl 5.8.8
205ver_check Python python3 3.4
206ver_check Sed sed 4.1.5
207ver_check Tar tar 1.22
208ver_check Texinfo texi2any 4.7
209ver_check Xz xz 5.0.0
210
211alias_check() {
212 if $1 --version 2>&amp;1 | grep -qi $2
213 then printf "OK: %-4s is $2\n" "$1";
214 else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
215}
216echo "Aliases:"
217alias_check awk GNU
218alias_check yacc Bison
219alias_check sh Bash
220
221echo "Compiler check:"
222if printf "int main(){}" | g++ -x c++ -
223then echo "OK: g++ works";
224else echo "ERROR: g++ does NOT work"; fi
225rm -f a.out</literal>
226EOF
227
228bash version-check.sh</userinput></screen>
229
230 </sect2>
231</sect1>
Note: See TracBrowser for help on using the repository browser.