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