diff options
Diffstat (limited to 'chapter05')
52 files changed, 1234 insertions, 1257 deletions
diff --git a/chapter05/bash-inst.xml b/chapter05/bash-inst.xml deleted file mode 100644 index 0a3a96933..000000000 --- a/chapter05/bash-inst.xml +++ /dev/null @@ -1,35 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Bash</title> - -<para>Bash contains several known bugs. Fix these with the following -patch:</para> - -<screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen> - -<para>Now prepare Bash for compilation:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the program:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make tests</userinput></screen> - -<para>Then install it and its documentation:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And make a link for the programs that use <userinput>sh</userinput> -for a shell:</para> - -<screen><userinput>ln -s bash /tools/bin/sh</userinput></screen> - -</sect2> - diff --git a/chapter05/bash.xml b/chapter05/bash.xml index 8ea856ad1..16824d4dd 100644 --- a/chapter05/bash.xml +++ b/chapter05/bash.xml @@ -7,7 +7,41 @@ Estimated required disk space: &bash-compsize-tools;</screen> &aa-bash-shortdesc; &aa-bash-dep; -&c5-bash-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Bash</title> + +<para>Bash contains several known bugs. Fix these with the following +patch:</para> + +<screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen> + +<para>Now prepare Bash for compilation:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the program:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make tests</userinput></screen> + +<para>Then install it and its documentation:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And make a link for the programs that use <userinput>sh</userinput> +for a shell:</para> + +<screen><userinput>ln -s bash /tools/bin/sh</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/binutils-pass1-inst.xml b/chapter05/binutils-pass1-inst.xml deleted file mode 100644 index 15465730b..000000000 --- a/chapter05/binutils-pass1-inst.xml +++ /dev/null @@ -1,106 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Binutils</title> - -<para>It is important that Binutils be the first package to get compiled, -because both Glibc and GCC perform various tests on the available linker and -assembler to determine which of their own features to enable.</para> - -<note><para>Even though Binutils is an important toolchain package, we are not -going to run the test suite at this early stage. First, the test suite framework -is not yet in place and second, the programs from this first pass will soon be -overwritten by those installed in the second pass.</para></note> - -<para>This package is known to behave badly when you have changed its default -optimization flags (including the -march and -mcpu options). Therefore, if -you have defined any environment variables that override default -optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting or -modifying them when building Binutils.</para> - -<para>The Binutils documentation recommends building Binutils outside of the -source directory in a dedicated build directory:</para> - -<screen><userinput>mkdir ../binutils-build -cd ../binutils-build</userinput></screen> - -<note><para>If you want the SBU values listed in the rest of the book to be of -any use, you will have to measure the time it takes to build this package. To -achieve this easily, you could do something like: -<userinput>time { ./configure ... && ... && ... && make install; }</userinput>.</para></note> - -<para>Now prepare Binutils for compilation:</para> - -<screen><userinput>../binutils-&binutils-version;/configure \ - --prefix=/tools --disable-nls</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--prefix=/tools</userinput>: This tells the -configure script to prepare to install the Binutils programs in the -<filename>/tools</filename> directory.</para></listitem> - -<listitem><para><userinput>--disable-nls</userinput>: This disables -internationalization (a word often shortened to i18n). We don't need this -for our static programs and <emphasis>nls</emphasis> often causes problems -when linking statically.</para></listitem> -</itemizedlist> - -<para>Continue with compiling the package:</para> - -<screen><userinput>make configure-host -make LDFLAGS="-all-static"</userinput></screen> - -<para>The meaning of the make options:</para> - -<itemizedlist> -<listitem><para><userinput>configure-host</userinput>: This forces all the -subdirectories to be configured immediately. A statically linked build will -fail without it. We therefore use this option to work around the -problem.</para></listitem> - -<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This tells the -linker that all the Binutils programs should be linked statically. However, -strictly speaking, <userinput>"-all-static"</userinput> is first passed to the -<emphasis>libtool</emphasis> program which then passes -<userinput>"-static"</userinput> on to the linker.</para></listitem> -</itemizedlist> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Now prepare the linker for the "locking in" of Glibc later on:</para> - -<screen><userinput>make -C ld clean -make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput></screen> - -<para>The meaning of the make options:</para> - -<itemizedlist> -<listitem><para><userinput>-C ld clean</userinput>: This tells the make program -to remove all the compiled files, but only in the <filename>ld</filename> -subdirectory.</para></listitem> - -<listitem><para><userinput>-C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput>: -This option rebuilds everything in the <filename>ld</filename> subdirectory. -Specifying the LIB_PATH makefile variable on the command line allows us to -override the default value and have it point to our temporary tools location. -The value of this variable specifies the linker's default library search path. -You'll see how this preparation is used later on in the -chapter.</para></listitem> -</itemizedlist> - -<!-- HACK - Force some whitespace to appease tidy --> -<literallayout></literallayout> - -<warning><para>Do not yet remove the Binutils build and source directories. You -will need them again in their current state a bit further on in this -chapter.</para></warning> - -<!-- HACK - Force some whitespace to appease tidy --> -<literallayout></literallayout> - -</sect2> - diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index 5f533f1dd..6c7e62d98 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -7,7 +7,112 @@ Estimated required disk space: &binutils-compsize-tools-pass1;</screen> &aa-binutils-shortdesc; &aa-binutils-dep; -&c5-binutils-pass1-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Binutils</title> + +<para>It is important that Binutils be the first package to get compiled, +because both Glibc and GCC perform various tests on the available linker and +assembler to determine which of their own features to enable.</para> + +<note><para>Even though Binutils is an important toolchain package, we are not +going to run the test suite at this early stage. First, the test suite framework +is not yet in place and second, the programs from this first pass will soon be +overwritten by those installed in the second pass.</para></note> + +<para>This package is known to behave badly when you have changed its default +optimization flags (including the -march and -mcpu options). Therefore, if +you have defined any environment variables that override default +optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting or +modifying them when building Binutils.</para> + +<para>The Binutils documentation recommends building Binutils outside of the +source directory in a dedicated build directory:</para> + +<screen><userinput>mkdir ../binutils-build +cd ../binutils-build</userinput></screen> + +<note><para>If you want the SBU values listed in the rest of the book to be of +any use, you will have to measure the time it takes to build this package. To +achieve this easily, you could do something like: +<userinput>time { ./configure ... && ... && ... && make install; }</userinput>.</para></note> + +<para>Now prepare Binutils for compilation:</para> + +<screen><userinput>../binutils-&binutils-version;/configure \ + --prefix=/tools --disable-nls</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--prefix=/tools</userinput>: This tells the +configure script to prepare to install the Binutils programs in the +<filename>/tools</filename> directory.</para></listitem> + +<listitem><para><userinput>--disable-nls</userinput>: This disables +internationalization (a word often shortened to i18n). We don't need this +for our static programs and <emphasis>nls</emphasis> often causes problems +when linking statically.</para></listitem> +</itemizedlist> + +<para>Continue with compiling the package:</para> + +<screen><userinput>make configure-host +make LDFLAGS="-all-static"</userinput></screen> + +<para>The meaning of the make options:</para> + +<itemizedlist> +<listitem><para><userinput>configure-host</userinput>: This forces all the +subdirectories to be configured immediately. A statically linked build will +fail without it. We therefore use this option to work around the +problem.</para></listitem> + +<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This tells the +linker that all the Binutils programs should be linked statically. However, +strictly speaking, <userinput>"-all-static"</userinput> is first passed to the +<emphasis>libtool</emphasis> program which then passes +<userinput>"-static"</userinput> on to the linker.</para></listitem> +</itemizedlist> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Now prepare the linker for the "locking in" of Glibc later on:</para> + +<screen><userinput>make -C ld clean +make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput></screen> + +<para>The meaning of the make options:</para> + +<itemizedlist> +<listitem><para><userinput>-C ld clean</userinput>: This tells the make program +to remove all the compiled files, but only in the <filename>ld</filename> +subdirectory.</para></listitem> + +<listitem><para><userinput>-C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput>: +This option rebuilds everything in the <filename>ld</filename> subdirectory. +Specifying the LIB_PATH makefile variable on the command line allows us to +override the default value and have it point to our temporary tools location. +The value of this variable specifies the linker's default library search path. +You'll see how this preparation is used later on in the +chapter.</para></listitem> +</itemizedlist> + +<!-- HACK - Force some whitespace to appease tidy --> +<literallayout></literallayout> + +<warning><para>Do not yet remove the Binutils build and source directories. You +will need them again in their current state a bit further on in this +chapter.</para></warning> + +<!-- HACK - Force some whitespace to appease tidy --> +<literallayout></literallayout> + +</sect2> </sect1> diff --git a/chapter05/binutils-pass2-inst.xml b/chapter05/binutils-pass2-inst.xml deleted file mode 100644 index 55d61844e..000000000 --- a/chapter05/binutils-pass2-inst.xml +++ /dev/null @@ -1,68 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Re-installation of Binutils</title> - -<para>Create a separate build directory again:</para> - -<screen><userinput>mkdir ../binutils-build -cd ../binutils-build</userinput></screen> - -<para>Now prepare Binutils to be compiled:</para> - -<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \ - --enable-shared --with-lib-path=/tools/lib</userinput></screen> - -<para>The meaning of the new configure option:</para> - -<itemizedlist> -<listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells -the configure script to specify the default library search path. We don't want -the library search path to contain library directories from the host -system.</para></listitem> -</itemizedlist> - -<para>Before starting to build Binutils, remember to unset any environment -variables that override the default optimization flags.</para> - -<para>Compile the package:</para> - -<screen><userinput>make </userinput></screen> - -<note><para>It's worth pointing out that running the Binutils test suite here -is considered not as important as running it in -<xref linkend="chapter06"/>.</para></note> - -<para>Test the results (there should be no unexpected failures here, expected -failures are fine):</para> - -<screen><userinput>make check</userinput></screen> - -<para>Unfortunately, there is no easy way to view the test results summary like -there was for the previous GCC package. However, if a failure occurs here, it -should be easy to spot. The output shown will contain something like:</para> - -<blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Now prepare Binutils for the re-adjusting of the toolchain in the next -chapter:</para> - -<screen><userinput>make -C ld clean -make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen> - -<!-- HACK - Force some whitespace to appease tidy --> -<literallayout></literallayout> - -<warning><para>Do not yet remove the Binutils source and build directories. -We'll need these directories again in the next chapter in the state they are in -now.</para></warning> - -<!-- HACK - Force some whitespace to appease tidy --> -<literallayout></literallayout> - -</sect2> - diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml index 3e9827b5f..adcd0c16b 100644 --- a/chapter05/binutils-pass2.xml +++ b/chapter05/binutils-pass2.xml @@ -5,7 +5,74 @@ <screen>Estimated build time: &binutils-time-tools-pass2; Estimated required disk space: &binutils-compsize-tools-pass2;</screen> -&c5-binutils-pass2-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Re-installation of Binutils</title> + +<para>Create a separate build directory again:</para> + +<screen><userinput>mkdir ../binutils-build +cd ../binutils-build</userinput></screen> + +<para>Now prepare Binutils to be compiled:</para> + +<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \ + --enable-shared --with-lib-path=/tools/lib</userinput></screen> + +<para>The meaning of the new configure option:</para> + +<itemizedlist> +<listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells +the configure script to specify the default library search path. We don't want +the library search path to contain library directories from the host +system.</para></listitem> +</itemizedlist> + +<para>Before starting to build Binutils, remember to unset any environment +variables that override the default optimization flags.</para> + +<para>Compile the package:</para> + +<screen><userinput>make </userinput></screen> + +<note><para>It's worth pointing out that running the Binutils test suite here +is considered not as important as running it in +<xref linkend="chapter06"/>.</para></note> + +<para>Test the results (there should be no unexpected failures here, expected +failures are fine):</para> + +<screen><userinput>make check</userinput></screen> + +<para>Unfortunately, there is no easy way to view the test results summary like +there was for the previous GCC package. However, if a failure occurs here, it +should be easy to spot. The output shown will contain something like:</para> + +<blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Now prepare Binutils for the re-adjusting of the toolchain in the next +chapter:</para> + +<screen><userinput>make -C ld clean +make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen> + +<!-- HACK - Force some whitespace to appease tidy --> +<literallayout></literallayout> + +<warning><para>Do not yet remove the Binutils source and build directories. +We'll need these directories again in the next chapter in the state they are in +now.</para></warning> + +<!-- HACK - Force some whitespace to appease tidy --> +<literallayout></literallayout> + +</sect2> </sect1> diff --git a/chapter05/bzip2-inst.xml b/chapter05/bzip2-inst.xml deleted file mode 100644 index 0cce861b1..000000000 --- a/chapter05/bzip2-inst.xml +++ /dev/null @@ -1,12 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Bzip2</title> - -<para>The Bzip2 package doesn't contain a <userinput>configure</userinput> -script. Compile and install it with a straightforward:</para> - -<screen><userinput>make PREFIX=/tools install</userinput></screen> - -</sect2> - diff --git a/chapter05/bzip2.xml b/chapter05/bzip2.xml index 9207f646d..be20eae98 100644 --- a/chapter05/bzip2.xml +++ b/chapter05/bzip2.xml @@ -7,7 +7,18 @@ Estimated required disk space: &bzip2-compsize-tools;</screen> &aa-bzip2-shortdesc; &aa-bzip2-dep; -&c5-bzip2-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Bzip2</title> + +<para>The Bzip2 package doesn't contain a <userinput>configure</userinput> +script. Compile and install it with a straightforward:</para> + +<screen><userinput>make PREFIX=/tools install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/coreutils-inst.xml b/chapter05/coreutils-inst.xml deleted file mode 100644 index 4d58b1cc4..000000000 --- a/chapter05/coreutils-inst.xml +++ /dev/null @@ -1,34 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Coreutils</title> - -<para>Prepare Coreutils to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make RUN_EXPENSIVE_TESTS=yes check</userinput></screen> - -<para>The meaning of the make option:</para> - -<itemizedlist> -<listitem><para><userinput>RUN_EXPENSIVE_TESTS=yes</userinput>: This tells the -test suite to run several additional tests that are considered relatively -expensive on some platforms. However, they are generally not a problem on -Linux.</para></listitem> -</itemizedlist> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/coreutils.xml b/chapter05/coreutils.xml index 17b3d3432..e37456266 100644 --- a/chapter05/coreutils.xml +++ b/chapter05/coreutils.xml @@ -7,7 +7,40 @@ Estimated required disk space: &coreutils-compsize-tools;</screen> &aa-coreutils-shortdesc; &aa-coreutils-dep; -&c5-coreutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Coreutils</title> + +<para>Prepare Coreutils to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make RUN_EXPENSIVE_TESTS=yes check</userinput></screen> + +<para>The meaning of the make option:</para> + +<itemizedlist> +<listitem><para><userinput>RUN_EXPENSIVE_TESTS=yes</userinput>: This tells the +test suite to run several additional tests that are considered relatively +expensive on some platforms. However, they are generally not a problem on +Linux.</para></listitem> +</itemizedlist> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/dejagnu-inst.xml b/chapter05/dejagnu-inst.xml deleted file mode 100644 index 6f6256b8c..000000000 --- a/chapter05/dejagnu-inst.xml +++ /dev/null @@ -1,15 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of DejaGnu</title> - -<para>Prepare DejaGnu to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Build and install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/dejagnu.xml b/chapter05/dejagnu.xml index 318eb1506..73218be46 100644 --- a/chapter05/dejagnu.xml +++ b/chapter05/dejagnu.xml @@ -7,7 +7,21 @@ Estimated required disk space: &dejagnu-compsize-tools;</screen> &aa-dejagnu-shortdesc; &aa-dejagnu-dep; -&c5-dejagnu-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of DejaGnu</title> + +<para>Prepare DejaGnu to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Build and install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/diffutils-inst.xml b/chapter05/diffutils-inst.xml deleted file mode 100644 index 4f8048c13..000000000 --- a/chapter05/diffutils-inst.xml +++ /dev/null @@ -1,19 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Diffutils</title> - -<para>Prepare Diffutils to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/diffutils.xml b/chapter05/diffutils.xml index 75ef875e3..cbb39c53b 100644 --- a/chapter05/diffutils.xml +++ b/chapter05/diffutils.xml @@ -7,7 +7,25 @@ Estimated required disk space: &diffutils-compsize-tools;</screen> &aa-diffutils-shortdesc; &aa-diffutils-dep; -&c5-diffutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Diffutils</title> + +<para>Prepare Diffutils to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/expect-inst.xml b/chapter05/expect-inst.xml deleted file mode 100644 index 2f6387ef9..000000000 --- a/chapter05/expect-inst.xml +++ /dev/null @@ -1,57 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Expect</title> - -<para>First apply a patch:</para> - -<screen><userinput>patch -Np1 -i ../&expect-patch;</userinput></screen> - -<para>This fixes a bug in Expect that can result in bogus failures during the -GCC test suite run.</para> - -<para>Now prepare Expect to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--with-tcl=/tools/lib</userinput>: This ensures that -the configure script finds the Tcl installation in our temporary tools location. -We don't want it to find an existing one that may possibly reside on the host -system.</para></listitem> - -<listitem><para><userinput>--with-x=no</userinput>: This tells the configure -script not to search for Tk (the Tcl GUI component) or the X Window System -libraries, both of which may possibly reside on the host system.</para></listitem> -</itemizedlist> - -<para>Build the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. However, the Expect test suite here in -Chapter 5 is known to experience failures under certain host conditions that -are not fully understood. Therefore, test suite failures here are not -surprising, but are not considered critical. Should you choose to run the test -suite, the following command will do so:</para> - -<screen><userinput>make test</userinput></screen> - -<para>And install:</para> - -<screen><userinput>make SCRIPTS="" install</userinput></screen> - -<para>The meaning of the make option:</para> - -<itemizedlist> -<listitem><para><userinput>SCRIPTS=""</userinput>: This prevents installation of -the supplementary expect scripts which are not needed.</para></listitem> -</itemizedlist> - -<para>You can now remove the source directories of both Tcl and Expect.</para> - -</sect2> - diff --git a/chapter05/expect.xml b/chapter05/expect.xml index 338d35537..500cfb5b9 100644 --- a/chapter05/expect.xml +++ b/chapter05/expect.xml @@ -7,7 +7,63 @@ Estimated required disk space: &expect-compsize-tools;</screen> &aa-expect-shortdesc; &aa-expect-dep; -&c5-expect-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Expect</title> + +<para>First apply a patch:</para> + +<screen><userinput>patch -Np1 -i ../&expect-patch;</userinput></screen> + +<para>This fixes a bug in Expect that can result in bogus failures during the +GCC test suite run.</para> + +<para>Now prepare Expect to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--with-tcl=/tools/lib</userinput>: This ensures that +the configure script finds the Tcl installation in our temporary tools location. +We don't want it to find an existing one that may possibly reside on the host +system.</para></listitem> + +<listitem><para><userinput>--with-x=no</userinput>: This tells the configure +script not to search for Tk (the Tcl GUI component) or the X Window System +libraries, both of which may possibly reside on the host system.</para></listitem> +</itemizedlist> + +<para>Build the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. However, the Expect test suite here in +Chapter 5 is known to experience failures under certain host conditions that +are not fully understood. Therefore, test suite failures here are not +surprising, but are not considered critical. Should you choose to run the test +suite, the following command will do so:</para> + +<screen><userinput>make test</userinput></screen> + +<para>And install:</para> + +<screen><userinput>make SCRIPTS="" install</userinput></screen> + +<para>The meaning of the make option:</para> + +<itemizedlist> +<listitem><para><userinput>SCRIPTS=""</userinput>: This prevents installation of +the supplementary expect scripts which are not needed.</para></listitem> +</itemizedlist> + +<para>You can now remove the source directories of both Tcl and Expect.</para> + +</sect2> </sect1> diff --git a/chapter05/findutils-inst.xml b/chapter05/findutils-inst.xml deleted file mode 100644 index 45656baf5..000000000 --- a/chapter05/findutils-inst.xml +++ /dev/null @@ -1,24 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installing Findutils</title> - -<para>Prepare Findutils to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make </userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> diff --git a/chapter05/findutils.xml b/chapter05/findutils.xml index 04560c80d..00021490b 100644 --- a/chapter05/findutils.xml +++ b/chapter05/findutils.xml @@ -7,7 +7,31 @@ Estimated required disk space: &findutils-compsize-tools;</screen> &aa-findutils-shortdesc; &aa-findutils-dep; -&c5-findutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installing Findutils</title> + +<para>Prepare Findutils to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make </userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/gawk-inst.xml b/chapter05/gawk-inst.xml deleted file mode 100644 index 43e394804..000000000 --- a/chapter05/gawk-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Gawk</title> - -<para>Prepare Gawk to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/gawk.xml b/chapter05/gawk.xml index 37b042779..1bb48f384 100644 --- a/chapter05/gawk.xml +++ b/chapter05/gawk.xml @@ -7,7 +7,31 @@ Estimated required disk space: &gawk-compsize-tools;</screen> &aa-gawk-shortdesc; &aa-gawk-dep; -&c5-gawk-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Gawk</title> + +<para>Prepare Gawk to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/gcc-pass1-inst.xml b/chapter05/gcc-pass1-inst.xml deleted file mode 100644 index d396405ab..000000000 --- a/chapter05/gcc-pass1-inst.xml +++ /dev/null @@ -1,89 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of GCC</title> - -<para>Unpack only the GCC-core tarball, as we won't be needing a C++ compiler -for the moment.</para> - -<note><para>Even though GCC is an important toolchain package, we are not -going to run the test suite at this early stage. First, the test suite framework -is not yet in place and second, the programs from this first pass will soon be -overwritten by those installed in the second pass.</para></note> - -<para>This package is known to behave badly when you have changed its -default optimization flags (including the -march and -mcpu options). -Therefore, if you have defined any environment variables that override -default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting -or modifying them when building GCC.</para> - -<para>The GCC documentation recommends building GCC outside of the source -directory in a dedicated build directory:</para> - -<screen><userinput>mkdir ../gcc-build -cd ../gcc-build</userinput></screen> - -<para>Prepare GCC to be compiled:</para> - -<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ - --with-local-prefix=/tools \ - --disable-nls --enable-shared \ - --enable-languages=c</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--with-local-prefix=/tools</userinput>: The -purpose of this switch is to remove <filename>/usr/local/include</filename> -from <userinput>gcc</userinput>'s include search path. This is not absolutely -essential; however, we want to try to minimize the influence of the host -system, thus making this a sensible thing to do.</para></listitem> - -<listitem><para><userinput>--enable-shared</userinput>: This switch may -seem counter-intuitive at first. But using it allows the building of -<filename>libgcc_s.so.1</filename> and <filename>libgcc_eh.a</filename>, and -having <filename>libgcc_eh.a</filename> available ensures that the configure -script for Glibc (the next package we compile) produces the proper results. -Note that the <userinput>gcc</userinput> binaries will still be linked -statically, as this is controlled by the <userinput>-static</userinput> -value of BOOT_LDFLAGS further on.</para></listitem> - -<listitem><para><userinput>--enable-languages=c</userinput>: This option -ensures that only the C compiler is built. The option is only needed when you -have downloaded and unpacked the full GCC tarball.</para></listitem> -</itemizedlist> - -<para>Continue with compiling the package:</para> - -<screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen> - -<para>The meaning of the make parameters:</para> - -<itemizedlist> -<listitem><para><userinput>BOOT_LDFLAGS="-static"</userinput>: This tells -GCC to link its programs statically.</para></listitem> - -<listitem><para><userinput>bootstrap</userinput>: This target doesn't just -compile GCC, but compiles it several times. It uses the programs compiled in -a first round to compile itself a second time, and then again a third time. -It then compares these second and third compiles to make sure it can -reproduce itself flawlessly, which most probably means that it was -compiled correctly.</para></listitem> -</itemizedlist> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>As a finishing touch we'll create the <filename -class="symlink">/tools/bin/cc</filename> symlink. Many programs and -scripts run <userinput>cc</userinput> instead of <userinput>gcc</userinput>, -a thing meant to keep programs generic and therefore usable on all kinds of -Unix systems. Not everybody has the GNU C compiler installed. Simply running -<userinput>cc</userinput> leaves the system administrator free to decide what -C compiler to install, as long as there's a symlink pointing to it:</para> - -<screen><userinput>ln -sf gcc /tools/bin/cc</userinput></screen> - -</sect2> - diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 42325708f..58cfb6c56 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -7,7 +7,95 @@ Estimated required disk space: &gcc-compsize-tools-pass1;</screen> &aa-gcc-shortdesc; &aa-gcc-dep; -&c5-gcc-pass1-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of GCC</title> + +<para>Unpack only the GCC-core tarball, as we won't be needing a C++ compiler +for the moment.</para> + +<note><para>Even though GCC is an important toolchain package, we are not +going to run the test suite at this early stage. First, the test suite framework +is not yet in place and second, the programs from this first pass will soon be +overwritten by those installed in the second pass.</para></note> + +<para>This package is known to behave badly when you have changed its +default optimization flags (including the -march and -mcpu options). +Therefore, if you have defined any environment variables that override +default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting +or modifying them when building GCC.</para> + +<para>The GCC documentation recommends building GCC outside of the source +directory in a dedicated build directory:</para> + +<screen><userinput>mkdir ../gcc-build +cd ../gcc-build</userinput></screen> + +<para>Prepare GCC to be compiled:</para> + +<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ + --with-local-prefix=/tools \ + --disable-nls --enable-shared \ + --enable-languages=c</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--with-local-prefix=/tools</userinput>: The +purpose of this switch is to remove <filename>/usr/local/include</filename> +from <userinput>gcc</userinput>'s include search path. This is not absolutely +essential; however, we want to try to minimize the influence of the host +system, thus making this a sensible thing to do.</para></listitem> + +<listitem><para><userinput>--enable-shared</userinput>: This switch may +seem counter-intuitive at first. But using it allows the building of +<filename>libgcc_s.so.1</filename> and <filename>libgcc_eh.a</filename>, and +having <filename>libgcc_eh.a</filename> available ensures that the configure +script for Glibc (the next package we compile) produces the proper results. +Note that the <userinput>gcc</userinput> binaries will still be linked +statically, as this is controlled by the <userinput>-static</userinput> +value of BOOT_LDFLAGS further on.</para></listitem> + +<listitem><para><userinput>--enable-languages=c</userinput>: This option +ensures that only the C compiler is built. The option is only needed when you +have downloaded and unpacked the full GCC tarball.</para></listitem> +</itemizedlist> + +<para>Continue with compiling the package:</para> + +<screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen> + +<para>The meaning of the make parameters:</para> + +<itemizedlist> +<listitem><para><userinput>BOOT_LDFLAGS="-static"</userinput>: This tells +GCC to link its programs statically.</para></listitem> + +<listitem><para><userinput>bootstrap</userinput>: This target doesn't just +compile GCC, but compiles it several times. It uses the programs compiled in +a first round to compile itself a second time, and then again a third time. +It then compares these second and third compiles to make sure it can +reproduce itself flawlessly, which most probably means that it was +compiled correctly.</para></listitem> +</itemizedlist> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>As a finishing touch we'll create the <filename +class="symlink">/tools/bin/cc</filename> symlink. Many programs and +scripts run <userinput>cc</userinput> instead of <userinput>gcc</userinput>, +a thing meant to keep programs generic and therefore usable on all kinds of +Unix systems. Not everybody has the GNU C compiler installed. Simply running +<userinput>cc</userinput> leaves the system administrator free to decide what +C compiler to install, as long as there's a symlink pointing to it:</para> + +<screen><userinput>ln -sf gcc /tools/bin/cc</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/gcc-pass2-inst.xml b/chapter05/gcc-pass2-inst.xml deleted file mode 100644 index a5256c9ed..000000000 --- a/chapter05/gcc-pass2-inst.xml +++ /dev/null @@ -1,164 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Re-installation of GCC</title> - -<para>The tools required to test GCC and Binutils are installed now (Tcl, Expect -and DejaGnu). We can continue on rebuilding GCC and Binutils, link them against -the new Glibc, and test them properly. One thing to note, however, is that these -test suites are highly dependent on properly functioning pseudo terminals (PTYs) -which are provided by your host distribution. These days, PTYs are most commonly -implemented via the <emphasis>devpts</emphasis> file system. You can quickly -check if your host system is set up correctly in this regard by performing a -simple test:</para> - -<screen><userinput>expect -c "spawn ls"</userinput></screen> - -<para>If you receive the message:</para> - -<blockquote><screen>The system has no more ptys. Ask your system administrator to create more.</screen></blockquote> - -<para>Your host distribution is not set up for proper PTY operation. In this -case there is no point in running the test suites for GCC and Binutils until you -are able to resolve the issue. You can consult the LFS Wiki at -<ulink url="http://wiki.linuxfromscratch.org/"/> for more information on how to -get PTYs working.</para> - -<para>Unpack all three GCC tarballs (-core, -g++, and -testsuite) in one and the -same working directory. They will all unfold into a single -<filename>gcc-&gcc-version;/</filename> subdirectory.</para> - -<para>First correct one problem and make an essential adjustment:</para> - -<screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch; -patch -Np1 -i ../&gcc-specs-patch;</userinput></screen> - -<para>The first patch disables the GCC "fixincludes" script. We mentioned this -briefly earlier, but a slightly more in-depth explanation of the fixincludes -process is warranted here. Under normal circumstances, the GCC fixincludes -script scans your system for header files that need to be fixed. It might find -that some Glibc header files on your host system need to be fixed, fix them and -put them in the GCC private include directory. Then, later on in -<xref linkend="chapter06"/>, after we've installed the newer Glibc, this -private include directory would be searched before the system include -directory, resulting in GCC finding the fixed headers from the host system, -which would most likely not match the Glibc version actually used for the LFS -system.</para> - -<para>The last patch changes GCC's default location of the dynamic linker -(typically <filename>ld-linux.so.2</filename>). It also removes -<filename class="directory">/usr/include</filename> from GCC's include search -path. Patching now rather than adjusting the specs file after installation -ensures that our new dynamic linker gets used during the actual build of GCC. -That is, all the final (and temporary) binaries created during the build will -link against the new Glibc.</para> - -<important><para>These patches are <emphasis>critical</emphasis> in ensuring a -successful overall build. Do not forget to apply them.</para></important> - -<para>Create a separate build directory again:</para> - -<screen><userinput>mkdir ../gcc-build -cd ../gcc-build</userinput></screen> - -<para>Before starting to build GCC, remember to unset any environment -variables that override the default optimization flags.</para> - -<para>Now prepare GCC to be compiled:</para> - -<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ - --with-local-prefix=/tools \ - --enable-clocale=gnu --enable-shared \ - --enable-threads=posix --enable-__cxa_atexit \ - --enable-languages=c,c++</userinput></screen> - -<para>The meaning of the new configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--enable-threads=posix</userinput>: This enables -C++ exception handling for multi-threaded code.</para></listitem> - -<listitem><para><userinput>--enable-__cxa_atexit</userinput>: This option -allows use of __cxa_atexit, rather than atexit, to register C++ destructors for -local statics and global objects and is essential for fully standards-compliant -handling of destructors. It also affects the C++ ABI and therefore results in -C++ shared libraries and C++ programs that are interoperable with other Linux -distributions.</para></listitem> - -<listitem><para><userinput>--enable-clocale=gnu</userinput>: This option ensures -the correct locale model is selected for the C++ libraries under all -circumstances. If the configure script finds the <emphasis>de_DE</emphasis> -locale installed, it will select the correct model of <emphasis>gnu</emphasis>. -However, people who don't install the <emphasis>de_DE</emphasis> locale, run the -risk of building ABI incompatible C++ libraries due to the wrong locale model of -<emphasis>generic</emphasis> being selected.</para></listitem> - -<listitem><para><userinput>--enable-languages=c,c++</userinput>: This option is -needed to ensure that both C and C++ compilers are built.</para></listitem> -</itemizedlist> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>There is no need to use the <userinput>bootstrap</userinput> target now, -as the compiler we're using to compile this GCC was built from the exact same -version of the GCC sources we used earlier.</para> - -<note><para>It's worth pointing out that running the GCC test suite here -is considered not as important as running it in -<xref linkend="chapter06"/>.</para></note> - -<para>Test the results:</para> - -<screen><userinput>make -k check</userinput></screen> - -<para>The <userinput>-k</userinput> flag is used to make the test suite run -through to completion and not stop at the first failure. The GCC test suite is -very comprehensive and is almost guaranteed to generate a few failures. To get -a summary of the test suite results, run this:</para> - -<screen><userinput>../gcc-&gcc-version;/contrib/test_summary | more</userinput></screen> - -<para>You can compare your results to those posted to the gcc-testresults -mailing list for similar configurations to your own. For an example of how -current GCC-&gcc-version; should look on i686-pc-linux-gnu, see -<ulink url="http://gcc.gnu.org/ml/gcc-testresults/2003-08/msg01612.html"/>.</para> - -<para>Note that the results contain:</para> - -<screen>* 1 XPASS (unexpected pass) for g++ -* 1 FAIL (unexpected failure) for g++ -* 2 FAIL for gcc -* 26 XPASS's for libstdc++</screen> - -<para>The unexpected pass for g++ is due to the use of -<userinput>--enable-__cxa_atexit</userinput>. Apparently not all platforms -supported by GCC have support for "__cxa_atexit" in their C libraries, so this -test is not always expected to pass.</para> - -<para>The 26 unexpected passes for libstdc++ are due to the use of -<userinput>--enable-clocale=gnu</userinput>, which is the correct choice on -Glibc-based systems of versions 2.2.5 and above. The underlying locale support -in the GNU C library is superior to that of the otherwise selected "generic" -model (which may be applicable if for instance you were using Newlibc, Sun-libc -or whatever libc). The libstdc++ test suite is apparently expecting the -"generic" model, hence those tests are not always expected to pass.</para> - -<para>Unexpected failures often cannot be avoided. The GCC developers are -usually aware of them but haven't yet gotten around to fixing them. In short, -unless your results are vastly different from those at the above URL, it is safe -to continue on.</para> - -<para>And finally install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<note><para>At this point it is strongly recommended to repeat the sanity check -we performed earlier in the chapter. Refer back to -<xref linkend="ch05-locking-glibc"/> and repeat the check. If the results are -wrong, then most likely you forgot to apply the above mentioned GCC Specs -patch.</para></note> - -</sect2> - diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml index ad9b1892d..0d4d638a7 100644 --- a/chapter05/gcc-pass2.xml +++ b/chapter05/gcc-pass2.xml @@ -5,7 +5,170 @@ <screen>Estimated build time: &gcc-time-tools-pass2; Estimated required disk space: &gcc-compsize-tools-pass2;</screen> -&c5-gcc-pass2-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Re-installation of GCC</title> + +<para>The tools required to test GCC and Binutils are installed now (Tcl, Expect +and DejaGnu). We can continue on rebuilding GCC and Binutils, link them against +the new Glibc, and test them properly. One thing to note, however, is that these +test suites are highly dependent on properly functioning pseudo terminals (PTYs) +which are provided by your host distribution. These days, PTYs are most commonly +implemented via the <emphasis>devpts</emphasis> file system. You can quickly +check if your host system is set up correctly in this regard by performing a +simple test:</para> + +<screen><userinput>expect -c "spawn ls"</userinput></screen> + +<para>If you receive the message:</para> + +<blockquote><screen>The system has no more ptys. Ask your system administrator to create more.</screen></blockquote> + +<para>Your host distribution is not set up for proper PTY operation. In this +case there is no point in running the test suites for GCC and Binutils until you +are able to resolve the issue. You can consult the LFS Wiki at +<ulink url="http://wiki.linuxfromscratch.org/"/> for more information on how to +get PTYs working.</para> + +<para>Unpack all three GCC tarballs (-core, -g++, and -testsuite) in one and the +same working directory. They will all unfold into a single +<filename>gcc-&gcc-version;/</filename> subdirectory.</para> + +<para>First correct one problem and make an essential adjustment:</para> + +<screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch; +patch -Np1 -i ../&gcc-specs-patch;</userinput></screen> + +<para>The first patch disables the GCC "fixincludes" script. We mentioned this +briefly earlier, but a slightly more in-depth explanation of the fixincludes +process is warranted here. Under normal circumstances, the GCC fixincludes +script scans your system for header files that need to be fixed. It might find +that some Glibc header files on your host system need to be fixed, fix them and +put them in the GCC private include directory. Then, later on in +<xref linkend="chapter06"/>, after we've installed the newer Glibc, this +private include directory would be searched before the system include +directory, resulting in GCC finding the fixed headers from the host system, +which would most likely not match the Glibc version actually used for the LFS +system.</para> + +<para>The last patch changes GCC's default location of the dynamic linker +(typically <filename>ld-linux.so.2</filename>). It also removes +<filename class="directory">/usr/include</filename> from GCC's include search +path. Patching now rather than adjusting the specs file after installation +ensures that our new dynamic linker gets used during the actual build of GCC. +That is, all the final (and temporary) binaries created during the build will +link against the new Glibc.</para> + +<important><para>These patches are <emphasis>critical</emphasis> in ensuring a +successful overall build. Do not forget to apply them.</para></important> + +<para>Create a separate build directory again:</para> + +<screen><userinput>mkdir ../gcc-build +cd ../gcc-build</userinput></screen> + +<para>Before starting to build GCC, remember to unset any environment +variables that override the default optimization flags.</para> + +<para>Now prepare GCC to be compiled:</para> + +<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ + --with-local-prefix=/tools \ + --enable-clocale=gnu --enable-shared \ + --enable-threads=posix --enable-__cxa_atexit \ + --enable-languages=c,c++</userinput></screen> + +<para>The meaning of the new configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--enable-threads=posix</userinput>: This enables +C++ exception handling for multi-threaded code.</para></listitem> + +<listitem><para><userinput>--enable-__cxa_atexit</userinput>: This option +allows use of __cxa_atexit, rather than atexit, to register C++ destructors for +local statics and global objects and is essential for fully standards-compliant +handling of destructors. It also affects the C++ ABI and therefore results in +C++ shared libraries and C++ programs that are interoperable with other Linux +distributions.</para></listitem> + +<listitem><para><userinput>--enable-clocale=gnu</userinput>: This option ensures +the correct locale model is selected for the C++ libraries under all +circumstances. If the configure script finds the <emphasis>de_DE</emphasis> +locale installed, it will select the correct model of <emphasis>gnu</emphasis>. +However, people who don't install the <emphasis>de_DE</emphasis> locale, run the +risk of building ABI incompatible C++ libraries due to the wrong locale model of +<emphasis>generic</emphasis> being selected.</para></listitem> + +<listitem><para><userinput>--enable-languages=c,c++</userinput>: This option is +needed to ensure that both C and C++ compilers are built.</para></listitem> +</itemizedlist> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>There is no need to use the <userinput>bootstrap</userinput> target now, +as the compiler we're using to compile this GCC was built from the exact same +version of the GCC sources we used earlier.</para> + +<note><para>It's worth pointing out that running the GCC test suite here +is considered not as important as running it in +<xref linkend="chapter06"/>.</para></note> + +<para>Test the results:</para> + +<screen><userinput>make -k check</userinput></screen> + +<para>The <userinput>-k</userinput> flag is used to make the test suite run +through to completion and not stop at the first failure. The GCC test suite is +very comprehensive and is almost guaranteed to generate a few failures. To get +a summary of the test suite results, run this:</para> + +<screen><userinput>../gcc-&gcc-version;/contrib/test_summary | more</userinput></screen> + +<para>You can compare your results to those posted to the gcc-testresults +mailing list for similar configurations to your own. For an example of how +current GCC-&gcc-version; should look on i686-pc-linux-gnu, see +<ulink url="http://gcc.gnu.org/ml/gcc-testresults/2003-08/msg01612.html"/>.</para> + +<para>Note that the results contain:</para> + +<screen>* 1 XPASS (unexpected pass) for g++ +* 1 FAIL (unexpected failure) for g++ +* 2 FAIL for gcc +* 26 XPASS's for libstdc++</screen> + +<para>The unexpected pass for g++ is due to the use of +<userinput>--enable-__cxa_atexit</userinput>. Apparently not all platforms +supported by GCC have support for "__cxa_atexit" in their C libraries, so this +test is not always expected to pass.</para> + +<para>The 26 unexpected passes for libstdc++ are due to the use of +<userinput>--enable-clocale=gnu</userinput>, which is the correct choice on +Glibc-based systems of versions 2.2.5 and above. The underlying locale support +in the GNU C library is superior to that of the otherwise selected "generic" +model (which may be applicable if for instance you were using Newlibc, Sun-libc +or whatever libc). The libstdc++ test suite is apparently expecting the +"generic" model, hence those tests are not always expected to pass.</para> + +<para>Unexpected failures often cannot be avoided. The GCC developers are +usually aware of them but haven't yet gotten around to fixing them. In short, +unless your results are vastly different from those at the above URL, it is safe +to continue on.</para> + +<para>And finally install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<note><para>At this point it is strongly recommended to repeat the sanity check +we performed earlier in the chapter. Refer back to +<xref linkend="ch05-locking-glibc"/> and repeat the check. If the results are +wrong, then most likely you forgot to apply the above mentioned GCC Specs +patch.</para></note> + +</sect2> </sect1> diff --git a/chapter05/gettext-inst.xml b/chapter05/gettext-inst.xml deleted file mode 100644 index 0d6c1f9da..000000000 --- a/chapter05/gettext-inst.xml +++ /dev/null @@ -1,29 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Gettext</title> - -<para>Prepare Gettext to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the programs:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. However, the Gettext test suite here in -Chapter 5 is known to experience failures under certain host conditions -- for -example, if it finds a Java compiler on the host. The Gettext test suite takes -a very long time to run and is not considered critical. Therefore, we don't -recommend running it here. Should you choose to run it, the following command -will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/gettext.xml b/chapter05/gettext.xml index 744a33213..d2303c663 100644 --- a/chapter05/gettext.xml +++ b/chapter05/gettext.xml @@ -7,6 +7,35 @@ Estimated required disk space: &gettext-compsize-tools;</screen> &aa-gettext-shortdesc; &aa-gettext-dep; -&c5-gettext-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Gettext</title> + +<para>Prepare Gettext to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the programs:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. However, the Gettext test suite here in +Chapter 5 is known to experience failures under certain host conditions -- for +example, if it finds a Java compiler on the host. The Gettext test suite takes +a very long time to run and is not considered critical. Therefore, we don't +recommend running it here. Should you choose to run it, the following command +will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter05/glibc-inst.xml b/chapter05/glibc-inst.xml deleted file mode 100644 index b75a87be1..000000000 --- a/chapter05/glibc-inst.xml +++ /dev/null @@ -1,169 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Glibc installation</title> - -<para>Before starting to install Glibc, you must <userinput>cd</userinput> -into the <filename>glibc-&glibc-version;</filename> directory and unpack -Glibc-linuxthreads in that directory, not in the directory where you usually -unpack all the sources.</para> - -<note><para>We are going to run the test suite for Glibc in this chapter. -However, it's worth pointing out that running the Glibc test suite here -is considered not as important as running it in -<xref linkend="chapter06"/>.</para></note> - -<para>This package is known to behave badly when you have changed its -default optimization flags (including the -march and -mcpu options). -Therefore, if you have defined any environment variables that override -default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting -them when building Glibc.</para> - -<para>Basically, compiling Glibc in any other way than the book suggests -is putting the stability of your system at risk.</para> - -<para>Though it is a harmless message, the install stage of Glibc will -complain about the absence of <filename>/tools/etc/ld.so.conf</filename>. -Fix this annoying little warning with:</para> - -<screen><userinput>mkdir /tools/etc -touch /tools/etc/ld.so.conf</userinput></screen> - -<para>Also, Glibc has a subtle problem when compiled with GCC &gcc-version;. -Apply the following patch to fix this:</para> - -<screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen> - -<para>The Glibc documentation recommends building Glibc outside of the source -directory in a dedicated build directory:</para> - -<screen><userinput>mkdir ../glibc-build -cd ../glibc-build</userinput></screen> - -<para>Next, prepare Glibc to be compiled:</para> - -<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \ - --disable-profile --enable-add-ons \ - --with-headers=/tools/include \ - --with-binutils=/tools/bin \ - --without-gd</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--disable-profile</userinput>: This disables the -building of the libraries with profiling information. Omit this option if you -plan to do profiling.</para></listitem> - -<listitem><para><userinput>--enable-add-ons</userinput>: This enables any -add-ons that were installed with Glibc, in our case Linuxthreads.</para></listitem> - -<listitem><para><userinput>--with-binutils=/tools/bin</userinput> and -<userinput>--with-headers=/tools/include</userinput>: Strictly speaking -these switches are not required. But they ensure nothing can go wrong with -regard to what kernel headers and Binutils programs get used during the -Glibc build.</para></listitem> - -<listitem><para><userinput> --without-gd</userinput>: This switch ensures -that we don't build the <userinput>memusagestat</userinput> program, which -strangely enough insists on linking against the host's libraries (libgd, -libpng, libz, and so forth).</para></listitem> -</itemizedlist> - -<para>During this stage you might see the following warning:</para> - -<blockquote><screen>configure: WARNING: -*** These auxiliary programs are missing or incompatible versions: msgfmt -*** some features will be disabled. -*** Check the INSTALL file for required versions.</screen></blockquote> - -<para>The missing or incompatible <filename>msgfmt</filename> program is -generally harmless, but it's believed it can sometimes cause problems when -running the test suite.</para> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Run the test suite:</para> - -<screen><userinput>make check</userinput></screen> - -<para>The Glibc test suite is highly dependent on certain functions of your host -system, in particular the kernel. Additionally, here in this chapter some tests -can be adversely affected by existing tools or environmental issues on the host -system. Of course, these won't be a problem when we run the Glibc test suite -inside the chroot environment of <xref linkend="chapter06"/>. In general, the -Glibc test suite is always expected to pass. However, as mentioned above, some -failures are unavoidable in certain circumstances. Here is a list of the most -common issues we are aware of:</para> - -<itemizedlist> -<listitem><para>The <emphasis>math</emphasis> tests sometimes fail when running -on systems where the CPU is not a relatively new genuine Intel or authentic AMD. -Certain optimization settings are also known to be a factor here.</para></listitem> - -<listitem><para>The <emphasis>gettext</emphasis> test sometimes fails due to -host system issues. The exact reasons are not yet clear.</para></listitem> - -<listitem><para>The <emphasis>atime</emphasis> test sometimes fails when the -LFS partition is mounted with the <emphasis>noatime</emphasis> option, or due -to other file system quirks.</para></listitem> - -<listitem><para>The <emphasis>shm</emphasis> test might fail when the host -system is running the devfs file system but doesn't have the tmpfs file system -mounted at <filename>/dev/shm</filename> due to lack of support for tmpfs in -the kernel.</para></listitem> - -<listitem><para>When running on older and slower hardware, some tests might -fail due to test timeouts being exceeded.</para></listitem> -</itemizedlist> - -<para>In summary, don't worry too much if you see Glibc test suite failures -here in this chapter. The Glibc in <xref linkend="chapter06"/> is the one we'll -ultimately end up using so that is the one we would really like to see pass. -But please keep in mind, even in <xref linkend="chapter06"/> some failures -could still occur -- the <emphasis>math</emphasis> -tests for example. When experiencing a failure, make a note of it, then -continue by reissuing the <userinput>make check</userinput>. The test suite -should pick up where it left off and continue on. You can circumvent this -stop-start sequence by issuing a <userinput>make -k check</userinput>. But if -you do that, be sure to log the output so that you can later peruse the log -file and examine the total number of failures.</para> - -<para>Now install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Different countries and cultures have varying conventions for how to -communicate. These conventions range from very simple ones, such as the format -for representing dates and times, to very complex ones, such as the language -spoken. The "internationalization" of GNU programs works by means of -<emphasis>locales</emphasis>. We'll install the Glibc locales now:</para> - -<screen><userinput>make localedata/install-locales</userinput></screen> - -<para>An alternative to running the previous command is to install only -those locales which you need or want. This can be achieved by using the -<userinput>localedef</userinput> command. Information on this can be -found in the <filename>INSTALL</filename> file in the -<filename>glibc-&glibc-version;</filename> source. However, there are a number -of locales that are essential for the tests of future packages to pass, in -particular, the <emphasis>libstdc++</emphasis> tests from GCC. The following -instructions, instead of the install-locales target above, will install -the minimum set of locales necessary for the tests to run successfully:</para> - -<screen><userinput>mkdir -p /tools/lib/locale -localedef -i de_DE -f ISO-8859-1 de_DE -localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro -localedef -i en_HK -f ISO-8859-1 en_HK -localedef -i en_PH -f ISO-8859-1 en_PH -localedef -i en_US -f ISO-8859-1 en_US -localedef -i es_MX -f ISO-8859-1 es_MX -localedef -i fr_FR -f ISO-8859-1 fr_FR -localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro -localedef -i it_IT -f ISO-8859-1 it_IT -localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen> - -</sect2> - diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 1a2fa38aa..3077438b4 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -7,7 +7,175 @@ Estimated required disk space: &glibc-compsize-tools;</screen> &aa-glibc-shortdesc; &aa-glibc-dep; -&c5-glibc-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Glibc installation</title> + +<para>Before starting to install Glibc, you must <userinput>cd</userinput> +into the <filename>glibc-&glibc-version;</filename> directory and unpack +Glibc-linuxthreads in that directory, not in the directory where you usually +unpack all the sources.</para> + +<note><para>We are going to run the test suite for Glibc in this chapter. +However, it's worth pointing out that running the Glibc test suite here +is considered not as important as running it in +<xref linkend="chapter06"/>.</para></note> + +<para>This package is known to behave badly when you have changed its +default optimization flags (including the -march and -mcpu options). +Therefore, if you have defined any environment variables that override +default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting +them when building Glibc.</para> + +<para>Basically, compiling Glibc in any other way than the book suggests +is putting the stability of your system at risk.</para> + +<para>Though it is a harmless message, the install stage of Glibc will +complain about the absence of <filename>/tools/etc/ld.so.conf</filename>. +Fix this annoying little warning with:</para> + +<screen><userinput>mkdir /tools/etc +touch /tools/etc/ld.so.conf</userinput></screen> + +<para>Also, Glibc has a subtle problem when compiled with GCC &gcc-version;. +Apply the following patch to fix this:</para> + +<screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen> + +<para>The Glibc documentation recommends building Glibc outside of the source +directory in a dedicated build directory:</para> + +<screen><userinput>mkdir ../glibc-build +cd ../glibc-build</userinput></screen> + +<para>Next, prepare Glibc to be compiled:</para> + +<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \ + --disable-profile --enable-add-ons \ + --with-headers=/tools/include \ + --with-binutils=/tools/bin \ + --without-gd</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--disable-profile</userinput>: This disables the +building of the libraries with profiling information. Omit this option if you +plan to do profiling.</para></listitem> + +<listitem><para><userinput>--enable-add-ons</userinput>: This enables any +add-ons that were installed with Glibc, in our case Linuxthreads.</para></listitem> + +<listitem><para><userinput>--with-binutils=/tools/bin</userinput> and +<userinput>--with-headers=/tools/include</userinput>: Strictly speaking +these switches are not required. But they ensure nothing can go wrong with +regard to what kernel headers and Binutils programs get used during the +Glibc build.</para></listitem> + +<listitem><para><userinput> --without-gd</userinput>: This switch ensures +that we don't build the <userinput>memusagestat</userinput> program, which +strangely enough insists on linking against the host's libraries (libgd, +libpng, libz, and so forth).</para></listitem> +</itemizedlist> + +<para>During this stage you might see the following warning:</para> + +<blockquote><screen>configure: WARNING: +*** These auxiliary programs are missing or incompatible versions: msgfmt +*** some features will be disabled. +*** Check the INSTALL file for required versions.</screen></blockquote> + +<para>The missing or incompatible <filename>msgfmt</filename> program is +generally harmless, but it's believed it can sometimes cause problems when +running the test suite.</para> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Run the test suite:</para> + +<screen><userinput>make check</userinput></screen> + +<para>The Glibc test suite is highly dependent on certain functions of your host +system, in particular the kernel. Additionally, here in this chapter some tests +can be adversely affected by existing tools or environmental issues on the host +system. Of course, these won't be a problem when we run the Glibc test suite +inside the chroot environment of <xref linkend="chapter06"/>. In general, the +Glibc test suite is always expected to pass. However, as mentioned above, some +failures are unavoidable in certain circumstances. Here is a list of the most +common issues we are aware of:</para> + +<itemizedlist> +<listitem><para>The <emphasis>math</emphasis> tests sometimes fail when running +on systems where the CPU is not a relatively new genuine Intel or authentic AMD. +Certain optimization settings are also known to be a factor here.</para></listitem> + +<listitem><para>The <emphasis>gettext</emphasis> test sometimes fails due to +host system issues. The exact reasons are not yet clear.</para></listitem> + +<listitem><para>The <emphasis>atime</emphasis> test sometimes fails when the +LFS partition is mounted with the <emphasis>noatime</emphasis> option, or due +to other file system quirks.</para></listitem> + +<listitem><para>The <emphasis>shm</emphasis> test might fail when the host +system is running the devfs file system but doesn't have the tmpfs file system +mounted at <filename>/dev/shm</filename> due to lack of support for tmpfs in +the kernel.</para></listitem> + +<listitem><para>When running on older and slower hardware, some tests might +fail due to test timeouts being exceeded.</para></listitem> +</itemizedlist> + +<para>In summary, don't worry too much if you see Glibc test suite failures +here in this chapter. The Glibc in <xref linkend="chapter06"/> is the one we'll +ultimately end up using so that is the one we would really like to see pass. +But please keep in mind, even in <xref linkend="chapter06"/> some failures +could still occur -- the <emphasis>math</emphasis> +tests for example. When experiencing a failure, make a note of it, then +continue by reissuing the <userinput>make check</userinput>. The test suite +should pick up where it left off and continue on. You can circumvent this +stop-start sequence by issuing a <userinput>make -k check</userinput>. But if +you do that, be sure to log the output so that you can later peruse the log +file and examine the total number of failures.</para> + +<para>Now install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Different countries and cultures have varying conventions for how to +communicate. These conventions range from very simple ones, such as the format +for representing dates and times, to very complex ones, such as the language +spoken. The "internationalization" of GNU programs works by means of +<emphasis>locales</emphasis>. We'll install the Glibc locales now:</para> + +<screen><userinput>make localedata/install-locales</userinput></screen> + +<para>An alternative to running the previous command is to install only +those locales which you need or want. This can be achieved by using the +<userinput>localedef</userinput> command. Information on this can be +found in the <filename>INSTALL</filename> file in the +<filename>glibc-&glibc-version;</filename> source. However, there are a number +of locales that are essential for the tests of future packages to pass, in +particular, the <emphasis>libstdc++</emphasis> tests from GCC. The following +instructions, instead of the install-locales target above, will install +the minimum set of locales necessary for the tests to run successfully:</para> + +<screen><userinput>mkdir -p /tools/lib/locale +localedef -i de_DE -f ISO-8859-1 de_DE +localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro +localedef -i en_HK -f ISO-8859-1 en_HK +localedef -i en_PH -f ISO-8859-1 en_PH +localedef -i en_US -f ISO-8859-1 en_US +localedef -i es_MX -f ISO-8859-1 es_MX +localedef -i fr_FR -f ISO-8859-1 fr_FR +localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro +localedef -i it_IT -f ISO-8859-1 it_IT +localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/grep-inst.xml b/chapter05/grep-inst.xml deleted file mode 100644 index d613ed5c5..000000000 --- a/chapter05/grep-inst.xml +++ /dev/null @@ -1,38 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Grep</title> - -<para>Prepare Grep to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools \ - --disable-perl-regexp --with-included-regex</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--disable-perl-regexp</userinput>: This makes sure -that <userinput>grep</userinput> does not get linked against a PCRE library -that may be present on the host, but would not be available once we enter the -chroot environment.</para></listitem> -<listitem><para><userinput>--with-included-regex</userinput>: This ensures that -Grep uses its internal regular expression code. Without it, it will use -the code from Glibc, which is known to be slightly buggy.</para></listitem> -</itemizedlist> - -<para>Compile the programs:</para> - -<screen><userinput>make </userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Then install them and their documentation:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/grep.xml b/chapter05/grep.xml index 2003512b2..7e2e544a5 100644 --- a/chapter05/grep.xml +++ b/chapter05/grep.xml @@ -7,7 +7,44 @@ Estimated required disk space: &grep-compsize-tools;</screen> &aa-grep-shortdesc; &aa-grep-dep; -&c5-grep-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Grep</title> + +<para>Prepare Grep to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools \ + --disable-perl-regexp --with-included-regex</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--disable-perl-regexp</userinput>: This makes sure +that <userinput>grep</userinput> does not get linked against a PCRE library +that may be present on the host, but would not be available once we enter the +chroot environment.</para></listitem> +<listitem><para><userinput>--with-included-regex</userinput>: This ensures that +Grep uses its internal regular expression code. Without it, it will use +the code from Glibc, which is known to be slightly buggy.</para></listitem> +</itemizedlist> + +<para>Compile the programs:</para> + +<screen><userinput>make </userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Then install them and their documentation:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/gzip-inst.xml b/chapter05/gzip-inst.xml deleted file mode 100644 index 5fc2ff79f..000000000 --- a/chapter05/gzip-inst.xml +++ /dev/null @@ -1,19 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Gzip</title> - -<para>Prepare Gzip to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/gzip.xml b/chapter05/gzip.xml index 5211e69a6..52f875b29 100644 --- a/chapter05/gzip.xml +++ b/chapter05/gzip.xml @@ -7,7 +7,25 @@ Estimated required disk space: &gzip-compsize-tools;</screen> &aa-gzip-shortdesc; &aa-gzip-dep; -&c5-gzip-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Gzip</title> + +<para>Prepare Gzip to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/kernelheaders-inst.xml b/chapter05/kernelheaders-inst.xml deleted file mode 100644 index ecfa07732..000000000 --- a/chapter05/kernelheaders-inst.xml +++ /dev/null @@ -1,46 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of the kernel headers</title> - -<para>As some packages need to refer to the kernel header files, we're going -to unpack the kernel archive now, set it up, and copy the required files to a -place where <userinput>gcc</userinput> can later find them.</para> - -<para>Prepare for the header installation with:</para> - -<screen><userinput>make mrproper</userinput></screen> - -<para>This ensures that the kernel tree is absolutely clean. The kernel team -recommends that this command be issued prior to <emphasis>each</emphasis> kernel -compilation. You shouldn't rely on the source tree being clean after -untarring.</para> - -<para>Create the <filename>include/linux/version.h</filename> file:</para> - -<screen><userinput>make include/linux/version.h</userinput></screen> - -<para>Create the platform-specific <filename>include/asm</filename> -symlink:</para> - -<screen><userinput>make symlinks</userinput></screen> - -<para>Install the platform-specific header files:</para> - -<screen><userinput>mkdir /tools/include/asm -cp include/asm/* /tools/include/asm -cp -R include/asm-generic /tools/include</userinput></screen> - -<para>Install the cross-platform kernel header files:</para> - -<screen><userinput>cp -R include/linux /tools/include</userinput></screen> - -<para>There are a few kernel header files which make use of the -<filename>autoconf.h</filename> header file. Since we do not yet configure the -kernel, we need to create this file ourselves in order to avoid compilation -failures. Create an empty <filename>autoconf.h</filename> file:</para> - -<screen><userinput>touch /tools/include/linux/autoconf.h</userinput></screen> - -</sect2> - diff --git a/chapter05/kernelheaders.xml b/chapter05/kernelheaders.xml index 8c4e7ca92..a5f3e3a0b 100644 --- a/chapter05/kernelheaders.xml +++ b/chapter05/kernelheaders.xml @@ -7,7 +7,52 @@ Estimated required disk space: &kernel-compsize-headers;</screen> &aa-kernel-shortdesc; &aa-kernel-dep; -&c5-kernelheaders-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of the kernel headers</title> + +<para>As some packages need to refer to the kernel header files, we're going +to unpack the kernel archive now, set it up, and copy the required files to a +place where <userinput>gcc</userinput> can later find them.</para> + +<para>Prepare for the header installation with:</para> + +<screen><userinput>make mrproper</userinput></screen> + +<para>This ensures that the kernel tree is absolutely clean. The kernel team +recommends that this command be issued prior to <emphasis>each</emphasis> kernel +compilation. You shouldn't rely on the source tree being clean after +untarring.</para> + +<para>Create the <filename>include/linux/version.h</filename> file:</para> + +<screen><userinput>make include/linux/version.h</userinput></screen> + +<para>Create the platform-specific <filename>include/asm</filename> +symlink:</para> + +<screen><userinput>make symlinks</userinput></screen> + +<para>Install the platform-specific header files:</para> + +<screen><userinput>mkdir /tools/include/asm +cp include/asm/* /tools/include/asm +cp -R include/asm-generic /tools/include</userinput></screen> + +<para>Install the cross-platform kernel header files:</para> + +<screen><userinput>cp -R include/linux /tools/include</userinput></screen> + +<para>There are a few kernel header files which make use of the +<filename>autoconf.h</filename> header file. Since we do not yet configure the +kernel, we need to create this file ourselves in order to avoid compilation +failures. Create an empty <filename>autoconf.h</filename> file:</para> + +<screen><userinput>touch /tools/include/linux/autoconf.h</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/make-inst.xml b/chapter05/make-inst.xml deleted file mode 100644 index d9e32bff7..000000000 --- a/chapter05/make-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Make</title> - -<para>Prepare Make to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the program:</para> - -<screen><userinput>make </userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Then install it and its documentation:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/make.xml b/chapter05/make.xml index 1a51acc3b..22cc4c543 100644 --- a/chapter05/make.xml +++ b/chapter05/make.xml @@ -7,7 +7,31 @@ Estimated required disk space: &make-compsize-tools;</screen> &aa-make-shortdesc; &aa-make-dep; -&c5-make-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Make</title> + +<para>Prepare Make to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the program:</para> + +<screen><userinput>make </userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Then install it and its documentation:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/ncurses-inst.xml b/chapter05/ncurses-inst.xml deleted file mode 100644 index dea216194..000000000 --- a/chapter05/ncurses-inst.xml +++ /dev/null @@ -1,43 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Ncurses</title> - -<para>Fix two minor things:</para> - -<screen><userinput>patch -Np1 -i ../&ncurses-etip-patch; -patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen> - -<para>The first patch corrects the <filename>etip.h</filename> header file, and -the second patch prevents some compiler warnings being issued on the use of -deprecated headers.</para> - -<para>Now prepare Ncurses to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools --with-shared \ - --without-debug --without-ada --enable-overwrite</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--without-ada</userinput>: This tells Ncurses not -to build its Ada bindings, even if an Ada compiler is installed on the host. -This must be done because once we enter the chroot environment, Ada will no -longer be available.</para></listitem> - -<listitem><para><userinput>--enable-overwrite</userinput>: This tells Ncurses -to install its header files into <filename class="directory">/tools/include</filename> -instead of <filename class="directory">/tools/include/ncurses</filename> to -ensure that other packages can find the Ncurses headers successfully.</para> -</listitem></itemizedlist> - -<para>Compile the programs and libraries:</para> - -<screen><userinput>make </userinput></screen> - -<para>Then install them and their documentation:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/ncurses.xml b/chapter05/ncurses.xml index b8c8a4465..9e02eaa4e 100644 --- a/chapter05/ncurses.xml +++ b/chapter05/ncurses.xml @@ -7,7 +7,49 @@ Estimated required disk space: &ncurses-compsize-tools;</screen> &aa-ncurses-shortdesc; &aa-ncurses-dep; -&c5-ncurses-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Ncurses</title> + +<para>Fix two minor things:</para> + +<screen><userinput>patch -Np1 -i ../&ncurses-etip-patch; +patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen> + +<para>The first patch corrects the <filename>etip.h</filename> header file, and +the second patch prevents some compiler warnings being issued on the use of +deprecated headers.</para> + +<para>Now prepare Ncurses to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools --with-shared \ + --without-debug --without-ada --enable-overwrite</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--without-ada</userinput>: This tells Ncurses not +to build its Ada bindings, even if an Ada compiler is installed on the host. +This must be done because once we enter the chroot environment, Ada will no +longer be available.</para></listitem> + +<listitem><para><userinput>--enable-overwrite</userinput>: This tells Ncurses +to install its header files into <filename class="directory">/tools/include</filename> +instead of <filename class="directory">/tools/include/ncurses</filename> to +ensure that other packages can find the Ncurses headers successfully.</para> +</listitem></itemizedlist> + +<para>Compile the programs and libraries:</para> + +<screen><userinput>make </userinput></screen> + +<para>Then install them and their documentation:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/patch-inst.xml b/chapter05/patch-inst.xml deleted file mode 100644 index a04fec408..000000000 --- a/chapter05/patch-inst.xml +++ /dev/null @@ -1,22 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Patch</title> - -<para>Prepare Patch to be compiled:</para> - -<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen> - -<para>The preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only needed -on the PowerPC platform. On other architectures you can leave it out.</para> - -<para>Compile the program:</para> - -<screen><userinput>make </userinput></screen> - -<para>Then install it and its documentation:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/patch.xml b/chapter05/patch.xml index f2471acad..7242ac399 100644 --- a/chapter05/patch.xml +++ b/chapter05/patch.xml @@ -7,7 +7,28 @@ Estimated required disk space: &patch-compsize-tools;</screen> &aa-patch-shortdesc; &aa-patch-dep; -&c5-patch-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Patch</title> + +<para>Prepare Patch to be compiled:</para> + +<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen> + +<para>The preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only needed +on the PowerPC platform. On other architectures you can leave it out.</para> + +<para>Compile the program:</para> + +<screen><userinput>make </userinput></screen> + +<para>Then install it and its documentation:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/perl-inst.xml b/chapter05/perl-inst.xml deleted file mode 100644 index 8b996c447..000000000 --- a/chapter05/perl-inst.xml +++ /dev/null @@ -1,29 +0,0 @@ -<sect2><title> </title><para> </para></sect2> -<sect2> -<title>Installation of Perl</title> - -<para>First adapt some hard-wired paths to the C library:</para> - -<screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen> - -<para>And make sure some static extensions get built:</para> - -<screen><userinput>chmod u+w hints/linux.sh -echo 'static_ext="IO re Fcntl"' >> hints/linux.sh</userinput></screen> - -<para>Now prepare Perl for compilation:</para> - -<screen><userinput>./configure.gnu --prefix=/tools</userinput></screen> - -<para>Compile only the required tools:</para> - -<screen><userinput>make perl utilities</userinput></screen> - -<para>Then copy these tools and their libraries:</para> - -<screen><userinput>cp perl pod/pod2man /tools/bin -mkdir -p /tools/lib/perl5/&perl-version; -cp -R lib/* /tools/lib/perl5/&perl-version;</userinput></screen> - -</sect2> - diff --git a/chapter05/perl.xml b/chapter05/perl.xml index d1ab2cafe..21ec2f969 100644 --- a/chapter05/perl.xml +++ b/chapter05/perl.xml @@ -7,7 +7,35 @@ Estimated required disk space: &perl-compsize-tools;</screen> &aa-perl-shortdesc; &aa-perl-dep; -&c5-perl-inst; + +<sect2><title> </title><para> </para></sect2> +<sect2> +<title>Installation of Perl</title> + +<para>First adapt some hard-wired paths to the C library:</para> + +<screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen> + +<para>And make sure some static extensions get built:</para> + +<screen><userinput>chmod u+w hints/linux.sh +echo 'static_ext="IO re Fcntl"' >> hints/linux.sh</userinput></screen> + +<para>Now prepare Perl for compilation:</para> + +<screen><userinput>./configure.gnu --prefix=/tools</userinput></screen> + +<para>Compile only the required tools:</para> + +<screen><userinput>make perl utilities</userinput></screen> + +<para>Then copy these tools and their libraries:</para> + +<screen><userinput>cp perl pod/pod2man /tools/bin +mkdir -p /tools/lib/perl5/&perl-version; +cp -R lib/* /tools/lib/perl5/&perl-version;</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/sed-inst.xml b/chapter05/sed-inst.xml deleted file mode 100644 index 7ea6c6bf3..000000000 --- a/chapter05/sed-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Sed</title> - -<para>Prepare Sed to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the program:</para> - -<screen><userinput>make </userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Then install it and its documentation:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/sed.xml b/chapter05/sed.xml index fe3c627d6..88e432ed2 100644 --- a/chapter05/sed.xml +++ b/chapter05/sed.xml @@ -7,7 +7,31 @@ Estimated required disk space: &sed-compsize-tools;</screen> &aa-sed-shortdesc; &aa-sed-dep; -&c5-sed-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Sed</title> + +<para>Prepare Sed to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the program:</para> + +<screen><userinput>make </userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Then install it and its documentation:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/tar-inst.xml b/chapter05/tar-inst.xml deleted file mode 100644 index 47c47ae88..000000000 --- a/chapter05/tar-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Tar</title> - -<para>Prepare Tar to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the programs:</para> - -<screen><userinput>make </userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Then install them and their documentation:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/tar.xml b/chapter05/tar.xml index 1011e943a..65f3dd19e 100644 --- a/chapter05/tar.xml +++ b/chapter05/tar.xml @@ -7,7 +7,31 @@ Estimated required disk space: &tar-compsize-tools;</screen> &aa-tar-shortdesc; &aa-tar-dep; -&c5-tar-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Tar</title> + +<para>Prepare Tar to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the programs:</para> + +<screen><userinput>make </userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Then install them and their documentation:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/tcl-inst.xml b/chapter05/tcl-inst.xml deleted file mode 100644 index c70070bf5..000000000 --- a/chapter05/tcl-inst.xml +++ /dev/null @@ -1,57 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Tcl</title> - -<para>This package and the next two are only installed to be able to run the -test suites for GCC and Binutils. Installing three packages just for testing -purposes may seem like overkill, but it is very reassuring, if not essential, -to know that our most important tools are working properly.</para> - -<para>Prepare Tcl to be compiled:</para> - -<screen><userinput>cd unix -./configure --prefix=/tools</userinput></screen> - -<para>Build the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. However, the Tcl test suite in this -chapter is known to experience failures under certain host conditions that are -not fully understood. Therefore, test suite failures here are not surprising, -but are not considered critical. Should you choose to run the test suite, the -following command will do so:</para> - -<screen><userinput>TZ=UTC make test</userinput></screen> - -<para>The meaning of the make option:</para> - -<itemizedlist> -<listitem><para><userinput>TZ=UTC</userinput>: This sets the time zone to -Coordinated Universal Time (UTC) also known as Greenwich Mean Time (GMT), but -only for the duration of the test suite run. This ensures the clock tests are -exercised correctly. More information on the TZ environment variable is -available later on in <xref linkend="chapter07"/>.</para></listitem> -</itemizedlist> - -<para>Sometimes, package test suites will give false failures. You can -consult the LFS Wiki at <ulink url="http://wiki.linuxfromscratch.org/"/> -to verify that these failures are normal. This applies to all tests -throughout the book.</para> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<important><para><emphasis>Do not remove</emphasis> the -<filename>tcl&tcl-version;</filename> source directory yet, as the next package -will need its internal headers.</para></important> - -<para>Make a necessary symbolic link:</para> - -<screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen> - -</sect2> - diff --git a/chapter05/tcl.xml b/chapter05/tcl.xml index 1813c50b2..c7863f457 100644 --- a/chapter05/tcl.xml +++ b/chapter05/tcl.xml @@ -7,7 +7,63 @@ Estimated required disk space: &tcl-compsize-tools;</screen> &aa-tcl-shortdesc; &aa-tcl-dep; -&c5-tcl-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Tcl</title> + +<para>This package and the next two are only installed to be able to run the +test suites for GCC and Binutils. Installing three packages just for testing +purposes may seem like overkill, but it is very reassuring, if not essential, +to know that our most important tools are working properly.</para> + +<para>Prepare Tcl to be compiled:</para> + +<screen><userinput>cd unix +./configure --prefix=/tools</userinput></screen> + +<para>Build the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. However, the Tcl test suite in this +chapter is known to experience failures under certain host conditions that are +not fully understood. Therefore, test suite failures here are not surprising, +but are not considered critical. Should you choose to run the test suite, the +following command will do so:</para> + +<screen><userinput>TZ=UTC make test</userinput></screen> + +<para>The meaning of the make option:</para> + +<itemizedlist> +<listitem><para><userinput>TZ=UTC</userinput>: This sets the time zone to +Coordinated Universal Time (UTC) also known as Greenwich Mean Time (GMT), but +only for the duration of the test suite run. This ensures the clock tests are +exercised correctly. More information on the TZ environment variable is +available later on in <xref linkend="chapter07"/>.</para></listitem> +</itemizedlist> + +<para>Sometimes, package test suites will give false failures. You can +consult the LFS Wiki at <ulink url="http://wiki.linuxfromscratch.org/"/> +to verify that these failures are normal. This applies to all tests +throughout the book.</para> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<important><para><emphasis>Do not remove</emphasis> the +<filename>tcl&tcl-version;</filename> source directory yet, as the next package +will need its internal headers.</para></important> + +<para>Make a necessary symbolic link:</para> + +<screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/texinfo-inst.xml b/chapter05/texinfo-inst.xml deleted file mode 100644 index 415226e4a..000000000 --- a/chapter05/texinfo-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Texinfo</title> - -<para>Prepare Texinfo to be compiled:</para> - -<screen><userinput>./configure --prefix=/tools</userinput></screen> - -<para>Compile the programs:</para> - -<screen><userinput>make </userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Then install them and their documentation:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter05/texinfo.xml b/chapter05/texinfo.xml index 53a4beaff..676b06752 100644 --- a/chapter05/texinfo.xml +++ b/chapter05/texinfo.xml @@ -7,7 +7,31 @@ Estimated required disk space: &texinfo-compsize-tools;</screen> &aa-texinfo-shortdesc; &aa-texinfo-dep; -&c5-texinfo-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Texinfo</title> + +<para>Prepare Texinfo to be compiled:</para> + +<screen><userinput>./configure --prefix=/tools</userinput></screen> + +<para>Compile the programs:</para> + +<screen><userinput>make </userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Then install them and their documentation:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter05/utillinux-inst.xml b/chapter05/utillinux-inst.xml deleted file mode 100644 index a38cb26c4..000000000 --- a/chapter05/utillinux-inst.xml +++ /dev/null @@ -1,31 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Util-linux</title> - -<para>Util-linux doesn't use the freshly installed headers and libraries from -the /tools directory. This is fixed by altering the configure script:</para> - -<screen><userinput>cp configure configure.backup -sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput> </screen> - -<para>Prepare Util-linux for compilation:</para> - -<screen><userinput>./configure</userinput></screen> - -<para>Compile some support routines:</para> - -<screen><userinput>make -C lib</userinput></screen> - -<para>And, since you'll need only a couple of the utilities contained in this -package, build just those:</para> - -<screen><userinput>make -C mount mount umount -make -C text-utils more</userinput></screen> - -<para>Now copy these programs to the temporary tools directory:</para> - -<screen><userinput>cp mount/{,u}mount text-utils/more /tools/bin</userinput></screen> - -</sect2> - diff --git a/chapter05/utillinux.xml b/chapter05/utillinux.xml index 0e0d7ff05..33c79ff99 100644 --- a/chapter05/utillinux.xml +++ b/chapter05/utillinux.xml @@ -7,6 +7,37 @@ Estimated required disk space: &util-linux-compsize-tools;</screen> &aa-utillinux-shortdesc; &aa-utillinux-dep; -&c5-utillinux-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Util-linux</title> + +<para>Util-linux doesn't use the freshly installed headers and libraries from +the /tools directory. This is fixed by altering the configure script:</para> + +<screen><userinput>cp configure configure.backup +sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput> </screen> + +<para>Prepare Util-linux for compilation:</para> + +<screen><userinput>./configure</userinput></screen> + +<para>Compile some support routines:</para> + +<screen><userinput>make -C lib</userinput></screen> + +<para>And, since you'll need only a couple of the utilities contained in this +package, build just those:</para> + +<screen><userinput>make -C mount mount umount +make -C text-utils more</userinput></screen> + +<para>Now copy these programs to the temporary tools directory:</para> + +<screen><userinput>cp mount/{,u}mount text-utils/more /tools/bin</userinput></screen> + +</sect2> </sect1> + |