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">
8 <sect1 id="ch-tools-generalinstructions"
9 xreflabel="General Compilation Instructions">
10 <?dbhtml filename="generalinstructions.html"?>
12 <title>General Compilation Instructions</title>
14 <para>When building packages there are several assumptions made within
15 the instructions:</para>
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
22 both this and the following chapters, but sometimes in only one location.
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
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>
40 <para>Check one last time that the <envar>LFS</envar> environment variable
41 is set up properly:</para>
43 <screen role="nodump"><userinput>echo $LFS</userinput></screen>
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
52 <para>Finally, two important items must be emphasized:</para>
56 <para>The build instructions assume that the <xref
57 linkend='ch-partitioning-hostreqs'/>, including symbolic links, have
58 been set properly:</para>
60 <itemizedlist role='important'>
62 <listitem override='bullet'><para><command>bash</command> is the shell
63 in use.</para></listitem>
65 <listitem override='bullet'><para><command>sh</command> is a symbolic
66 link to <command>bash</command>.</para></listitem>
68 <listitem override='bullet'><para><command>/usr/bin/awk</command> is a
69 symbolic link to <command>gawk</command>.</para></listitem>
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>
79 <para>To re-emphasize the build process:</para>
81 <orderedlist numeration="arabic" spacing="compact">
83 <para>Place all the sources and patches in a directory that will be
84 accessible from the chroot environment such as
85 <filename class="directory">/mnt/lfs/sources/</filename>.<!-- Do
86 <emphasis>not</emphasis> put sources in
87 <filename class="directory">/mnt/lfs/tools/</filename>. --></para>
90 <para>Change to the sources directory.</para>
92 <listitem id='buildinstr' xreflabel='Package build instructions'>
93 <para>For each package:</para>
94 <orderedlist numeration="loweralpha" spacing="compact">
96 <para>Using the <command>tar</command> program, extract the package
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>
102 <para>Change to the directory created when the package was
106 <para>Follow the book's instructions for building the package.</para>
109 <para>Change back to the sources directory.</para>
112 <para>Delete the extracted source directory unless instructed otherwise.</para>