[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 |
|
---|
[7c92d6d] | 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.
|
---|
[5c3ffcb9] | 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 |
|
---|
[7c92d6d] | 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 |
|
---|
[fd8b059] | 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><package-name>-devel</quote> or
|
---|
| 38 | <quote><package-name>-dev</quote>. Be sure to install those if
|
---|
[5e858e7] | 39 | your distribution provides them.</para>
|
---|
[d12ae76] | 40 |
|
---|
[72fb9bf] | 41 | <para>Earlier versions of the listed software packages may work, but have
|
---|
| 42 | not been tested.</para>
|
---|
[7088c96] | 43 |
|
---|
[bf5724b] | 44 | <itemizedlist spacing="compact">
|
---|
[fd8b059] | 45 |
|
---|
[d12ae76] | 46 | <listitem>
|
---|
[7088c96] | 47 | <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
|
---|
[e4ab232] | 48 | should be a symbolic or hard link to bash)</para>
|
---|
[d12ae76] | 49 | </listitem>
|
---|
[fd8b059] | 50 |
|
---|
[d12ae76] | 51 | <listitem>
|
---|
[d6006ef] | 52 | <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
|
---|
[fd8b059] | 53 | greater than &binutils-version; are not recommended as they have
|
---|
| 54 | not been tested)</para>
|
---|
[d12ae76] | 55 | </listitem>
|
---|
[fd8b059] | 56 |
|
---|
[8b37712] | 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 |
|
---|
[07dfccb] | 62 | <listitem>
|
---|
[b55310e] | 63 | <para><emphasis role="strong">Bison-2.7</emphasis> (/usr/bin/yacc
|
---|
[17a807a] | 64 | should be a link to bison or a small script that executes bison)</para>
|
---|
[07dfccb] | 65 | </listitem>
|
---|
| 66 |
|
---|
[d12ae76] | 67 | <listitem>
|
---|
[b789d88] | 68 | <para><emphasis role="strong">Coreutils-7.0</emphasis></para>
|
---|
[d12ae76] | 69 | </listitem>
|
---|
[fd8b059] | 70 |
|
---|
[d12ae76] | 71 | <listitem>
|
---|
[7088c96] | 72 | <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
|
---|
[d12ae76] | 73 | </listitem>
|
---|
[fd8b059] | 74 |
|
---|
[d12ae76] | 75 | <listitem>
|
---|
[7088c96] | 76 | <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
|
---|
[d12ae76] | 77 | </listitem>
|
---|
[fd8b059] | 78 |
|
---|
[d12ae76] | 79 | <listitem>
|
---|
[3fbc395] | 80 | <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
|
---|
[e4ab232] | 81 | should be a link to gawk)</para>
|
---|
[d12ae76] | 82 | </listitem>
|
---|
[fd8b059] | 83 |
|
---|
[d12ae76] | 84 | <listitem>
|
---|
[0ba2ee5a] | 85 | <para><emphasis role="strong">GCC-5.1</emphasis> including the C++
|
---|
[142b29b] | 86 | compiler, <command>g++</command> (Versions greater than &gcc-version; are
|
---|
[d6006ef] | 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>
|
---|
[d12ae76] | 90 | </listitem>
|
---|
[fd8b059] | 91 |
|
---|
[d12ae76] | 92 | <listitem>
|
---|
[7088c96] | 93 | <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
|
---|
[d12ae76] | 94 | </listitem>
|
---|
[fd8b059] | 95 |
|
---|
[d12ae76] | 96 | <listitem>
|
---|
[7088c96] | 97 | <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
|
---|
[d12ae76] | 98 | </listitem>
|
---|
[fd8b059] | 99 |
|
---|
[787fe0c] | 100 | <listitem>
|
---|
[7088c96] | 101 | <para><emphasis role="strong">M4-1.4.10</emphasis></para>
|
---|
[787fe0c] | 102 | </listitem>
|
---|
| 103 |
|
---|
[d12ae76] | 104 | <listitem>
|
---|
[76db8d6] | 105 | <para><emphasis role="strong">Make-4.0</emphasis></para>
|
---|
[d12ae76] | 106 | </listitem>
|
---|
[fd8b059] | 107 |
|
---|
[d12ae76] | 108 | <listitem>
|
---|
[fd8b059] | 109 | <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
|
---|
[d12ae76] | 110 | </listitem>
|
---|
[fd8b059] | 111 |
|
---|
[9692a57] | 112 | <listitem>
|
---|
[7088c96] | 113 | <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
|
---|
[9692a57] | 114 | </listitem>
|
---|
| 115 |
|
---|
[a271796] | 116 | <listitem>
|
---|
| 117 | <para><emphasis role="strong">Python-3.4</emphasis></para>
|
---|
| 118 | </listitem>
|
---|
| 119 |
|
---|
[d12ae76] | 120 | <listitem>
|
---|
[7088c96] | 121 | <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
|
---|
[d12ae76] | 122 | </listitem>
|
---|
[fd8b059] | 123 |
|
---|
[d12ae76] | 124 | <listitem>
|
---|
[7380c3aa] | 125 | <para><emphasis role="strong">Tar-1.22</emphasis></para>
|
---|
[d12ae76] | 126 | </listitem>
|
---|
| 127 |
|
---|
[4df39e5] | 128 | <listitem>
|
---|
| 129 | <para><emphasis role="strong">Texinfo-4.7</emphasis></para>
|
---|
| 130 | </listitem>
|
---|
| 131 |
|
---|
[8e771c5] | 132 | <listitem>
|
---|
[44f6add] | 133 | <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
|
---|
[8e771c5] | 134 | </listitem>
|
---|
| 135 |
|
---|
[d12ae76] | 136 | </itemizedlist>
|
---|
| 137 |
|
---|
[72fb9bf] | 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>
|
---|
[e4ab232] | 146 |
|
---|
[d659bf4] | 147 | <!-- Use an empty sect2 element to prevent a pdf warning. -->
|
---|
[a04b192f] | 148 | <bridgehead renderas="sect2"
|
---|
| 149 | id="version-check"
|
---|
[72fb9bf] | 150 | xreflabel="Host System Requirements">
|
---|
| 151 | </bridgehead>
|
---|
| 152 | <!--<title> </title>-->
|
---|
[d659bf4] | 153 |
|
---|
| 154 | <para >To see whether your host system has all the appropriate versions, and
|
---|
[86f3868] | 155 | the ability to compile programs, run the following commands:</para>
|
---|
[5e858e7] | 156 |
|
---|
[b179883] | 157 | <screen role="nodump"><userinput>cat > version-check.sh << "EOF"
|
---|
[5e858e7] | 158 | <literal>#!/bin/bash
|
---|
[140e9a44] | 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 |
|
---|
| 164 | LC_ALL=C
|
---|
| 165 | PATH=/usr/bin:/bin
|
---|
| 166 |
|
---|
| 167 | bail() { echo "FATAL: $1"; exit 1; }
|
---|
| 168 | grep --version > /dev/null 2> /dev/null || bail "grep does not work"
|
---|
| 169 | sed '' /dev/null || bail "sed does not work"
|
---|
| 170 | sort /dev/null || bail "sort does not work"
|
---|
| 171 |
|
---|
| 172 | ver_check()
|
---|
| 173 | {
|
---|
| 174 | if ! type -p $2 &>/dev/null
|
---|
| 175 | then
|
---|
| 176 | echo "ERROR: Cannot find $2 ($1)"; return 1;
|
---|
| 177 | fi
|
---|
[b789d88] | 178 | v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
|
---|
[140e9a44] | 179 | if printf '%s\n' $3 $v | sort --version-sort --check &>/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
|
---|
| 189 | ver_check Coreutils sort 7.0 || bail "--version-sort unsupported"
|
---|
| 190 | ver_check Bash bash 3.2
|
---|
[a33431c] | 191 | ver_check Bc bc 1.07.0
|
---|
[140e9a44] | 192 | ver_check Binutils ld 2.13.1
|
---|
| 193 | ver_check Bison bison 2.7
|
---|
| 194 | ver_check Diffutils diff 2.8.1
|
---|
| 195 | ver_check Findutils find 4.2.31
|
---|
| 196 | ver_check Gawk gawk 4.0.1
|
---|
| 197 | ver_check GCC gcc 5.1
|
---|
| 198 | ver_check "GCC (C++)" g++ 5.1
|
---|
[b789d88] | 199 | ver_check Grep grep 2.5.1a
|
---|
[140e9a44] | 200 | ver_check Gzip gzip 1.3.12
|
---|
| 201 | ver_check M4 m4 1.4.10
|
---|
| 202 | ver_check Make make 4.0
|
---|
| 203 | ver_check Patch patch 2.5.4
|
---|
| 204 | ver_check Perl perl 5.8.8
|
---|
| 205 | ver_check Python python3 3.4
|
---|
| 206 | ver_check Sed sed 4.1.5
|
---|
| 207 | ver_check Tar tar 1.22
|
---|
| 208 | ver_check Texinfo texi2any 4.7
|
---|
| 209 | ver_check Xz xz 5.0.0
|
---|
| 210 |
|
---|
| 211 | alias_check() {
|
---|
| 212 | if $1 --version 2>&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 | }
|
---|
| 216 | echo "Aliases:"
|
---|
| 217 | alias_check awk GNU
|
---|
| 218 | alias_check yacc Bison
|
---|
| 219 | alias_check sh Bash
|
---|
| 220 |
|
---|
[b789d88] | 221 | echo "Compiler check:"
|
---|
[140e9a44] | 222 | if printf "int main(){}" | g++ -x c++ -
|
---|
| 223 | then echo "OK: g++ works";
|
---|
| 224 | else echo "ERROR: g++ does NOT work"; fi
|
---|
| 225 | rm -f a.out</literal>
|
---|
[3d2cea9] | 226 | EOF
|
---|
| 227 |
|
---|
| 228 | bash version-check.sh</userinput></screen>
|
---|
[a09a914] | 229 |
|
---|
[7c92d6d] | 230 | </sect2>
|
---|
[d1ebcc8] | 231 | </sect1>
|
---|