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