source: part3intro/generalinstructions.xml@ cc0e77d

11.3 11.3-rc1 multilib trunk xry111/arm64 xry111/clfs-ng xry111/glibc-2.37 xry111/kcfg-revise xry111/pip3 xry111/rust-wip-20221008
Last change on this file since cc0e77d was cc0e77d, checked in by David Bryant <davidbryant@…>, 6 months ago

Fix English idiom / clarify "General Instructions" section.

  • Property mode set to 100644
File size: 5.1 KB
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
8<sect1 id="ch-tools-generalinstructions"
9 xreflabel="General Compilation Instructions">
10 <?dbhtml filename="generalinstructions.html"?>
12 <title>General Compilation Instructions</title>
14 <para>Here are some things you should know about building each package:</para>
16 <itemizedlist>
18 <listitem>
19 <para>Several 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 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.
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; the patch was still successfully
27 applied.</para>
28 </listitem>
30 <listitem>
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
34 deprecated, but not invalid, use of the C or C++ syntax. C standards change
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>
37 </listitem>
39 <listitem>
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
47 example.</para>
48 </listitem>
50 <listitem>
52 <para>Finally, two important items must be emphasized:</para>
54 <important>
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 to a small script that
73 executes bison.</para></listitem>
75 </itemizedlist>
76 </important>
78 <important>
79 <para>Here is a synopsis of the build process.</para>
81 <orderedlist numeration="arabic" spacing="compact">
82 <listitem>
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>
88 </listitem>
89 <listitem>
90 <para>Change to the <filename class="directory">/mnt/lfs/sources/</filename> directory.</para>
91 </listitem>
92 <listitem id='buildinstr' xreflabel='Package build instructions'>
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
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>
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
103 source code tree somewhere else can destroy links and
104 timestamps in the source tree, and cause the build to fail.</para>
105 </listitem>
106 <listitem>
107 <para>Change to the directory created when the package was
108 extracted.</para>
109 </listitem>
110 <listitem>
111 <para>Follow the instructions for building the package.</para>
112 </listitem>
113 <listitem>
114 <para>Change back to the sources directory when the build is complete.</para>
115 </listitem>
116 <listitem>
117 <para>Delete the extracted source directory unless instructed otherwise.</para>
118 </listitem>
119 </orderedlist>
120 </listitem>
121 </orderedlist>
122 </important>
123 </listitem>
125 </itemizedlist>
Note: See TracBrowser for help on using the repository browser.