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 <?dbhtml filename="generalinstructions.html"?>
11 <title>General Compilation Instructions</title>
13 <para>When building packages there are several assumptions made within
14 the instructions:</para>
19 <para>Several of the packages are patched before compilation, but only when
20 the patch is needed to circumvent a problem. A patch is often needed in
21 both this and the next chapter, but sometimes in only one or the other.
22 Therefore, do not be concerned if instructions for a downloaded patch seem
23 to be missing. Warning messages about <emphasis>offset</emphasis> or
24 <emphasis>fuzz</emphasis> may also be encountered when applying a patch. Do
25 not worry about these warnings, as the patch was still successfully
30 <para>During the compilation of most packages, there will be several
31 warnings that scroll by on the screen. These are normal and can safely be
32 ignored. These warnings are as they appear—warnings about
33 deprecated, but not invalid, use of the C or C++ syntax. C standards change
34 fairly often, and some packages still use the older standard. This is not a
35 problem, but does prompt the warning.</para>
39 <para>Check one last time that the <envar>LFS</envar> environment variable
40 is set up properly:</para>
42 <screen role="nodump"><userinput>echo $LFS</userinput></screen>
44 <para>Make sure the output shows the path to the LFS partition's mount
45 point, which is <filename class="directory">/mnt/lfs</filename>, using our
51 <para>Finally, two last important items must be emphasized:</para>
55 <para>The build instructions assume that the <xref
56 linkend='pre-hostreqs'/>, including symbolic links, have been set
59 <itemizedlist role='important'>
61 <listitem override='bullet'><para><command>bash</command> is the shell
62 in use.</para></listitem>
64 <listitem override='bullet'><para><command>sh</command> is a symbolic
65 link to <command>bash</command>.</para></listitem>
67 <listitem override='bullet'><para><command>/usr/bin/awk</command> is a
68 symbolic link to <command>gawk</command>.</para></listitem>
70 <listitem override='bullet'><para><command>/usr/bin/yacc</command> is a
71 symbolic link to <command>bison</command> or a small script that
72 executes bison.</para></listitem>
78 <para>To re-emphasize the build process:</para>
80 <orderedlist numeration="arabic" spacing="compact">
82 <para>Place all the sources and patches in a directory that will be
83 accessible from the chroot environment such as
84 <filename class="directory">/mnt/lfs/sources/</filename>. Do
85 <emphasis>not</emphasis> put sources in
86 <filename class="directory">/mnt/lfs/tools/</filename>.</para>
89 <para>Change to the sources directory.</para>
91 <listitem id='buildinstr' xreflabel='Package build instructions'>
92 <para>For each package:</para>
93 <orderedlist numeration="loweralpha" spacing="compact">
95 <para>Using the <command>tar</command> program, extract the package
96 to be built. In Chapter 5, ensure you are the <emphasis>lfs</emphasis>
97 user when extracting the package.</para>
100 <para>Change to the directory created when the package was
104 <para>Follow the book's instructions for building the package.</para>
107 <para>Change back to the sources directory.</para>
110 <para>Delete the extracted source directory and any
111 <filename class="directory"><replaceable><package></replaceable>-build</filename>
112 directories that were created in the build process unless instructed otherwise.</para>