[7152faa] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[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.
|
---|
| 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 |
|
---|
[fd8b059] | 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
|
---|
[ee950a5e] | 32 | <literal><replaceable><package-name></replaceable>-devel</literal>
|
---|
| 33 | or
|
---|
| 34 | <literal><replaceable><package-name></replaceable>-dev</literal>.
|
---|
| 35 | Be sure to install those if your distribution provides them.</para>
|
---|
[d12ae76] | 36 |
|
---|
[72fb9bf] | 37 | <para>Earlier versions of the listed software packages may work, but have
|
---|
| 38 | not been tested.</para>
|
---|
[7088c96] | 39 |
|
---|
[bf5724b] | 40 | <itemizedlist spacing="compact">
|
---|
[fd8b059] | 41 |
|
---|
[d12ae76] | 42 | <listitem>
|
---|
[7088c96] | 43 | <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
|
---|
[e4ab232] | 44 | should be a symbolic or hard link to bash)</para>
|
---|
[d12ae76] | 45 | </listitem>
|
---|
[fd8b059] | 46 |
|
---|
[d12ae76] | 47 | <listitem>
|
---|
[d6006ef] | 48 | <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
|
---|
[fd8b059] | 49 | greater than &binutils-version; are not recommended as they have
|
---|
| 50 | not been tested)</para>
|
---|
[d12ae76] | 51 | </listitem>
|
---|
[fd8b059] | 52 |
|
---|
[07dfccb] | 53 | <listitem>
|
---|
[b55310e] | 54 | <para><emphasis role="strong">Bison-2.7</emphasis> (/usr/bin/yacc
|
---|
[17a807a] | 55 | should be a link to bison or a small script that executes bison)</para>
|
---|
[07dfccb] | 56 | </listitem>
|
---|
| 57 |
|
---|
[e70bf8f] | 58 | <!-- In Coreutils-8.1 the nproc program is added. -->
|
---|
[d12ae76] | 59 | <listitem>
|
---|
[e70bf8f] | 60 | <para><emphasis role="strong">Coreutils-8.1</emphasis></para>
|
---|
[d12ae76] | 61 | </listitem>
|
---|
[fd8b059] | 62 |
|
---|
[d12ae76] | 63 | <listitem>
|
---|
[7088c96] | 64 | <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
|
---|
[d12ae76] | 65 | </listitem>
|
---|
[fd8b059] | 66 |
|
---|
[d12ae76] | 67 | <listitem>
|
---|
[7088c96] | 68 | <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
|
---|
[d12ae76] | 69 | </listitem>
|
---|
[fd8b059] | 70 |
|
---|
[d12ae76] | 71 | <listitem>
|
---|
[3fbc395] | 72 | <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
|
---|
[e4ab232] | 73 | should be a link to gawk)</para>
|
---|
[d12ae76] | 74 | </listitem>
|
---|
[fd8b059] | 75 |
|
---|
[d12ae76] | 76 | <listitem>
|
---|
[808bc94] | 77 | <!-- Pass 1 GCC FTBFS with GCC-5.1 because of
|
---|
| 78 | https://gcc.gnu.org/PR65801. -->
|
---|
| 79 | <para><emphasis role="strong">GCC-5.2</emphasis> including the C++
|
---|
[142b29b] | 80 | compiler, <command>g++</command> (Versions greater than &gcc-version; are
|
---|
[d6006ef] | 81 | not recommended as they have not been tested). C and C++ standard
|
---|
| 82 | libraries (with headers) must also be present so the C++ compiler can
|
---|
| 83 | build hosted programs</para>
|
---|
[d12ae76] | 84 | </listitem>
|
---|
[fd8b059] | 85 |
|
---|
[d12ae76] | 86 | <listitem>
|
---|
[7088c96] | 87 | <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
|
---|
[d12ae76] | 88 | </listitem>
|
---|
[fd8b059] | 89 |
|
---|
[d12ae76] | 90 | <listitem>
|
---|
[7088c96] | 91 | <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
|
---|
[d12ae76] | 92 | </listitem>
|
---|
[fd8b059] | 93 |
|
---|
[d12ae76] | 94 | <listitem>
|
---|
[a93258d] | 95 | <para><emphasis role="strong">Linux Kernel-&min-kernel;</emphasis></para>
|
---|
[fd8b059] | 96 |
|
---|
[9ee226e] | 97 | <para>The reason for the kernel version requirement is that we specify
|
---|
[33ca65c] | 98 | that version when building <application>glibc</application> in
|
---|
| 99 | <xref linkend="chapter-cross-tools"/> and
|
---|
[0f18f2b] | 100 | <xref linkend="chapter-building-system"/>, so the workarounds for
|
---|
| 101 | older kernels are not enabled and the compiled
|
---|
| 102 | <application>glibc</application> is slightly faster and smaller.
|
---|
[1e18041] | 103 | As at Feb 2024, &min-kernel; is the oldest kernel release still
|
---|
| 104 | supported by the kernel developers. Some kernel releases older than
|
---|
| 105 | &min-kernel; may be still supported by third-party teams, but they
|
---|
| 106 | are not considered official upstream kernel releases; read
|
---|
| 107 | <ulink url='https://kernel.org/category/releases.html'/> for the
|
---|
| 108 | details.</para>
|
---|
[7088c96] | 109 |
|
---|
[a93258d] | 110 | <para>If the host kernel is earlier than &min-kernel; you will need to replace
|
---|
[86f3868] | 111 | the kernel with a more up-to-date version. There are two ways
|
---|
[a93258d] | 112 | you can go about this. First, see if your Linux vendor provides a &min-kernel;
|
---|
[9ee226e] | 113 | or later kernel package. If so, you may wish to install it. If your
|
---|
| 114 | vendor doesn't offer an acceptable kernel package, or you would prefer not to
|
---|
| 115 | install it, you can compile a kernel yourself. Instructions for
|
---|
| 116 | compiling the kernel and configuring the boot loader (assuming the host
|
---|
| 117 | uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
|
---|
[56ca3a5f] | 118 |
|
---|
[835e40c] | 119 | <para>We require the host kernel to support UNIX 98 pseudo terminal
|
---|
| 120 | (PTY). It should be enabled on all desktop or server distros shipping
|
---|
| 121 | Linux &min-kernel; or a newer kernel. If you are building a custom
|
---|
| 122 | host kernel, ensure <option>CONFIG_UNIX98_PTYS</option> is set to
|
---|
| 123 | <literal>y</literal> in the kernel configuration.</para>
|
---|
| 124 |
|
---|
[d12ae76] | 125 | </listitem>
|
---|
[fd8b059] | 126 |
|
---|
[787fe0c] | 127 | <listitem>
|
---|
[7088c96] | 128 | <para><emphasis role="strong">M4-1.4.10</emphasis></para>
|
---|
[787fe0c] | 129 | </listitem>
|
---|
| 130 |
|
---|
[d12ae76] | 131 | <listitem>
|
---|
[76db8d6] | 132 | <para><emphasis role="strong">Make-4.0</emphasis></para>
|
---|
[d12ae76] | 133 | </listitem>
|
---|
[fd8b059] | 134 |
|
---|
[d12ae76] | 135 | <listitem>
|
---|
[fd8b059] | 136 | <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
|
---|
[d12ae76] | 137 | </listitem>
|
---|
[fd8b059] | 138 |
|
---|
[9692a57] | 139 | <listitem>
|
---|
[7088c96] | 140 | <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
|
---|
[9692a57] | 141 | </listitem>
|
---|
| 142 |
|
---|
[a271796] | 143 | <listitem>
|
---|
| 144 | <para><emphasis role="strong">Python-3.4</emphasis></para>
|
---|
| 145 | </listitem>
|
---|
| 146 |
|
---|
[d12ae76] | 147 | <listitem>
|
---|
[7088c96] | 148 | <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
|
---|
[d12ae76] | 149 | </listitem>
|
---|
[fd8b059] | 150 |
|
---|
[d12ae76] | 151 | <listitem>
|
---|
[7380c3aa] | 152 | <para><emphasis role="strong">Tar-1.22</emphasis></para>
|
---|
[d12ae76] | 153 | </listitem>
|
---|
| 154 |
|
---|
[4df39e5] | 155 | <listitem>
|
---|
[4b1b794] | 156 | <para><emphasis role="strong">Texinfo-5.0</emphasis></para>
|
---|
[4df39e5] | 157 | </listitem>
|
---|
| 158 |
|
---|
[8e771c5] | 159 | <listitem>
|
---|
[44f6add] | 160 | <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
|
---|
[8e771c5] | 161 | </listitem>
|
---|
| 162 |
|
---|
[d12ae76] | 163 | </itemizedlist>
|
---|
| 164 |
|
---|
[72fb9bf] | 165 | <important>
|
---|
| 166 | <para>Note that the symlinks mentioned above are required to build an LFS
|
---|
| 167 | system using the instructions contained within this book. Symlinks that
|
---|
| 168 | point to other software (such as dash, mawk, etc.) may work, but are not
|
---|
| 169 | tested or supported by the LFS development team, and may require either
|
---|
| 170 | deviation from the instructions or additional patches to some
|
---|
| 171 | packages.</para>
|
---|
| 172 | </important>
|
---|
[e4ab232] | 173 |
|
---|
[d659bf4] | 174 | <!-- Use an empty sect2 element to prevent a pdf warning. -->
|
---|
[a04b192f] | 175 | <bridgehead renderas="sect2"
|
---|
| 176 | id="version-check"
|
---|
[72fb9bf] | 177 | xreflabel="Host System Requirements">
|
---|
| 178 | </bridgehead>
|
---|
| 179 | <!--<title> </title>-->
|
---|
[d659bf4] | 180 |
|
---|
| 181 | <para >To see whether your host system has all the appropriate versions, and
|
---|
[86f3868] | 182 | the ability to compile programs, run the following commands:</para>
|
---|
[5e858e7] | 183 |
|
---|
[1ebfa8e6] | 184 | <screen role="nodump"><?dbfo keep-together="auto"?><userinput>cat > version-check.sh << "EOF"
|
---|
[b789d88] | 185 | <literal>#!/bin/bash
|
---|
[140e9a44] | 186 | # A script to list version numbers of critical development tools
|
---|
| 187 |
|
---|
| 188 | # If you have tools installed in other directories, adjust PATH here AND
|
---|
| 189 | # in ~lfs/.bashrc (section 4.4) as well.
|
---|
| 190 |
|
---|
| 191 | LC_ALL=C
|
---|
| 192 | PATH=/usr/bin:/bin
|
---|
| 193 |
|
---|
| 194 | bail() { echo "FATAL: $1"; exit 1; }
|
---|
| 195 | grep --version > /dev/null 2> /dev/null || bail "grep does not work"
|
---|
| 196 | sed '' /dev/null || bail "sed does not work"
|
---|
| 197 | sort /dev/null || bail "sort does not work"
|
---|
| 198 |
|
---|
| 199 | ver_check()
|
---|
| 200 | {
|
---|
| 201 | if ! type -p $2 &>/dev/null
|
---|
| 202 | then
|
---|
| 203 | echo "ERROR: Cannot find $2 ($1)"; return 1;
|
---|
| 204 | fi
|
---|
[b789d88] | 205 | v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
|
---|
[140e9a44] | 206 | if printf '%s\n' $3 $v | sort --version-sort --check &>/dev/null
|
---|
| 207 | then
|
---|
| 208 | printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
|
---|
| 209 | else
|
---|
| 210 | printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
|
---|
| 211 | return 1;
|
---|
| 212 | fi
|
---|
| 213 | }
|
---|
| 214 |
|
---|
| 215 | ver_kernel()
|
---|
| 216 | {
|
---|
[6e4dfa7] | 217 | kver=$(uname -r | grep -E -o '^[0-9\.]+')
|
---|
[140e9a44] | 218 | if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null
|
---|
| 219 | then
|
---|
| 220 | printf "OK: Linux Kernel $kver >= $1\n"; return 0;
|
---|
| 221 | else
|
---|
| 222 | printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver";
|
---|
| 223 | return 1;
|
---|
| 224 | fi
|
---|
| 225 | }
|
---|
| 226 |
|
---|
[e70bf8f] | 227 | # Coreutils first because --version-sort needs Coreutils >= 7.0
|
---|
| 228 | ver_check Coreutils sort 8.1 || bail "Coreutils too old, stop"
|
---|
[140e9a44] | 229 | ver_check Bash bash 3.2
|
---|
| 230 | ver_check Binutils ld 2.13.1
|
---|
| 231 | ver_check Bison bison 2.7
|
---|
| 232 | ver_check Diffutils diff 2.8.1
|
---|
| 233 | ver_check Findutils find 4.2.31
|
---|
| 234 | ver_check Gawk gawk 4.0.1
|
---|
[808bc94] | 235 | ver_check GCC gcc 5.2
|
---|
| 236 | ver_check "GCC (C++)" g++ 5.2
|
---|
[b789d88] | 237 | ver_check Grep grep 2.5.1a
|
---|
[140e9a44] | 238 | ver_check Gzip gzip 1.3.12
|
---|
| 239 | ver_check M4 m4 1.4.10
|
---|
| 240 | ver_check Make make 4.0
|
---|
| 241 | ver_check Patch patch 2.5.4
|
---|
| 242 | ver_check Perl perl 5.8.8
|
---|
| 243 | ver_check Python python3 3.4
|
---|
| 244 | ver_check Sed sed 4.1.5
|
---|
| 245 | ver_check Tar tar 1.22
|
---|
[4b1b794] | 246 | ver_check Texinfo texi2any 5.0
|
---|
[140e9a44] | 247 | ver_check Xz xz 5.0.0
|
---|
[271c856] | 248 | ver_kernel &min-kernel;
|
---|
[140e9a44] | 249 |
|
---|
[835e40c] | 250 | if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ]
|
---|
| 251 | then echo "OK: Linux Kernel supports UNIX 98 PTY";
|
---|
| 252 | else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi
|
---|
| 253 |
|
---|
[140e9a44] | 254 | alias_check() {
|
---|
| 255 | if $1 --version 2>&1 | grep -qi $2
|
---|
| 256 | then printf "OK: %-4s is $2\n" "$1";
|
---|
| 257 | else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
|
---|
| 258 | }
|
---|
| 259 | echo "Aliases:"
|
---|
| 260 | alias_check awk GNU
|
---|
| 261 | alias_check yacc Bison
|
---|
| 262 | alias_check sh Bash
|
---|
| 263 |
|
---|
[b789d88] | 264 | echo "Compiler check:"
|
---|
[140e9a44] | 265 | if printf "int main(){}" | g++ -x c++ -
|
---|
| 266 | then echo "OK: g++ works";
|
---|
| 267 | else echo "ERROR: g++ does NOT work"; fi
|
---|
[e70bf8f] | 268 | rm -f a.out
|
---|
| 269 |
|
---|
| 270 | if [ "$(nproc)" = "" ]; then
|
---|
| 271 | echo "ERROR: nproc is not available or it produces empty output"
|
---|
| 272 | else
|
---|
| 273 | echo "OK: nproc reports $(nproc) logical cores are available"
|
---|
| 274 | fi</literal>
|
---|
[3d2cea9] | 275 | EOF
|
---|
| 276 |
|
---|
| 277 | bash version-check.sh</userinput></screen>
|
---|
| 278 |
|
---|
[7c92d6d] | 279 | </sect2>
|
---|
[d1ebcc8] | 280 | </sect1>
|
---|