[3c63868] | 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 |
|
---|
[12fff1e] | 8 | <sect1 id="ch-tools-generalinstructions"
|
---|
| 9 | xreflabel="General Compilation Instructions">
|
---|
[3c63868] | 10 | <?dbhtml filename="generalinstructions.html"?>
|
---|
| 11 |
|
---|
| 12 | <title>General Compilation Instructions</title>
|
---|
| 13 |
|
---|
[cc0e77d] | 14 | <para>Here are some things you should know about building each package:</para>
|
---|
[3c63868] | 15 |
|
---|
| 16 | <itemizedlist>
|
---|
| 17 |
|
---|
| 18 | <listitem>
|
---|
[cc0e77d] | 19 | <para>Several packages are patched before compilation, but only when
|
---|
[3c63868] | 20 | the patch is needed to circumvent a problem. A patch is often needed in
|
---|
[cc0e77d] | 21 | both the current and the following chapters, but sometimes, when the same package
|
---|
| 22 | is built more than once, the patch is not needed right away.
|
---|
[3c63868] | 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
|
---|
[cc0e77d] | 26 | not worry about these warnings; the patch was still successfully
|
---|
[3c63868] | 27 | applied.</para>
|
---|
| 28 | </listitem>
|
---|
| 29 |
|
---|
| 30 | <listitem>
|
---|
[cc0e77d] | 31 | <para>During the compilation of most packages, some
|
---|
| 32 | warnings will scroll by on the screen. These are normal and can safely be
|
---|
| 33 | ignored. These warnings are usually about
|
---|
[3c63868] | 34 | deprecated, but not invalid, use of the C or C++ syntax. C standards change
|
---|
[cc0e77d] | 35 | fairly often, and some packages have not yet been updated. This is not a
|
---|
| 36 | serious problem, but it does cause the warnings to appear.</para>
|
---|
[3c63868] | 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 |
|
---|
[0d84af1] | 52 | <para>Finally, two important items must be emphasized:</para>
|
---|
[16471f8] | 53 |
|
---|
| 54 | <important>
|
---|
[79bfd82] | 55 |
|
---|
| 56 | <para>The build instructions assume that the <xref
|
---|
[afcfd74] | 57 | linkend='ch-partitioning-hostreqs'/>, including symbolic links, have
|
---|
| 58 | been set properly:</para>
|
---|
[2ca8941] | 59 |
|
---|
[79bfd82] | 60 | <itemizedlist role='important'>
|
---|
| 61 |
|
---|
| 62 | <listitem override='bullet'><para><command>bash</command> is the shell
|
---|
| 63 | in use.</para></listitem>
|
---|
[2ca8941] | 64 |
|
---|
[79bfd82] | 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
|
---|
[cc0e77d] | 72 | symbolic link to <command>bison</command>, or to a small script that
|
---|
[79bfd82] | 73 | executes bison.</para></listitem>
|
---|
| 74 |
|
---|
| 75 | </itemizedlist>
|
---|
[16471f8] | 76 | </important>
|
---|
[3c63868] | 77 |
|
---|
| 78 | <important>
|
---|
[cc0e77d] | 79 | <para>Here is a synopsis of the build process.</para>
|
---|
[4df26333] | 80 |
|
---|
| 81 | <orderedlist numeration="arabic" spacing="compact">
|
---|
| 82 | <listitem>
|
---|
| 83 | <para>Place all the sources and patches in a directory that will be
|
---|
[cc0e77d] | 84 | accessible from the chroot environment, such as
|
---|
[c37e846] | 85 | <filename class="directory">/mnt/lfs/sources/</filename>.<!-- Do
|
---|
[4df26333] | 86 | <emphasis>not</emphasis> put sources in
|
---|
[c37e846] | 87 | <filename class="directory">/mnt/lfs/tools/</filename>. --></para>
|
---|
[4df26333] | 88 | </listitem>
|
---|
| 89 | <listitem>
|
---|
[cc0e77d] | 90 | <para>Change to the <filename class="directory">/mnt/lfs/sources/</filename> directory.</para>
|
---|
[4df26333] | 91 | </listitem>
|
---|
[3380af3] | 92 | <listitem id='buildinstr' xreflabel='Package build instructions'>
|
---|
[4df26333] | 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
|
---|
[3543e03] | 97 | to be built. In <xref linkend="chapter-cross-tools"/> and
|
---|
[a665a20] | 98 | <xref linkend="chapter-temporary-tools"/>, ensure you are
|
---|
[79524a0] | 99 | the <emphasis>lfs</emphasis> user when extracting the package.</para>
|
---|
[cc0e77d] | 100 | <para>Do not use any method except the <command>tar</command> command
|
---|
| 101 | to extract the source code. Notably, using the <command>cp -R</command>
|
---|
| 102 | command to copy the
|
---|
[25dc9a8] | 103 | source code tree somewhere else can destroy links and
|
---|
[cc0e77d] | 104 | timestamps in the source tree, and cause the build to fail.</para>
|
---|
[4df26333] | 105 | </listitem>
|
---|
| 106 | <listitem>
|
---|
| 107 | <para>Change to the directory created when the package was
|
---|
| 108 | extracted.</para>
|
---|
| 109 | </listitem>
|
---|
| 110 | <listitem>
|
---|
[cc0e77d] | 111 | <para>Follow the instructions for building the package.</para>
|
---|
[4df26333] | 112 | </listitem>
|
---|
| 113 | <listitem>
|
---|
[cc0e77d] | 114 | <para>Change back to the sources directory when the build is complete.</para>
|
---|
[4df26333] | 115 | </listitem>
|
---|
| 116 | <listitem>
|
---|
[f1dd547] | 117 | <para>Delete the extracted source directory unless instructed otherwise.</para>
|
---|
[4df26333] | 118 | </listitem>
|
---|
| 119 | </orderedlist>
|
---|
| 120 | </listitem>
|
---|
| 121 | </orderedlist>
|
---|
[3c63868] | 122 | </important>
|
---|
| 123 | </listitem>
|
---|
| 124 |
|
---|
| 125 | </itemizedlist>
|
---|
| 126 |
|
---|
| 127 | </sect1>
|
---|