source: chapter02/hostreqs.xml@ 8b37712

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

cross-ng: document host dependencies for kernel cross compilation

  • Property mode set to 100644
File size: 6.4 KB
RevLine 
[d1ebcc8]1<?xml version="1.0" encoding="ISO-8859-1"?>
[b06ca36]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[d1ebcc8]4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
[b330f4a]7
[afcfd74]8<sect1 id="ch-partitioning-hostreqs" xreflabel="Host System Requirements">
[b330f4a]9 <?dbhtml filename="hostreqs.html"?>
10
11 <title>Host System Requirements</title>
12
[fd8b059]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
[5e858e7]19 your distribution provides them.</para>
[d12ae76]20
[72fb9bf]21 <para>Earlier versions of the listed software packages may work, but have
22 not been tested.</para>
[7088c96]23
[bf5724b]24 <itemizedlist spacing="compact">
[fd8b059]25
[d12ae76]26 <listitem>
[7088c96]27 <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
[e4ab232]28 should be a symbolic or hard link to bash)</para>
[d12ae76]29 </listitem>
[fd8b059]30
[d12ae76]31 <listitem>
[d6006ef]32 <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
[fd8b059]33 greater than &binutils-version; are not recommended as they have
34 not been tested)</para>
[d12ae76]35 </listitem>
[fd8b059]36
[8b37712]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
[07dfccb]42 <listitem>
[b55310e]43 <para><emphasis role="strong">Bison-2.7</emphasis> (/usr/bin/yacc
[e4ab232]44 should be a link to bison or small script that executes bison)</para>
[07dfccb]45 </listitem>
46
[d12ae76]47 <listitem>
[7088c96]48 <para><emphasis role="strong">Coreutils-6.9</emphasis></para>
[d12ae76]49 </listitem>
[fd8b059]50
[d12ae76]51 <listitem>
[7088c96]52 <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
[d12ae76]53 </listitem>
[fd8b059]54
[d12ae76]55 <listitem>
[7088c96]56 <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
[d12ae76]57 </listitem>
[fd8b059]58
[d12ae76]59 <listitem>
[3fbc395]60 <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
[e4ab232]61 should be a link to gawk)</para>
[d12ae76]62 </listitem>
[fd8b059]63
[d12ae76]64 <listitem>
[d6006ef]65 <para><emphasis role="strong">GCC-4.8</emphasis> including the C++
[142b29b]66 compiler, <command>g++</command> (Versions greater than &gcc-version; are
[d6006ef]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>
[d12ae76]70 </listitem>
[fd8b059]71
[d12ae76]72 <listitem>
[7088c96]73 <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
[d12ae76]74 </listitem>
[fd8b059]75
[d12ae76]76 <listitem>
[7088c96]77 <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
[d12ae76]78 </listitem>
[fd8b059]79
[787fe0c]80 <listitem>
[7088c96]81 <para><emphasis role="strong">M4-1.4.10</emphasis></para>
[787fe0c]82 </listitem>
83
[d12ae76]84 <listitem>
[76db8d6]85 <para><emphasis role="strong">Make-4.0</emphasis></para>
[d12ae76]86 </listitem>
[fd8b059]87
[d12ae76]88 <listitem>
[fd8b059]89 <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
[d12ae76]90 </listitem>
[fd8b059]91
[9692a57]92 <listitem>
[7088c96]93 <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
[9692a57]94 </listitem>
95
[a271796]96 <listitem>
97 <para><emphasis role="strong">Python-3.4</emphasis></para>
98 </listitem>
99
[d12ae76]100 <listitem>
[7088c96]101 <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
[d12ae76]102 </listitem>
[fd8b059]103
[d12ae76]104 <listitem>
[7380c3aa]105 <para><emphasis role="strong">Tar-1.22</emphasis></para>
[d12ae76]106 </listitem>
107
[4df39e5]108 <listitem>
109 <para><emphasis role="strong">Texinfo-4.7</emphasis></para>
110 </listitem>
111
[8e771c5]112 <listitem>
[44f6add]113 <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
[8e771c5]114 </listitem>
115
[d12ae76]116 </itemizedlist>
117
[72fb9bf]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>
[e4ab232]126
[d659bf4]127 <!-- Use an empty sect2 element to prevent a pdf warning. -->
[a04b192f]128 <bridgehead renderas="sect2"
129 id="version-check"
[72fb9bf]130 xreflabel="Host System Requirements">
131 </bridgehead>
132 <!--<title> </title>-->
[d659bf4]133
134 <para >To see whether your host system has all the appropriate versions, and
[26b4421]135 the ability to compile programs, run the following:</para>
[5e858e7]136
[b179883]137<screen role="nodump"><userinput>cat &gt; version-check.sh &lt;&lt; "EOF"
[5e858e7]138<literal>#!/bin/bash
[2914ab8c]139# Simple script to list version numbers of critical development tools
[5dcff99]140export LC_ALL=C
[5e858e7]141bash --version | head -n1 | cut -d" " -f2-4
[7c4d11a]142MYSH=$(readlink -f /bin/sh)
143echo "/bin/sh -&gt; $MYSH"
[5768244]144echo $MYSH | grep -q bash || echo "ERROR: /bin/sh does not point to bash"
[7c4d11a]145unset MYSH
146
[8b37712]147bc --version | head -n1
[727a610]148echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
[172a92e]149bison --version | head -n1
[a02b8ef]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
[a04b192f]156 echo "yacc not found"
[a02b8ef]157fi
[54d3ed5]158
[baaa5c3]159echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
[5e858e7]160diff --version | head -n1
161find --version | head -n1
162gawk --version | head -n1
[a02b8ef]163
164if [ -h /usr/bin/awk ]; then
165 echo "/usr/bin/awk -&gt; `readlink -f /usr/bin/awk`";
166elif [ -x /usr/bin/awk ]; then
[09c83f9]167 echo awk is `/usr/bin/awk --version | head -n1`
[a04b192f]168else
169 echo "awk not found"
[a02b8ef]170fi
[54d3ed5]171
[2e8cbe0]172gcc --version | head -n1
173g++ --version | head -n1
174grep --version | head -n1
175gzip --version | head -n1
[a3b689f]176cat /proc/version
[2e8cbe0]177m4 --version | head -n1
178make --version | head -n1
179patch --version | head -n1
[3ccd4fe]180echo Perl `perl -V:version`
[a271796]181python3 --version
[2e8cbe0]182sed --version | head -n1
183tar --version | head -n1
[a271796]184makeinfo --version | head -n1 # texinfo version
[2e8cbe0]185xz --version | head -n1
[e4bdfc54]186
[3d56263]187echo 'int main(){}' &gt; dummy.c &amp;&amp; g++ -o dummy dummy.c
[2ca8941]188if [ -x dummy ]
[4fedd8d]189 then echo "g++ compilation OK";
190 else echo "g++ compilation failed"; fi
[3d2cea9]191rm -f dummy.c dummy</literal>
192EOF
193
194bash version-check.sh</userinput></screen>
[d76a82b2]195<!--
[3d2cea9]196 <para>Also check for some library consistency:</para>
[a09a914]197
[3d2cea9]198<screen role="nodump"><userinput>cat &gt; library-check.sh &lt;&lt; "EOF"
199<literal>#!/bin/bash
[a09a914]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>
[5e858e7]205EOF
206
[3d2cea9]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>
[d76a82b2]211-->
[3d2cea9]212
[d1ebcc8]213</sect1>
Note: See TracBrowser for help on using the repository browser.