123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-tools-generalinstructions">
- <?dbhtml filename="generalinstructions.html"?>
- <title>通用构建说明</title>
- <!--para>When building packages there are several assumptions made within
- the instructions:</para-->
- <para>在构建软件包时,本书提供的命令基于下列假设:</para>
- <itemizedlist>
- <listitem>
- <!--para>Several of the packages are patched before compilation, but only when
- the patch is needed to circumvent a problem. A patch is often needed in
- both this and the next chapter, but sometimes in only one or the other.
- Therefore, do not be concerned if instructions for a downloaded patch seem
- to be missing. Warning messages about <emphasis>offset</emphasis> or
- <emphasis>fuzz</emphasis> may also be encountered when applying a patch. Do
- not worry about these warnings, as the patch was still successfully
- applied.</para-->
- <para>某些软件包在编译前需要打补丁,然而补丁只在绕过特定问题时才需要。
- 多数补丁在本章和下一章都要应用,然而个别时候只在其中一章使用。
- 因此,如果发现本书给出的指示中没有使用某个下载好的补丁,
- 这是正常的,不必担心。
- 在应用补丁时可能会出现关于 <emphasis>offset</emphasis>
- 或者 <emphasis>fuzz</emphasis> 的警告信息,不用担心这些警告,
- 补丁还是会成功应用到源码上的。</para>
- </listitem>
- <listitem>
- <!--para>During the compilation of most packages, there will be several
- warnings that scroll by on the screen. These are normal and can safely be
- ignored. These warnings are as they appear—warnings about
- deprecated, but not invalid, use of the C or C++ syntax. C standards change
- fairly often, and some packages still use the older standard. This is not a
- problem, but does prompt the warning.</para-->
- <para>在编译大多数软件包时,屏幕上都会出现一些警告。这是正常的,
- 可以放心地忽略。这些警告就像它们描述的那样,表明一些过时的,
- 但并不是错误的 C 或 C++ 语法。C 标准经常改变,
- 一些软件包仍然在使用旧的标准。这并不是一个严重的问题,
- 但确实会触发警告。</para>
- </listitem>
- <listitem>
- <!--para>Check one last time that the <envar>LFS</envar> environment variable
- is set up properly:</para-->
- <para>最后确认 <envar>LFS</envar> 环境变量是否配置正确:</para>
- <screen role="nodump"><userinput>echo $LFS</userinput></screen>
- <!--para>Make sure the output shows the path to the LFS partition's mount
- point, which is <filename class="directory">/mnt/lfs</filename>, using our
- example.</para-->
- <para>确认上述命令输出 LFS 分区挂载点的路径,如果使用了本书的例子,
- 就是 <filename class="directory">/mnt/lfs</filename>。</para>
- </listitem>
- <listitem>
- <!--para>Finally, two important items must be emphasized:</para-->
- <para>最后强调两个重要事项:</para>
- <important>
- <!--para>The build instructions assume that the <xref
- linkend='pre-hostreqs'/>, including symbolic links, have been set
- properly:</para-->
- <para>本书中的命令假设 <xref linkend='pre-hostreqs'/> 中的所有内容,
- 包括符号链接,都被正确设置:</para>
- <itemizedlist role='important'>
- <listitem override='bullet'><para><command>bash</command>
- 是正在使用的 shell。</para></listitem>
- <listitem override='bullet'><para><command>sh</command> 是指向
- <command>bash</command>的符号链接。</para></listitem>
- <listitem override='bullet'><para><command>/usr/bin/awk</command>
- 是指向 <command>gawk</command> 的符号链接。</para></listitem>
- <listitem override='bullet'><para><command>/usr/bin/yacc</command>
- 是指向 <command>bison</command> 的符号链接,或者一个执行 bison
- 的小脚本。</para></listitem>
- </itemizedlist>
- </important>
- <important>
- <para>再次强调构建过程:</para>
- <orderedlist numeration="arabic" spacing="compact">
- <listitem>
- <para>把所有的源码包和补丁放在一个能够从 chroot 环境访问的目录,
- 例如
- <filename class="directory">/mnt/lfs/sources/</filename>。
- <emphasis>不要</emphasis> 把源代码放在
- <filename class="directory">/mnt/lfs/tools/</filename> 中。</para>
- </listitem>
- <listitem>
- <para>切换到放着源码包的目录。</para>
- </listitem>
- <listitem id='buildinstr' xreflabel='软件包构建说明'>
- <para>对于每个软件包:</para>
- <orderedlist numeration="loweralpha" spacing="compact">
- <listitem>
- <para>使用 <command>tar</command> 程序,解压需要构建的软件包。
- 在第 5 章中解压软件包时,确认您以用户
- <emphasis>lfs</emphasis> 的身份登录。</para>
- </listitem>
- <listitem>
- <para>切换到解压源码包时产生的目录。</para>
- </listitem>
- <listitem>
- <para>根据书中的指示构建软件包。</para>
- </listitem>
- <listitem>
- <para>切换回包含所有源码包的目录。</para>
- </listitem>
- <listitem>
- <para>除非另有说明,删除解压出来的目录。</para>
- </listitem>
- </orderedlist>
- </listitem>
- </orderedlist>
- </important>
- </listitem>
- </itemizedlist>
- </sect1>
|