source: part3intro/generalinstructions.xml@ c37e846

11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 bdubbs/gcc13 multilib renodr/libudev-from-systemd trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since c37e846 was c37e846, checked in by Pierre Labastie <pierre.labastie@…>, 20 months ago

Replace tabs with spaces

  • Property mode set to 100644
File size: 5.0 KB
Line 
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 xreflabel="General Compilation Instructions">
10 <?dbhtml filename="generalinstructions.html"?>
11
12 <title>General Compilation Instructions</title>
13
14 <para>When building packages there are several assumptions made within
15 the instructions:</para>
16
17 <itemizedlist>
18
19 <listitem>
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
27 applied.</para>
28 </listitem>
29
30 <listitem>
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&mdash;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>
37 </listitem>
38
39 <listitem>
40 <para>Check one last time that the <envar>LFS</envar> environment variable
41 is set up properly:</para>
42
43<screen role="nodump"><userinput>echo $LFS</userinput></screen>
44
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>
49
50 <listitem>
51
52 <para>Finally, two important items must be emphasized:</para>
53
54 <important>
55
56 <para>The build instructions assume that the <xref
57 linkend='ch-partitioning-hostreqs'/>, including symbolic links, have
58 been set properly:</para>
59
60 <itemizedlist role='important'>
61
62 <listitem override='bullet'><para><command>bash</command> is the shell
63 in use.</para></listitem>
64
65 <listitem override='bullet'><para><command>sh</command> is a symbolic
66 link to <command>bash</command>.</para></listitem>
67
68 <listitem override='bullet'><para><command>/usr/bin/awk</command> is a
69 symbolic link to <command>gawk</command>.</para></listitem>
70
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>
74
75 </itemizedlist>
76 </important>
77
78 <important>
79 <para>To re-emphasize the build process:</para>
80
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 sources 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>All methods to get the source code tree being built
101 in-position, except extracting the package tarball, are not
102 supported. Notably, using <command>cp -R</command> to copy the
103 source code tree somewhere else can destroy links and
104 timestamps in the sources tree and cause building
105 failure.</para>
106 </listitem>
107 <listitem>
108 <para>Change to the directory created when the package was
109 extracted.</para>
110 </listitem>
111 <listitem>
112 <para>Follow the book's instructions for building the package.</para>
113 </listitem>
114 <listitem>
115 <para>Change back to the sources directory.</para>
116 </listitem>
117 <listitem>
118 <para>Delete the extracted source directory unless instructed otherwise.</para>
119 </listitem>
120 </orderedlist>
121 </listitem>
122 </orderedlist>
123 </important>
124 </listitem>
125
126 </itemizedlist>
127
128</sect1>
Note: See TracBrowser for help on using the repository browser.