aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/generalinstructions.xml
blob: c8443dadc64f352b90afaacc7b793ae72e349d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>General Compilation Instructions</title>

  <para>When building packages there are several assumptions made within 
  the instructions:</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>
  </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&mdash;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>

    <important>
      <para>After installing each package, delete its source and build
      directories, unless specifically instructed otherwise. Deleting the
      sources prevents mis-configuration when the same package is reinstalled
      later.</para>
    </important>
  </listitem>

  <listitem>
    <para>Check one last time that the <envar>LFS</envar> environment variable
    is set up properly:</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>
  </listitem>

  <listitem>

    <para>Finally, two last important items must be emphasized:</para>

    <important>
      <para>The build instructions assume that the <command>bash</command> 
      shell is in use.</para>
    </important>

    <important>
      <para>Before issuing the build instructions for a package, the package
      should be unpacked as user <systemitem class="username">lfs</systemitem>,
      and a <command>cd</command> into the created directory should be
      performed.</para>
    </important>
  </listitem>

  </itemizedlist>

  <para>To re-emphasize the build process:</para>

<screen role="nodump">
1. Place all the sources and patches in a directory that will be accessible from the 
   chroot envronment such as /mnt/lfs/sources/.  Do <emphasis>not</emphasis> put sources in /mnt/lfs/tools/.
2. Change to the sources directory.
3. For each package:
   a. Using the tar program, extract the package to be built.
   b. Change to the directory created when the package was extracted.
   c. Follow the book's instructions for building the package.
   d. Change back to the sources directory.
   e. Delete the extracted source directory and any &lt;package&gt;-build 
      directories that were created in the build process.</screen>

</sect1>