[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 |
|
---|
| 8 | <sect1 id="ch-tools-generalinstructions">
|
---|
| 9 | <?dbhtml filename="generalinstructions.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>General Compilation Instructions</title>
|
---|
| 12 |
|
---|
| 13 | <para>When building packages there are several assumptions made within
|
---|
| 14 | the instructions:</para>
|
---|
| 15 |
|
---|
| 16 | <itemizedlist>
|
---|
| 17 |
|
---|
| 18 | <listitem>
|
---|
| 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
|
---|
| 26 | applied.</para>
|
---|
| 27 | </listitem>
|
---|
| 28 |
|
---|
| 29 | <listitem>
|
---|
| 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>
|
---|
| 36 |
|
---|
| 37 | <important>
|
---|
| 38 | <para>After installing each package, delete its source and build
|
---|
| 39 | directories, unless specifically instructed otherwise. Deleting the
|
---|
| 40 | sources prevents mis-configuration when the same package is reinstalled
|
---|
| 41 | later.</para>
|
---|
| 42 | </important>
|
---|
| 43 | </listitem>
|
---|
| 44 |
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Check one last time that the <envar>LFS</envar> environment variable
|
---|
| 47 | is set up properly:</para>
|
---|
| 48 |
|
---|
| 49 | <screen role="nodump"><userinput>echo $LFS</userinput></screen>
|
---|
| 50 |
|
---|
| 51 | <para>Make sure the output shows the path to the LFS partition's mount
|
---|
| 52 | point, which is <filename class="directory">/mnt/lfs</filename>, using our
|
---|
| 53 | example.</para>
|
---|
| 54 | </listitem>
|
---|
| 55 |
|
---|
| 56 | <listitem>
|
---|
| 57 |
|
---|
[16471f8] | 58 | <para>Finally, two last important items must be emphasized:</para>
|
---|
| 59 |
|
---|
| 60 | <important>
|
---|
| 61 | <para>The build instructions assume that the <command>bash</command>
|
---|
| 62 | shell is in use.</para>
|
---|
| 63 | </important>
|
---|
[3c63868] | 64 |
|
---|
| 65 | <important>
|
---|
| 66 | <para>Before issuing the build instructions for a package, the package
|
---|
| 67 | should be unpacked as user <systemitem class="username">lfs</systemitem>,
|
---|
| 68 | and a <command>cd</command> into the created directory should be
|
---|
[16471f8] | 69 | performed.</para>
|
---|
[3c63868] | 70 | </important>
|
---|
| 71 | </listitem>
|
---|
| 72 |
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
[2e7ca50] | 75 | <para>To re-emphasize the build process:</para>
|
---|
| 76 |
|
---|
| 77 | <screen role="nodump">
|
---|
| 78 | 1. Place all the sources and patches in a directory that will be accessible from the
|
---|
| 79 | chroot envronment such as /mnt/lfs/sources/. Do <emphasis>not</emphasis> put sources in /mnt/lfs/tools/.
|
---|
| 80 | 2. Change to the sources directory.
|
---|
| 81 | 3. For each package:
|
---|
| 82 | a. Using the tar program, extract the package to be built.
|
---|
| 83 | b. Change to the directory created when the package was extracted.
|
---|
| 84 | c. Follow the book's instructions for building the package.
|
---|
| 85 | d. Change back to the sources directory.
|
---|
| 86 | e. Delete the extracted source directory and any <package>-build
|
---|
| 87 | directories that were created in the build process.</screen>
|
---|
| 88 |
|
---|
[3c63868] | 89 | </sect1>
|
---|