generalinstructions.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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="ch-tools-generalinstructions"
  8. xreflabel="General Compilation Instructions">
  9. <?dbhtml filename="generalinstructions.html"?>
  10. <title>General Compilation Instructions</title>
  11. <para>When building packages there are several assumptions made within
  12. the instructions:</para>
  13. <itemizedlist>
  14. <listitem>
  15. <para>Several of the packages are patched before compilation, but only when
  16. the patch is needed to circumvent a problem. A patch is often needed in
  17. both this and the following chapters, but sometimes in only one location.
  18. Therefore, do not be concerned if instructions for a downloaded patch seem
  19. to be missing. Warning messages about <emphasis>offset</emphasis> or
  20. <emphasis>fuzz</emphasis> may also be encountered when applying a patch. Do
  21. not worry about these warnings, as the patch was still successfully
  22. applied.</para>
  23. </listitem>
  24. <listitem>
  25. <para>During the compilation of most packages, there will be several
  26. warnings that scroll by on the screen. These are normal and can safely be
  27. ignored. These warnings are as they appear&mdash;warnings about
  28. deprecated, but not invalid, use of the C or C++ syntax. C standards change
  29. fairly often, and some packages still use the older standard. This is not a
  30. problem, but does prompt the warning.</para>
  31. </listitem>
  32. <listitem>
  33. <para>Check one last time that the <envar>LFS</envar> environment variable
  34. is set up properly:</para>
  35. <screen role="nodump"><userinput>echo $LFS</userinput></screen>
  36. <para>Make sure the output shows the path to the LFS partition's mount
  37. point, which is <filename class="directory">/mnt/lfs</filename>, using our
  38. example.</para>
  39. </listitem>
  40. <listitem>
  41. <para>Finally, two important items must be emphasized:</para>
  42. <important>
  43. <para>The build instructions assume that the <xref
  44. linkend='ch-partitioning-hostreqs'/>, including symbolic links, have
  45. been set properly:</para>
  46. <itemizedlist role='important'>
  47. <listitem override='bullet'><para><command>bash</command> is the shell
  48. in use.</para></listitem>
  49. <listitem override='bullet'><para><command>sh</command> is a symbolic
  50. link to <command>bash</command>.</para></listitem>
  51. <listitem override='bullet'><para><command>/usr/bin/awk</command> is a
  52. symbolic link to <command>gawk</command>.</para></listitem>
  53. <listitem override='bullet'><para><command>/usr/bin/yacc</command> is a
  54. symbolic link to <command>bison</command> or a small script that
  55. executes bison.</para></listitem>
  56. </itemizedlist>
  57. </important>
  58. <important>
  59. <para>To re-emphasize the build process:</para>
  60. <orderedlist numeration="arabic" spacing="compact">
  61. <listitem>
  62. <para>Place all the sources and patches in a directory that will be
  63. accessible from the chroot environment such as
  64. <filename class="directory">/mnt/lfs/sources/</filename>.<!-- Do
  65. <emphasis>not</emphasis> put sources in
  66. <filename class="directory">/mnt/lfs/tools/</filename>. --></para>
  67. </listitem>
  68. <listitem>
  69. <para>Change to the sources directory.</para>
  70. </listitem>
  71. <listitem id='buildinstr' xreflabel='Package build instructions'>
  72. <para>For each package:</para>
  73. <orderedlist numeration="loweralpha" spacing="compact">
  74. <listitem>
  75. <para>Using the <command>tar</command> program, extract the package
  76. to be built. In <xref linkend="chapter-cross-tools"/> and
  77. <xref linkend="chapter-temporary-tools"/>, ensure you are
  78. the <emphasis>lfs</emphasis> user when extracting the package.</para>
  79. </listitem>
  80. <listitem>
  81. <para>Change to the directory created when the package was
  82. extracted.</para>
  83. </listitem>
  84. <listitem>
  85. <para>Follow the book's instructions for building the package.</para>
  86. </listitem>
  87. <listitem>
  88. <para>Change back to the sources directory.</para>
  89. </listitem>
  90. <listitem>
  91. <para>Delete the extracted source directory unless instructed otherwise.</para>
  92. </listitem>
  93. </orderedlist>
  94. </listitem>
  95. </orderedlist>
  96. </important>
  97. </listitem>
  98. </itemizedlist>
  99. </sect1>