generalinstructions.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?xml version="1.0" encoding="UTF-8"?>
  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. <?dbhtml filename="generalinstructions.html"?>
  9. <title>通用构建说明</title>
  10. <!--para>When building packages there are several assumptions made within
  11. the instructions:</para-->
  12. <para>在构建软件包时,本书提供的命令基于下列假设:</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 next chapter, but sometimes in only one or the other.
  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. <para>某些软件包在编译前需要打补丁,然而补丁只在绕过特定问题时才需要。
  24. 多数补丁在本章和下一章都要应用,然而个别时候只在其中一章使用。
  25. 因此,如果发现本书给出的指示中没有使用某个下载好的补丁,
  26. 这是正常的,不必担心。
  27. 在应用补丁时可能会出现关于 <emphasis>offset</emphasis>
  28. 或者 <emphasis>fuzz</emphasis> 的警告信息,不用担心这些警告,
  29. 补丁还是会成功应用到源码上的。</para>
  30. </listitem>
  31. <listitem>
  32. <!--para>During the compilation of most packages, there will be several
  33. warnings that scroll by on the screen. These are normal and can safely be
  34. ignored. These warnings are as they appear&mdash;warnings about
  35. deprecated, but not invalid, use of the C or C++ syntax. C standards change
  36. fairly often, and some packages still use the older standard. This is not a
  37. problem, but does prompt the warning.</para-->
  38. <para>在编译大多数软件包时,屏幕上都会出现一些警告。这是正常的,
  39. 可以放心地忽略。这些警告就像它们描述的那样,表明一些过时的,
  40. 但并不是错误的 C 或 C++ 语法。C 标准经常改变,
  41. 一些软件包仍然在使用旧的标准。这并不是一个严重的问题,
  42. 但确实会触发警告。</para>
  43. </listitem>
  44. <listitem>
  45. <!--para>Check one last time that the <envar>LFS</envar> environment variable
  46. is set up properly:</para-->
  47. <para>最后确认 <envar>LFS</envar> 环境变量是否配置正确:</para>
  48. <screen role="nodump"><userinput>echo $LFS</userinput></screen>
  49. <!--para>Make sure the output shows the path to the LFS partition's mount
  50. point, which is <filename class="directory">/mnt/lfs</filename>, using our
  51. example.</para-->
  52. <para>确认上述命令输出 LFS 分区挂载点的路径,如果使用了本书的例子,
  53. 就是 <filename class="directory">/mnt/lfs</filename>。</para>
  54. </listitem>
  55. <listitem>
  56. <!--para>Finally, two important items must be emphasized:</para-->
  57. <para>最后强调两个重要事项:</para>
  58. <important>
  59. <!--para>The build instructions assume that the <xref
  60. linkend='pre-hostreqs'/>, including symbolic links, have been set
  61. properly:</para-->
  62. <para>本书中的命令假设 <xref linkend='pre-hostreqs'/> 中的所有内容,
  63. 包括符号链接,都被正确设置:</para>
  64. <itemizedlist role='important'>
  65. <listitem override='bullet'><para><command>bash</command>
  66. 是正在使用的 shell。</para></listitem>
  67. <listitem override='bullet'><para><command>sh</command> 是指向
  68. <command>bash</command>的符号链接。</para></listitem>
  69. <listitem override='bullet'><para><command>/usr/bin/awk</command>
  70. 是指向 <command>gawk</command> 的符号链接。</para></listitem>
  71. <listitem override='bullet'><para><command>/usr/bin/yacc</command>
  72. 是指向 <command>bison</command> 的符号链接,或者一个执行 bison
  73. 的小脚本。</para></listitem>
  74. </itemizedlist>
  75. </important>
  76. <important>
  77. <para>再次强调构建过程:</para>
  78. <orderedlist numeration="arabic" spacing="compact">
  79. <listitem>
  80. <para>把所有的源码包和补丁放在一个能够从 chroot 环境访问的目录,
  81. 例如
  82. <filename class="directory">/mnt/lfs/sources/</filename>。
  83. <emphasis>不要</emphasis> 把源代码放在
  84. <filename class="directory">/mnt/lfs/tools/</filename> 中。</para>
  85. </listitem>
  86. <listitem>
  87. <para>切换到放着源码包的目录。</para>
  88. </listitem>
  89. <listitem id='buildinstr' xreflabel='软件包构建说明'>
  90. <para>对于每个软件包:</para>
  91. <orderedlist numeration="loweralpha" spacing="compact">
  92. <listitem>
  93. <para>使用 <command>tar</command> 程序,解压需要构建的软件包。
  94. 在第 5 章中解压软件包时,确认您以用户
  95. <emphasis>lfs</emphasis> 的身份登录。</para>
  96. </listitem>
  97. <listitem>
  98. <para>切换到解压源码包时产生的目录。</para>
  99. </listitem>
  100. <listitem>
  101. <para>根据书中的指示构建软件包。</para>
  102. </listitem>
  103. <listitem>
  104. <para>切换回包含所有源码包的目录。</para>
  105. </listitem>
  106. <listitem>
  107. <para>除非另有说明,删除解压出来的目录。</para>
  108. </listitem>
  109. </orderedlist>
  110. </listitem>
  111. </orderedlist>
  112. </important>
  113. </listitem>
  114. </itemizedlist>
  115. </sect1>