source: chapter02/hostreqs.xml@ 8b37712

xry111/clfs-ng
Last change on this file since 8b37712 was 8b37712, checked in by Xi Ruoyao <xry111@…>, 10 months ago

cross-ng: document host dependencies for kernel cross compilation

  • Property mode set to 100644
File size: 6.4 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 <para>Your host system should have the following software with the
14 minimum versions indicated. This should not be an issue for most
15 modern Linux distributions. Also note that many distributions will
16 place software headers into separate packages, often in the form of
17 <quote>&lt;package-name&gt;-devel</quote> or
18 <quote>&lt;package-name&gt;-dev</quote>. Be sure to install those if
19 your distribution provides them.</para>
20
21 <para>Earlier versions of the listed software packages may work, but have
22 not been tested.</para>
23
24 <itemizedlist spacing="compact">
25
26 <listitem>
27 <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
28 should be a symbolic or hard link to bash)</para>
29 </listitem>
30
31 <listitem>
32 <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
33 greater than &binutils-version; are not recommended as they have
34 not been tested)</para>
35 </listitem>
36
37 <listitem>
38 <!-- needed to cross build the kernel in chapter 6 -->
39 <para><emphasis role="strong">Bc-1.07.0</emphasis></para>
40 </listitem>
41
42 <listitem>
43 <para><emphasis role="strong">Bison-2.7</emphasis> (/usr/bin/yacc
44 should be a link to bison or small script that executes bison)</para>
45 </listitem>
46
47 <listitem>
48 <para><emphasis role="strong">Coreutils-6.9</emphasis></para>
49 </listitem>
50
51 <listitem>
52 <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
53 </listitem>
54
55 <listitem>
56 <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
57 </listitem>
58
59 <listitem>
60 <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
61 should be a link to gawk)</para>
62 </listitem>
63
64 <listitem>
65 <para><emphasis role="strong">GCC-4.8</emphasis> including the C++
66 compiler, <command>g++</command> (Versions greater than &gcc-version; are
67 not recommended as they have not been tested). C and C++ standard
68 libraries (with headers) must also be present so the C++ compiler can
69 build hosted programs</para>
70 </listitem>
71
72 <listitem>
73 <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
74 </listitem>
75
76 <listitem>
77 <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
78 </listitem>
79
80 <listitem>
81 <para><emphasis role="strong">M4-1.4.10</emphasis></para>
82 </listitem>
83
84 <listitem>
85 <para><emphasis role="strong">Make-4.0</emphasis></para>
86 </listitem>
87
88 <listitem>
89 <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
90 </listitem>
91
92 <listitem>
93 <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
94 </listitem>
95
96 <listitem>
97 <para><emphasis role="strong">Python-3.4</emphasis></para>
98 </listitem>
99
100 <listitem>
101 <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
102 </listitem>
103
104 <listitem>
105 <para><emphasis role="strong">Tar-1.22</emphasis></para>
106 </listitem>
107
108 <listitem>
109 <para><emphasis role="strong">Texinfo-4.7</emphasis></para>
110 </listitem>
111
112 <listitem>
113 <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
114 </listitem>
115
116 </itemizedlist>
117
118 <important>
119 <para>Note that the symlinks mentioned above are required to build an LFS
120 system using the instructions contained within this book. Symlinks that
121 point to other software (such as dash, mawk, etc.) may work, but are not
122 tested or supported by the LFS development team, and may require either
123 deviation from the instructions or additional patches to some
124 packages.</para>
125 </important>
126
127 <!-- Use an empty sect2 element to prevent a pdf warning. -->
128 <bridgehead renderas="sect2"
129 id="version-check"
130 xreflabel="Host System Requirements">
131 </bridgehead>
132 <!--<title> </title>-->
133
134 <para >To see whether your host system has all the appropriate versions, and
135 the ability to compile programs, run the following:</para>
136
137<screen role="nodump"><userinput>cat &gt; version-check.sh &lt;&lt; "EOF"
138<literal>#!/bin/bash
139# Simple script to list version numbers of critical development tools
140export LC_ALL=C
141bash --version | head -n1 | cut -d" " -f2-4
142MYSH=$(readlink -f /bin/sh)
143echo "/bin/sh -&gt; $MYSH"
144echo $MYSH | grep -q bash || echo "ERROR: /bin/sh does not point to bash"
145unset MYSH
146
147bc --version | head -n1
148echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
149bison --version | head -n1
150
151if [ -h /usr/bin/yacc ]; then
152 echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
153elif [ -x /usr/bin/yacc ]; then
154 echo yacc is `/usr/bin/yacc --version | head -n1`
155else
156 echo "yacc not found"
157fi
158
159echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
160diff --version | head -n1
161find --version | head -n1
162gawk --version | head -n1
163
164if [ -h /usr/bin/awk ]; then
165 echo "/usr/bin/awk -&gt; `readlink -f /usr/bin/awk`";
166elif [ -x /usr/bin/awk ]; then
167 echo awk is `/usr/bin/awk --version | head -n1`
168else
169 echo "awk not found"
170fi
171
172gcc --version | head -n1
173g++ --version | head -n1
174grep --version | head -n1
175gzip --version | head -n1
176cat /proc/version
177m4 --version | head -n1
178make --version | head -n1
179patch --version | head -n1
180echo Perl `perl -V:version`
181python3 --version
182sed --version | head -n1
183tar --version | head -n1
184makeinfo --version | head -n1 # texinfo version
185xz --version | head -n1
186
187echo 'int main(){}' &gt; dummy.c &amp;&amp; g++ -o dummy dummy.c
188if [ -x dummy ]
189 then echo "g++ compilation OK";
190 else echo "g++ compilation failed"; fi
191rm -f dummy.c dummy</literal>
192EOF
193
194bash version-check.sh</userinput></screen>
195<!--
196 <para>Also check for some library consistency:</para>
197
198<screen role="nodump"><userinput>cat &gt; library-check.sh &lt;&lt; "EOF"
199<literal>#!/bin/bash
200for lib in lib{gmp,mpfr,mpc}.la; do
201 echo $lib: $(if find /usr/lib* -name $lib|
202 grep -q $lib;then :;else echo not;fi) found
203done
204unset lib</literal>
205EOF
206
207bash library-check.sh</userinput></screen>
208
209<para>The files identified by this script should be all present
210or all absent, but not only one or two present.</para>
211-->
212
213</sect1>
Note: See TracBrowser for help on using the repository browser.