hostreqs.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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. <sect1 id="pre-hostreqs" xreflabel="Host System Requirements">
  8. <?dbhtml filename="hostreqs.html"?>
  9. <title>Host System Requirements</title>
  10. <para>Your host system should have the following software with the
  11. minimum versions indicated. This should not be an issue for most
  12. modern Linux distributions. Also note that many distributions will
  13. place software headers into separate packages, often in the form of
  14. <quote>&lt;package-name&gt;-devel</quote> or
  15. <quote>&lt;package-name&gt;-dev</quote>. Be sure to install those if
  16. your distribution provides them.</para>
  17. <para>Earlier versions of the listed software packages may work, but have
  18. not been tested.</para>
  19. <itemizedlist spacing="compact">
  20. <listitem>
  21. <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
  22. should be a symbolic or hard link to bash)</para>
  23. </listitem>
  24. <listitem>
  25. <para><emphasis role="strong">Binutils-2.17</emphasis> (Versions
  26. greater than &binutils-version; are not recommended as they have
  27. not been tested)</para>
  28. </listitem>
  29. <listitem>
  30. <para><emphasis role="strong">Bison-2.3</emphasis> (/usr/bin/yacc
  31. should be a link to bison or small script that executes bison)</para>
  32. </listitem>
  33. <listitem>
  34. <para><emphasis role="strong">Bzip2-1.0.4</emphasis></para>
  35. </listitem>
  36. <listitem>
  37. <para><emphasis role="strong">Coreutils-6.9</emphasis></para>
  38. </listitem>
  39. <listitem>
  40. <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
  41. </listitem>
  42. <listitem>
  43. <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
  44. </listitem>
  45. <listitem>
  46. <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
  47. should be a link to gawk)</para>
  48. </listitem>
  49. <listitem>
  50. <para><emphasis role="strong">GCC-4.7</emphasis> including the C++
  51. compiler, <command>g++</command> (Versions greater than &gcc-version; are
  52. not recommended as they have not been tested)</para>
  53. <!--
  54. <note><para>On some distributions, there have been reports that some
  55. libraries used by gcc can be in an inconsistent state and that this
  56. interferes with building some LFS packages. To check this, look in
  57. /usr/lib and possibly /usr/lib64 for libgmp.la, libmpfr.la, and
  58. libmpc.la. Either all three should be present or absent, but not only
  59. one or two. If the problem exists on your system, either rename or
  60. delete the .la files or install the appropriate missing
  61. package.</para></note>
  62. -->
  63. </listitem>
  64. <listitem>
  65. <para><emphasis role="strong">Glibc-2.11</emphasis> (Versions
  66. greater than &glibc-version; are not recommended as they have
  67. not been tested)</para>
  68. </listitem>
  69. <listitem>
  70. <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
  71. </listitem>
  72. <listitem>
  73. <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
  74. </listitem>
  75. <listitem>
  76. <para><emphasis role="strong">Linux Kernel-&min-kernel;</emphasis></para>
  77. <para>The reason for the kernel version requirement is that we specify
  78. that version when building <application>glibc</application> in Chapter 6
  79. at the recommendation of the developers. It is also required by
  80. udev.</para>
  81. <para>If the host kernel is earlier than &min-kernel; you will need to replace
  82. the kernel with a more up to date version. There are two ways
  83. you can go about this. First, see if your Linux vendor provides a &min-kernel;
  84. or later kernel package. If so, you may wish to install it. If your
  85. vendor doesn't offer an acceptable kernel package, or you would prefer not to
  86. install it, you can compile a kernel yourself. Instructions for
  87. compiling the kernel and configuring the boot loader (assuming the host
  88. uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
  89. </listitem>
  90. <listitem>
  91. <para><emphasis role="strong">M4-1.4.10</emphasis></para>
  92. </listitem>
  93. <listitem>
  94. <para><emphasis role="strong">Make-3.81</emphasis></para>
  95. </listitem>
  96. <listitem>
  97. <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
  98. </listitem>
  99. <listitem>
  100. <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
  101. </listitem>
  102. <listitem>
  103. <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
  104. </listitem>
  105. <listitem>
  106. <para><emphasis role="strong">Tar-1.22</emphasis></para>
  107. </listitem>
  108. <listitem>
  109. <para><emphasis role="strong">Texinfo-4.7</emphasis></para>
  110. </listitem>
  111. <listitem>
  112. <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
  113. </listitem>
  114. </itemizedlist>
  115. <important>
  116. <para>Note that the symlinks mentioned above are required to build an LFS
  117. system using the instructions contained within this book. Symlinks that
  118. point to other software (such as dash, mawk, etc.) may work, but are not
  119. tested or supported by the LFS development team, and may require either
  120. deviation from the instructions or additional patches to some
  121. packages.</para>
  122. </important>
  123. <!-- Use an empty sect2 element to prevent a pdf warning. -->
  124. <bridgehead renderas="sect2"
  125. id="version-check"
  126. xreflabel="Host System Requirements">
  127. </bridgehead>
  128. <!--<title> </title>-->
  129. <para >To see whether your host system has all the appropriate versions, and
  130. the ability to compile programs, run the following:</para>
  131. <!-- ANY additional lines in the script cause a pdf rendering problem-->
  132. <screen role="nodump"><userinput>cat &gt; version-check.sh &lt;&lt; "EOF"
  133. <literal>#!/bin/bash
  134. # Simple script to list version numbers of critical development tools
  135. export LC_ALL=C
  136. bash --version | head -n1 | cut -d" " -f2-4
  137. MYSH=$(readlink -f /bin/sh)
  138. echo "/bin/sh -&gt; $MYSH"
  139. echo $MYSH | grep -q bash || echo "ERROR: /bin/sh does not point to bash"
  140. unset MYSH
  141. echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
  142. bison --version | head -n1
  143. if [ -h /usr/bin/yacc ]; then
  144. echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
  145. elif [ -x /usr/bin/yacc ]; then
  146. echo yacc is `/usr/bin/yacc --version | head -n1`
  147. else
  148. echo "yacc not found"
  149. fi
  150. bzip2 --version 2&gt;&amp;1 &lt; /dev/null | head -n1 | cut -d" " -f1,6-
  151. echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
  152. diff --version | head -n1
  153. find --version | head -n1
  154. gawk --version | head -n1
  155. if [ -h /usr/bin/awk ]; then
  156. echo "/usr/bin/awk -&gt; `readlink -f /usr/bin/awk`";
  157. elif [ -x /usr/bin/awk ]; then
  158. echo awk is `/usr/bin/awk --version | head -n1`
  159. else
  160. echo "awk not found"
  161. fi
  162. gcc --version | head -n1
  163. g++ --version | head -n1
  164. ldd --version | head -n1 | cut -d" " -f2- # glibc version
  165. grep --version | head -n1
  166. gzip --version | head -n1
  167. cat /proc/version
  168. m4 --version | head -n1
  169. make --version | head -n1
  170. patch --version | head -n1
  171. echo Perl `perl -V:version`
  172. sed --version | head -n1
  173. tar --version | head -n1
  174. makeinfo --version | head -n1
  175. xz --version | head -n1
  176. <?hard-pagebreak?>
  177. echo 'int main(){}' &gt; dummy.c &amp;&amp; g++ -o dummy dummy.c
  178. if [ -x dummy ]
  179. then echo "g++ compilation OK";
  180. else echo "g++ compilation failed"; fi
  181. rm -f dummy.c dummy</literal>
  182. EOF
  183. bash version-check.sh</userinput></screen>
  184. <!--
  185. <para>Also check for some library consistency:</para>
  186. <screen role="nodump"><userinput>cat &gt; library-check.sh &lt;&lt; "EOF"
  187. <literal>#!/bin/bash
  188. for lib in lib{gmp,mpfr,mpc}.la; do
  189. echo $lib: $(if find /usr/lib* -name $lib|
  190. grep -q $lib;then :;else echo not;fi) found
  191. done
  192. unset lib</literal>
  193. EOF
  194. bash library-check.sh</userinput></screen>
  195. <para>The files identified by this script should be all present
  196. or all absent, but not only one or two present.</para>
  197. -->
  198. </sect1>