From 73aedd1d35747ff2fad4ddf514dca810721a612a Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Sat, 1 Nov 2003 22:31:50 +0000 Subject: Merging caption and installation sections for all packages in chapters 5 and 6. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3052 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/bash-inst.xml | 35 -------- chapter05/bash.xml | 36 +++++++- chapter05/binutils-pass1-inst.xml | 106 ------------------------ chapter05/binutils-pass1.xml | 107 +++++++++++++++++++++++- chapter05/binutils-pass2-inst.xml | 68 --------------- chapter05/binutils-pass2.xml | 69 +++++++++++++++- chapter05/bzip2-inst.xml | 12 --- chapter05/bzip2.xml | 13 ++- chapter05/coreutils-inst.xml | 34 -------- chapter05/coreutils.xml | 35 +++++++- chapter05/dejagnu-inst.xml | 15 ---- chapter05/dejagnu.xml | 16 +++- chapter05/diffutils-inst.xml | 19 ----- chapter05/diffutils.xml | 20 ++++- chapter05/expect-inst.xml | 57 ------------- chapter05/expect.xml | 58 ++++++++++++- chapter05/findutils-inst.xml | 24 ------ chapter05/findutils.xml | 26 +++++- chapter05/gawk-inst.xml | 25 ------ chapter05/gawk.xml | 26 +++++- chapter05/gcc-pass1-inst.xml | 89 -------------------- chapter05/gcc-pass1.xml | 90 +++++++++++++++++++- chapter05/gcc-pass2-inst.xml | 164 ------------------------------------ chapter05/gcc-pass2.xml | 165 +++++++++++++++++++++++++++++++++++- chapter05/gettext-inst.xml | 29 ------- chapter05/gettext.xml | 31 ++++++- chapter05/glibc-inst.xml | 169 ------------------------------------- chapter05/glibc.xml | 170 +++++++++++++++++++++++++++++++++++++- chapter05/grep-inst.xml | 38 --------- chapter05/grep.xml | 39 ++++++++- chapter05/gzip-inst.xml | 19 ----- chapter05/gzip.xml | 20 ++++- chapter05/kernelheaders-inst.xml | 46 ----------- chapter05/kernelheaders.xml | 47 ++++++++++- chapter05/make-inst.xml | 25 ------ chapter05/make.xml | 26 +++++- chapter05/ncurses-inst.xml | 43 ---------- chapter05/ncurses.xml | 44 +++++++++- chapter05/patch-inst.xml | 22 ----- chapter05/patch.xml | 23 +++++- chapter05/perl-inst.xml | 29 ------- chapter05/perl.xml | 30 ++++++- chapter05/sed-inst.xml | 25 ------ chapter05/sed.xml | 26 +++++- chapter05/tar-inst.xml | 25 ------ chapter05/tar.xml | 26 +++++- chapter05/tcl-inst.xml | 57 ------------- chapter05/tcl.xml | 58 ++++++++++++- chapter05/texinfo-inst.xml | 25 ------ chapter05/texinfo.xml | 26 +++++- chapter05/utillinux-inst.xml | 31 ------- chapter05/utillinux.xml | 33 +++++++- 52 files changed, 1234 insertions(+), 1257 deletions(-) delete mode 100644 chapter05/bash-inst.xml delete mode 100644 chapter05/binutils-pass1-inst.xml delete mode 100644 chapter05/binutils-pass2-inst.xml delete mode 100644 chapter05/bzip2-inst.xml delete mode 100644 chapter05/coreutils-inst.xml delete mode 100644 chapter05/dejagnu-inst.xml delete mode 100644 chapter05/diffutils-inst.xml delete mode 100644 chapter05/expect-inst.xml delete mode 100644 chapter05/findutils-inst.xml delete mode 100644 chapter05/gawk-inst.xml delete mode 100644 chapter05/gcc-pass1-inst.xml delete mode 100644 chapter05/gcc-pass2-inst.xml delete mode 100644 chapter05/gettext-inst.xml delete mode 100644 chapter05/glibc-inst.xml delete mode 100644 chapter05/grep-inst.xml delete mode 100644 chapter05/gzip-inst.xml delete mode 100644 chapter05/kernelheaders-inst.xml delete mode 100644 chapter05/make-inst.xml delete mode 100644 chapter05/ncurses-inst.xml delete mode 100644 chapter05/patch-inst.xml delete mode 100644 chapter05/perl-inst.xml delete mode 100644 chapter05/sed-inst.xml delete mode 100644 chapter05/tar-inst.xml delete mode 100644 chapter05/tcl-inst.xml delete mode 100644 chapter05/texinfo-inst.xml delete mode 100644 chapter05/utillinux-inst.xml (limited to 'chapter05') 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 @@ -   - - -Installation of Bash - -Bash contains several known bugs. Fix these with the following -patch: - -patch -Np1 -i ../&bash-patch; - -Now prepare Bash for compilation: - -./configure --prefix=/tools - -Compile the program: - -make - -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: - -make tests - -Then install it and its documentation: - -make install - -And make a link for the programs that use sh -for a shell: - -ln -s bash /tools/bin/sh - - - 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; &aa-bash-shortdesc; &aa-bash-dep; -&c5-bash-inst; + +   + + +Installation of Bash + +Bash contains several known bugs. Fix these with the following +patch: + +patch -Np1 -i ../&bash-patch; + +Now prepare Bash for compilation: + +./configure --prefix=/tools + +Compile the program: + +make + +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: + +make tests + +Then install it and its documentation: + +make install + +And make a link for the programs that use sh +for a shell: + +ln -s bash /tools/bin/sh + + 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 @@ -   - - -Installation of Binutils - -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. - -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. - -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. - -The Binutils documentation recommends building Binutils outside of the -source directory in a dedicated build directory: - -mkdir ../binutils-build -cd ../binutils-build - -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: -time { ./configure ... && ... && ... && make install; }. - -Now prepare Binutils for compilation: - -../binutils-&binutils-version;/configure \ -    --prefix=/tools --disable-nls - -The meaning of the configure options: - - ---prefix=/tools: This tells the -configure script to prepare to install the Binutils programs in the -/tools directory. - ---disable-nls: This disables -internationalization (a word often shortened to i18n). We don't need this -for our static programs and nls often causes problems -when linking statically. - - -Continue with compiling the package: - -make configure-host -make LDFLAGS="-all-static" - -The meaning of the make options: - - -configure-host: 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. - -LDFLAGS="-all-static": This tells the -linker that all the Binutils programs should be linked statically. However, -strictly speaking, "-all-static" is first passed to the -libtool program which then passes -"-static" on to the linker. - - -And install the package: - -make install - -Now prepare the linker for the "locking in" of Glibc later on: - -make -C ld clean -make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib - -The meaning of the make options: - - --C ld clean: This tells the make program -to remove all the compiled files, but only in the ld -subdirectory. - --C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib: -This option rebuilds everything in the ld 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. - - - - - -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. - - - - - - 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; &aa-binutils-shortdesc; &aa-binutils-dep; -&c5-binutils-pass1-inst; + +   + + +Installation of Binutils + +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. + +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. + +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. + +The Binutils documentation recommends building Binutils outside of the +source directory in a dedicated build directory: + +mkdir ../binutils-build +cd ../binutils-build + +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: +time { ./configure ... && ... && ... && make install; }. + +Now prepare Binutils for compilation: + +../binutils-&binutils-version;/configure \ +    --prefix=/tools --disable-nls + +The meaning of the configure options: + + +--prefix=/tools: This tells the +configure script to prepare to install the Binutils programs in the +/tools directory. + +--disable-nls: This disables +internationalization (a word often shortened to i18n). We don't need this +for our static programs and nls often causes problems +when linking statically. + + +Continue with compiling the package: + +make configure-host +make LDFLAGS="-all-static" + +The meaning of the make options: + + +configure-host: 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. + +LDFLAGS="-all-static": This tells the +linker that all the Binutils programs should be linked statically. However, +strictly speaking, "-all-static" is first passed to the +libtool program which then passes +"-static" on to the linker. + + +And install the package: + +make install + +Now prepare the linker for the "locking in" of Glibc later on: + +make -C ld clean +make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib + +The meaning of the make options: + + +-C ld clean: This tells the make program +to remove all the compiled files, but only in the ld +subdirectory. + +-C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib: +This option rebuilds everything in the ld 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. + + + + + +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. + + + + + 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 @@ -   - - -Re-installation of Binutils - -Create a separate build directory again: - -mkdir ../binutils-build -cd ../binutils-build - -Now prepare Binutils to be compiled: - -../binutils-&binutils-version;/configure --prefix=/tools \ -    --enable-shared --with-lib-path=/tools/lib - -The meaning of the new configure option: - - ---with-lib-path=/tools/lib: 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. - - -Before starting to build Binutils, remember to unset any environment -variables that override the default optimization flags. - -Compile the package: - -make - -It's worth pointing out that running the Binutils test suite here -is considered not as important as running it in -. - -Test the results (there should be no unexpected failures here, expected -failures are fine): - -make check - -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: - -
make[1]: *** [check-binutils] Error 2
- -And install the package: - -make install - -Now prepare Binutils for the re-adjusting of the toolchain in the next -chapter: - -make -C ld clean -make -C ld LIB_PATH=/usr/lib:/lib - - - - -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. - - - - -
- 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 @@ Estimated build time: &binutils-time-tools-pass2; Estimated required disk space: &binutils-compsize-tools-pass2; -&c5-binutils-pass2-inst; + +   + + +Re-installation of Binutils + +Create a separate build directory again: + +mkdir ../binutils-build +cd ../binutils-build + +Now prepare Binutils to be compiled: + +../binutils-&binutils-version;/configure --prefix=/tools \ +    --enable-shared --with-lib-path=/tools/lib + +The meaning of the new configure option: + + +--with-lib-path=/tools/lib: 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. + + +Before starting to build Binutils, remember to unset any environment +variables that override the default optimization flags. + +Compile the package: + +make + +It's worth pointing out that running the Binutils test suite here +is considered not as important as running it in +. + +Test the results (there should be no unexpected failures here, expected +failures are fine): + +make check + +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: + +
make[1]: *** [check-binutils] Error 2
+ +And install the package: + +make install + +Now prepare Binutils for the re-adjusting of the toolchain in the next +chapter: + +make -C ld clean +make -C ld LIB_PATH=/usr/lib:/lib + + + + +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. + + + + +
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 @@ -   - - -Installation of Bzip2 - -The Bzip2 package doesn't contain a configure -script. Compile and install it with a straightforward: - -make PREFIX=/tools install - - - 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; &aa-bzip2-shortdesc; &aa-bzip2-dep; -&c5-bzip2-inst; + +   + + +Installation of Bzip2 + +The Bzip2 package doesn't contain a configure +script. Compile and install it with a straightforward: + +make PREFIX=/tools install + + 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 @@ -   - - -Installation of Coreutils - -Prepare Coreutils to be compiled: - -./configure --prefix=/tools - -Compile the package: - -make - -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: - -make RUN_EXPENSIVE_TESTS=yes check - -The meaning of the make option: - - -RUN_EXPENSIVE_TESTS=yes: 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. - - -And install the package: - -make install - - - 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; &aa-coreutils-shortdesc; &aa-coreutils-dep; -&c5-coreutils-inst; + +   + + +Installation of Coreutils + +Prepare Coreutils to be compiled: + +./configure --prefix=/tools + +Compile the package: + +make + +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: + +make RUN_EXPENSIVE_TESTS=yes check + +The meaning of the make option: + + +RUN_EXPENSIVE_TESTS=yes: 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. + + +And install the package: + +make install + + 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 @@ -   - - -Installation of DejaGnu - -Prepare DejaGnu to be compiled: - -./configure --prefix=/tools - -Build and install the package: - -make install - - - 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; &aa-dejagnu-shortdesc; &aa-dejagnu-dep; -&c5-dejagnu-inst; + +   + + +Installation of DejaGnu + +Prepare DejaGnu to be compiled: + +./configure --prefix=/tools + +Build and install the package: + +make install + + 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 @@ -   - - -Installation of Diffutils - -Prepare Diffutils to be compiled: - -./configure --prefix=/tools - -Compile the package: - -make - -And install it: - -make install - - - 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; &aa-diffutils-shortdesc; &aa-diffutils-dep; -&c5-diffutils-inst; + +   + + +Installation of Diffutils + +Prepare Diffutils to be compiled: + +./configure --prefix=/tools + +Compile the package: + +make + +And install it: + +make install + + 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 @@ -   - - -Installation of Expect - -First apply a patch: - -patch -Np1 -i ../&expect-patch; - -This fixes a bug in Expect that can result in bogus failures during the -GCC test suite run. - -Now prepare Expect to be compiled: - -./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no - -The meaning of the configure options: - - ---with-tcl=/tools/lib: 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. - ---with-x=no: 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. - - -Build the package: - -make - -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: - -make test - -And install: - -make SCRIPTS="" install - -The meaning of the make option: - - -SCRIPTS="": This prevents installation of -the supplementary expect scripts which are not needed. - - -You can now remove the source directories of both Tcl and Expect. - - - 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; &aa-expect-shortdesc; &aa-expect-dep; -&c5-expect-inst; + +   + + +Installation of Expect + +First apply a patch: + +patch -Np1 -i ../&expect-patch; + +This fixes a bug in Expect that can result in bogus failures during the +GCC test suite run. + +Now prepare Expect to be compiled: + +./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no + +The meaning of the configure options: + + +--with-tcl=/tools/lib: 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. + +--with-x=no: 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. + + +Build the package: + +make + +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: + +make test + +And install: + +make SCRIPTS="" install + +The meaning of the make option: + + +SCRIPTS="": This prevents installation of +the supplementary expect scripts which are not needed. + + +You can now remove the source directories of both Tcl and Expect. + + 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 @@ -   - - -Installing Findutils - -Prepare Findutils to be compiled: - -./configure --prefix=/tools - -Compile the package: - -make - -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: - -make check - -And install the package: - -make install - - 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; &aa-findutils-shortdesc; &aa-findutils-dep; -&c5-findutils-inst; + +   + + +Installing Findutils + +Prepare Findutils to be compiled: + +./configure --prefix=/tools + +Compile the package: + +make + +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: + +make check + +And install the package: + +make install + + 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 @@ -   - - -Installation of Gawk - -Prepare Gawk to be compiled: - -./configure --prefix=/tools - -Compile the package: - -make - -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: - -make check - -And install it: - -make install - - - 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; &aa-gawk-shortdesc; &aa-gawk-dep; -&c5-gawk-inst; + +   + + +Installation of Gawk + +Prepare Gawk to be compiled: + +./configure --prefix=/tools + +Compile the package: + +make + +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: + +make check + +And install it: + +make install + + 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 @@ -   - - -Installation of GCC - -Unpack only the GCC-core tarball, as we won't be needing a C++ compiler -for the moment. - -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. - -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. - -The GCC documentation recommends building GCC outside of the source -directory in a dedicated build directory: - -mkdir ../gcc-build -cd ../gcc-build - -Prepare GCC to be compiled: - -../gcc-&gcc-version;/configure --prefix=/tools \ -    --with-local-prefix=/tools \ -    --disable-nls --enable-shared \ -    --enable-languages=c - -The meaning of the configure options: - - ---with-local-prefix=/tools: The -purpose of this switch is to remove /usr/local/include -from gcc'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. - ---enable-shared: This switch may -seem counter-intuitive at first. But using it allows the building of -libgcc_s.so.1 and libgcc_eh.a, and -having libgcc_eh.a available ensures that the configure -script for Glibc (the next package we compile) produces the proper results. -Note that the gcc binaries will still be linked -statically, as this is controlled by the -static -value of BOOT_LDFLAGS further on. - ---enable-languages=c: 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. - - -Continue with compiling the package: - -make BOOT_LDFLAGS="-static" bootstrap - -The meaning of the make parameters: - - -BOOT_LDFLAGS="-static": This tells -GCC to link its programs statically. - -bootstrap: 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. - - -And install the package: - -make install - -As a finishing touch we'll create the /tools/bin/cc symlink. Many programs and -scripts run cc instead of gcc, -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 -cc leaves the system administrator free to decide what -C compiler to install, as long as there's a symlink pointing to it: - -ln -sf gcc /tools/bin/cc - - - 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; &aa-gcc-shortdesc; &aa-gcc-dep; -&c5-gcc-pass1-inst; + +   + + +Installation of GCC + +Unpack only the GCC-core tarball, as we won't be needing a C++ compiler +for the moment. + +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. + +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. + +The GCC documentation recommends building GCC outside of the source +directory in a dedicated build directory: + +mkdir ../gcc-build +cd ../gcc-build + +Prepare GCC to be compiled: + +../gcc-&gcc-version;/configure --prefix=/tools \ +    --with-local-prefix=/tools \ +    --disable-nls --enable-shared \ +    --enable-languages=c + +The meaning of the configure options: + + +--with-local-prefix=/tools: The +purpose of this switch is to remove /usr/local/include +from gcc'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. + +--enable-shared: This switch may +seem counter-intuitive at first. But using it allows the building of +libgcc_s.so.1 and libgcc_eh.a, and +having libgcc_eh.a available ensures that the configure +script for Glibc (the next package we compile) produces the proper results. +Note that the gcc binaries will still be linked +statically, as this is controlled by the -static +value of BOOT_LDFLAGS further on. + +--enable-languages=c: 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. + + +Continue with compiling the package: + +make BOOT_LDFLAGS="-static" bootstrap + +The meaning of the make parameters: + + +BOOT_LDFLAGS="-static": This tells +GCC to link its programs statically. + +bootstrap: 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. + + +And install the package: + +make install + +As a finishing touch we'll create the /tools/bin/cc symlink. Many programs and +scripts run cc instead of gcc, +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 +cc leaves the system administrator free to decide what +C compiler to install, as long as there's a symlink pointing to it: + +ln -sf gcc /tools/bin/cc + + 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 @@ -   - - -Re-installation of GCC - -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 devpts file system. You can quickly -check if your host system is set up correctly in this regard by performing a -simple test: - -expect -c "spawn ls" - -If you receive the message: - -
The system has no more ptys. Ask your system administrator to create more.
- -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 - for more information on how to -get PTYs working. - -Unpack all three GCC tarballs (-core, -g++, and -testsuite) in one and the -same working directory. They will all unfold into a single -gcc-&gcc-version;/ subdirectory. - -First correct one problem and make an essential adjustment: - -patch -Np1 -i ../&gcc-nofixincludes-patch; -patch -Np1 -i ../&gcc-specs-patch; - -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 -, 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. - -The last patch changes GCC's default location of the dynamic linker -(typically ld-linux.so.2). It also removes -/usr/include 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. - -These patches are critical in ensuring a -successful overall build. Do not forget to apply them. - -Create a separate build directory again: - -mkdir ../gcc-build -cd ../gcc-build - -Before starting to build GCC, remember to unset any environment -variables that override the default optimization flags. - -Now prepare GCC to be compiled: - -../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++ - -The meaning of the new configure options: - - ---enable-threads=posix: This enables -C++ exception handling for multi-threaded code. - ---enable-__cxa_atexit: 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. - ---enable-clocale=gnu: This option ensures -the correct locale model is selected for the C++ libraries under all -circumstances. If the configure script finds the de_DE -locale installed, it will select the correct model of gnu. -However, people who don't install the de_DE locale, run the -risk of building ABI incompatible C++ libraries due to the wrong locale model of -generic being selected. - ---enable-languages=c,c++: This option is -needed to ensure that both C and C++ compilers are built. - - -Compile the package: - -make - -There is no need to use the bootstrap 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. - -It's worth pointing out that running the GCC test suite here -is considered not as important as running it in -. - -Test the results: - -make -k check - -The -k 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: - -../gcc-&gcc-version;/contrib/test_summary | more - -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 -. - -Note that the results contain: - -* 1 XPASS (unexpected pass) for g++ -* 1 FAIL (unexpected failure) for g++ -* 2 FAIL for gcc -* 26 XPASS's for libstdc++ - -The unexpected pass for g++ is due to the use of ---enable-__cxa_atexit. 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. - -The 26 unexpected passes for libstdc++ are due to the use of ---enable-clocale=gnu, 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. - -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. - -And finally install the package: - -make install - -At this point it is strongly recommended to repeat the sanity check -we performed earlier in the chapter. Refer back to - and repeat the check. If the results are -wrong, then most likely you forgot to apply the above mentioned GCC Specs -patch. - -
- 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 @@ Estimated build time: &gcc-time-tools-pass2; Estimated required disk space: &gcc-compsize-tools-pass2; -&c5-gcc-pass2-inst; + +   + + +Re-installation of GCC + +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 devpts file system. You can quickly +check if your host system is set up correctly in this regard by performing a +simple test: + +expect -c "spawn ls" + +If you receive the message: + +
The system has no more ptys. Ask your system administrator to create more.
+ +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 + for more information on how to +get PTYs working. + +Unpack all three GCC tarballs (-core, -g++, and -testsuite) in one and the +same working directory. They will all unfold into a single +gcc-&gcc-version;/ subdirectory. + +First correct one problem and make an essential adjustment: + +patch -Np1 -i ../&gcc-nofixincludes-patch; +patch -Np1 -i ../&gcc-specs-patch; + +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 +, 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. + +The last patch changes GCC's default location of the dynamic linker +(typically ld-linux.so.2). It also removes +/usr/include 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. + +These patches are critical in ensuring a +successful overall build. Do not forget to apply them. + +Create a separate build directory again: + +mkdir ../gcc-build +cd ../gcc-build + +Before starting to build GCC, remember to unset any environment +variables that override the default optimization flags. + +Now prepare GCC to be compiled: + +../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++ + +The meaning of the new configure options: + + +--enable-threads=posix: This enables +C++ exception handling for multi-threaded code. + +--enable-__cxa_atexit: 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. + +--enable-clocale=gnu: This option ensures +the correct locale model is selected for the C++ libraries under all +circumstances. If the configure script finds the de_DE +locale installed, it will select the correct model of gnu. +However, people who don't install the de_DE locale, run the +risk of building ABI incompatible C++ libraries due to the wrong locale model of +generic being selected. + +--enable-languages=c,c++: This option is +needed to ensure that both C and C++ compilers are built. + + +Compile the package: + +make + +There is no need to use the bootstrap 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. + +It's worth pointing out that running the GCC test suite here +is considered not as important as running it in +. + +Test the results: + +make -k check + +The -k 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: + +../gcc-&gcc-version;/contrib/test_summary | more + +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 +. + +Note that the results contain: + +* 1 XPASS (unexpected pass) for g++ +* 1 FAIL (unexpected failure) for g++ +* 2 FAIL for gcc +* 26 XPASS's for libstdc++ + +The unexpected pass for g++ is due to the use of +--enable-__cxa_atexit. 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. + +The 26 unexpected passes for libstdc++ are due to the use of +--enable-clocale=gnu, 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. + +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. + +And finally install the package: + +make install + +At this point it is strongly recommended to repeat the sanity check +we performed earlier in the chapter. Refer back to + and repeat the check. If the results are +wrong, then most likely you forgot to apply the above mentioned GCC Specs +patch. + +
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 @@ -   - - -Installation of Gettext - -Prepare Gettext to be compiled: - -./configure --prefix=/tools - -Compile the programs: - -make - -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: - -make check - -And install the package: - -make install - - - 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; &aa-gettext-shortdesc; &aa-gettext-dep; -&c5-gettext-inst; + +   + + +Installation of Gettext + +Prepare Gettext to be compiled: + +./configure --prefix=/tools + +Compile the programs: + +make + +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: + +make check + +And install the package: + +make install + + + 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 @@ -   - - -Glibc installation - -Before starting to install Glibc, you must cd -into the glibc-&glibc-version; directory and unpack -Glibc-linuxthreads in that directory, not in the directory where you usually -unpack all the sources. - -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 -. - -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. - -Basically, compiling Glibc in any other way than the book suggests -is putting the stability of your system at risk. - -Though it is a harmless message, the install stage of Glibc will -complain about the absence of /tools/etc/ld.so.conf. -Fix this annoying little warning with: - -mkdir /tools/etc -touch /tools/etc/ld.so.conf - -Also, Glibc has a subtle problem when compiled with GCC &gcc-version;. -Apply the following patch to fix this: - -patch -Np1 -i ../&glibc-sscanf-patch; - -The Glibc documentation recommends building Glibc outside of the source -directory in a dedicated build directory: - -mkdir ../glibc-build -cd ../glibc-build - -Next, prepare Glibc to be compiled: - -../glibc-&glibc-version;/configure --prefix=/tools \ -    --disable-profile --enable-add-ons \ -    --with-headers=/tools/include \ -    --with-binutils=/tools/bin \ -    --without-gd - -The meaning of the configure options: - - ---disable-profile: This disables the -building of the libraries with profiling information. Omit this option if you -plan to do profiling. - ---enable-add-ons: This enables any -add-ons that were installed with Glibc, in our case Linuxthreads. - ---with-binutils=/tools/bin and ---with-headers=/tools/include: 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. - - --without-gd: This switch ensures -that we don't build the memusagestat program, which -strangely enough insists on linking against the host's libraries (libgd, -libpng, libz, and so forth). - - -During this stage you might see the following warning: - -
configure: WARNING: -*** These auxiliary programs are missing or incompatible versions: msgfmt -*** some features will be disabled. -*** Check the INSTALL file for required versions.
- -The missing or incompatible msgfmt program is -generally harmless, but it's believed it can sometimes cause problems when -running the test suite. - -Compile the package: - -make - -Run the test suite: - -make check - -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 . 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: - - -The math 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. - -The gettext test sometimes fails due to -host system issues. The exact reasons are not yet clear. - -The atime test sometimes fails when the -LFS partition is mounted with the noatime option, or due -to other file system quirks. - -The shm test might fail when the host -system is running the devfs file system but doesn't have the tmpfs file system -mounted at /dev/shm due to lack of support for tmpfs in -the kernel. - -When running on older and slower hardware, some tests might -fail due to test timeouts being exceeded. - - -In summary, don't worry too much if you see Glibc test suite failures -here in this chapter. The Glibc in 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 some failures -could still occur -- the math -tests for example. When experiencing a failure, make a note of it, then -continue by reissuing the make check. The test suite -should pick up where it left off and continue on. You can circumvent this -stop-start sequence by issuing a make -k check. 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. - -Now install the package: - -make install - -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 -locales. We'll install the Glibc locales now: - -make localedata/install-locales - -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 -localedef command. Information on this can be -found in the INSTALL file in the -glibc-&glibc-version; source. However, there are a number -of locales that are essential for the tests of future packages to pass, in -particular, the libstdc++ 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: - -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 - -
- 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; &aa-glibc-shortdesc; &aa-glibc-dep; -&c5-glibc-inst; + +   + + +Glibc installation + +Before starting to install Glibc, you must cd +into the glibc-&glibc-version; directory and unpack +Glibc-linuxthreads in that directory, not in the directory where you usually +unpack all the sources. + +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 +. + +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. + +Basically, compiling Glibc in any other way than the book suggests +is putting the stability of your system at risk. + +Though it is a harmless message, the install stage of Glibc will +complain about the absence of /tools/etc/ld.so.conf. +Fix this annoying little warning with: + +mkdir /tools/etc +touch /tools/etc/ld.so.conf + +Also, Glibc has a subtle problem when compiled with GCC &gcc-version;. +Apply the following patch to fix this: + +patch -Np1 -i ../&glibc-sscanf-patch; + +The Glibc documentation recommends building Glibc outside of the source +directory in a dedicated build directory: + +mkdir ../glibc-build +cd ../glibc-build + +Next, prepare Glibc to be compiled: + +../glibc-&glibc-version;/configure --prefix=/tools \ +    --disable-profile --enable-add-ons \ +    --with-headers=/tools/include \ +    --with-binutils=/tools/bin \ +    --without-gd + +The meaning of the configure options: + + +--disable-profile: This disables the +building of the libraries with profiling information. Omit this option if you +plan to do profiling. + +--enable-add-ons: This enables any +add-ons that were installed with Glibc, in our case Linuxthreads. + +--with-binutils=/tools/bin and +--with-headers=/tools/include: 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. + + --without-gd: This switch ensures +that we don't build the memusagestat program, which +strangely enough insists on linking against the host's libraries (libgd, +libpng, libz, and so forth). + + +During this stage you might see the following warning: + +
configure: WARNING: +*** These auxiliary programs are missing or incompatible versions: msgfmt +*** some features will be disabled. +*** Check the INSTALL file for required versions.
+ +The missing or incompatible msgfmt program is +generally harmless, but it's believed it can sometimes cause problems when +running the test suite. + +Compile the package: + +make + +Run the test suite: + +make check + +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 . 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: + + +The math 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. + +The gettext test sometimes fails due to +host system issues. The exact reasons are not yet clear. + +The atime test sometimes fails when the +LFS partition is mounted with the noatime option, or due +to other file system quirks. + +The shm test might fail when the host +system is running the devfs file system but doesn't have the tmpfs file system +mounted at /dev/shm due to lack of support for tmpfs in +the kernel. + +When running on older and slower hardware, some tests might +fail due to test timeouts being exceeded. + + +In summary, don't worry too much if you see Glibc test suite failures +here in this chapter. The Glibc in 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 some failures +could still occur -- the math +tests for example. When experiencing a failure, make a note of it, then +continue by reissuing the make check. The test suite +should pick up where it left off and continue on. You can circumvent this +stop-start sequence by issuing a make -k check. 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. + +Now install the package: + +make install + +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 +locales. We'll install the Glibc locales now: + +make localedata/install-locales + +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 +localedef command. Information on this can be +found in the INSTALL file in the +glibc-&glibc-version; source. However, there are a number +of locales that are essential for the tests of future packages to pass, in +particular, the libstdc++ 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: + +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 + +
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 @@ -   - - -Installation of Grep - -Prepare Grep to be compiled: - -./configure --prefix=/tools \ -    --disable-perl-regexp --with-included-regex - -The meaning of the configure options: - - ---disable-perl-regexp: This makes sure -that grep 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. ---with-included-regex: 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. - - -Compile the programs: - -make - -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: - -make check - -Then install them and their documentation: - -make install - - - 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; &aa-grep-shortdesc; &aa-grep-dep; -&c5-grep-inst; + +   + + +Installation of Grep + +Prepare Grep to be compiled: + +./configure --prefix=/tools \ +    --disable-perl-regexp --with-included-regex + +The meaning of the configure options: + + +--disable-perl-regexp: This makes sure +that grep 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. +--with-included-regex: 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. + + +Compile the programs: + +make + +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: + +make check + +Then install them and their documentation: + +make install + + 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 @@ -   - - -Installation of Gzip - -Prepare Gzip to be compiled: - -./configure --prefix=/tools - -Compile the package: - -make - -And install it: - -make install - - - 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; &aa-gzip-shortdesc; &aa-gzip-dep; -&c5-gzip-inst; + +   + + +Installation of Gzip + +Prepare Gzip to be compiled: + +./configure --prefix=/tools + +Compile the package: + +make + +And install it: + +make install + + 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 @@ -   - - -Installation of the kernel headers - -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 gcc can later find them. - -Prepare for the header installation with: - -make mrproper - -This ensures that the kernel tree is absolutely clean. The kernel team -recommends that this command be issued prior to each kernel -compilation. You shouldn't rely on the source tree being clean after -untarring. - -Create the include/linux/version.h file: - -make include/linux/version.h - -Create the platform-specific include/asm -symlink: - -make symlinks - -Install the platform-specific header files: - -mkdir /tools/include/asm -cp include/asm/* /tools/include/asm -cp -R include/asm-generic /tools/include - -Install the cross-platform kernel header files: - -cp -R include/linux /tools/include - -There are a few kernel header files which make use of the -autoconf.h 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 autoconf.h file: - -touch /tools/include/linux/autoconf.h - - - 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; &aa-kernel-shortdesc; &aa-kernel-dep; -&c5-kernelheaders-inst; + +   + + +Installation of the kernel headers + +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 gcc can later find them. + +Prepare for the header installation with: + +make mrproper + +This ensures that the kernel tree is absolutely clean. The kernel team +recommends that this command be issued prior to each kernel +compilation. You shouldn't rely on the source tree being clean after +untarring. + +Create the include/linux/version.h file: + +make include/linux/version.h + +Create the platform-specific include/asm +symlink: + +make symlinks + +Install the platform-specific header files: + +mkdir /tools/include/asm +cp include/asm/* /tools/include/asm +cp -R include/asm-generic /tools/include + +Install the cross-platform kernel header files: + +cp -R include/linux /tools/include + +There are a few kernel header files which make use of the +autoconf.h 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 autoconf.h file: + +touch /tools/include/linux/autoconf.h + + 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 @@ -   - - -Installation of Make - -Prepare Make to be compiled: - -./configure --prefix=/tools - -Compile the program: - -make - -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: - -make check - -Then install it and its documentation: - -make install - - - 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; &aa-make-shortdesc; &aa-make-dep; -&c5-make-inst; + +   + + +Installation of Make + +Prepare Make to be compiled: + +./configure --prefix=/tools + +Compile the program: + +make + +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: + +make check + +Then install it and its documentation: + +make install + + 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 @@ -   - - -Installation of Ncurses - -Fix two minor things: - -patch -Np1 -i ../&ncurses-etip-patch; -patch -Np1 -i ../&ncurses-vsscanf-patch; - -The first patch corrects the etip.h header file, and -the second patch prevents some compiler warnings being issued on the use of -deprecated headers. - -Now prepare Ncurses to be compiled: - -./configure --prefix=/tools --with-shared \ -    --without-debug --without-ada --enable-overwrite - -The meaning of the configure options: - - ---without-ada: 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. - ---enable-overwrite: This tells Ncurses -to install its header files into /tools/include -instead of /tools/include/ncurses to -ensure that other packages can find the Ncurses headers successfully. - - -Compile the programs and libraries: - -make - -Then install them and their documentation: - -make install - - - 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; &aa-ncurses-shortdesc; &aa-ncurses-dep; -&c5-ncurses-inst; + +   + + +Installation of Ncurses + +Fix two minor things: + +patch -Np1 -i ../&ncurses-etip-patch; +patch -Np1 -i ../&ncurses-vsscanf-patch; + +The first patch corrects the etip.h header file, and +the second patch prevents some compiler warnings being issued on the use of +deprecated headers. + +Now prepare Ncurses to be compiled: + +./configure --prefix=/tools --with-shared \ +    --without-debug --without-ada --enable-overwrite + +The meaning of the configure options: + + +--without-ada: 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. + +--enable-overwrite: This tells Ncurses +to install its header files into /tools/include +instead of /tools/include/ncurses to +ensure that other packages can find the Ncurses headers successfully. + + +Compile the programs and libraries: + +make + +Then install them and their documentation: + +make install + + 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 @@ -   - - -Installation of Patch - -Prepare Patch to be compiled: - -CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools - -The preprocessor flag -D_GNU_SOURCE is only needed -on the PowerPC platform. On other architectures you can leave it out. - -Compile the program: - -make - -Then install it and its documentation: - -make install - - - 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; &aa-patch-shortdesc; &aa-patch-dep; -&c5-patch-inst; + +   + + +Installation of Patch + +Prepare Patch to be compiled: + +CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools + +The preprocessor flag -D_GNU_SOURCE is only needed +on the PowerPC platform. On other architectures you can leave it out. + +Compile the program: + +make + +Then install it and its documentation: + +make install + + 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 @@ -   - -Installation of Perl - -First adapt some hard-wired paths to the C library: - -patch -Np1 -i ../&perl-libc-patch; - -And make sure some static extensions get built: - -chmod u+w hints/linux.sh -echo 'static_ext="IO re Fcntl"' >> hints/linux.sh - -Now prepare Perl for compilation: - -./configure.gnu --prefix=/tools - -Compile only the required tools: - -make perl utilities - -Then copy these tools and their libraries: - -cp perl pod/pod2man /tools/bin -mkdir -p /tools/lib/perl5/&perl-version; -cp -R lib/* /tools/lib/perl5/&perl-version; - - - 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; &aa-perl-shortdesc; &aa-perl-dep; -&c5-perl-inst; + +   + +Installation of Perl + +First adapt some hard-wired paths to the C library: + +patch -Np1 -i ../&perl-libc-patch; + +And make sure some static extensions get built: + +chmod u+w hints/linux.sh +echo 'static_ext="IO re Fcntl"' >> hints/linux.sh + +Now prepare Perl for compilation: + +./configure.gnu --prefix=/tools + +Compile only the required tools: + +make perl utilities + +Then copy these tools and their libraries: + +cp perl pod/pod2man /tools/bin +mkdir -p /tools/lib/perl5/&perl-version; +cp -R lib/* /tools/lib/perl5/&perl-version; + + 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 @@ -   - - -Installation of Sed - -Prepare Sed to be compiled: - -./configure --prefix=/tools - -Compile the program: - -make - -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: - -make check - -Then install it and its documentation: - -make install - - - 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; &aa-sed-shortdesc; &aa-sed-dep; -&c5-sed-inst; + +   + + +Installation of Sed + +Prepare Sed to be compiled: + +./configure --prefix=/tools + +Compile the program: + +make + +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: + +make check + +Then install it and its documentation: + +make install + + 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 @@ -   - - -Installation of Tar - -Prepare Tar to be compiled: - -./configure --prefix=/tools - -Compile the programs: - -make - -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: - -make check - -Then install them and their documentation: - -make install - - - 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; &aa-tar-shortdesc; &aa-tar-dep; -&c5-tar-inst; + +   + + +Installation of Tar + +Prepare Tar to be compiled: + +./configure --prefix=/tools + +Compile the programs: + +make + +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: + +make check + +Then install them and their documentation: + +make install + + 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 @@ -   - - -Installation of Tcl - -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. - -Prepare Tcl to be compiled: - -cd unix -./configure --prefix=/tools - -Build the package: - -make - -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: - -TZ=UTC make test - -The meaning of the make option: - - -TZ=UTC: 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 . - - -Sometimes, package test suites will give false failures. You can -consult the LFS Wiki at -to verify that these failures are normal. This applies to all tests -throughout the book. - -Install the package: - -make install - -Do not remove the -tcl&tcl-version; source directory yet, as the next package -will need its internal headers. - -Make a necessary symbolic link: - -ln -s tclsh8.4 /tools/bin/tclsh - - - 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; &aa-tcl-shortdesc; &aa-tcl-dep; -&c5-tcl-inst; + +   + + +Installation of Tcl + +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. + +Prepare Tcl to be compiled: + +cd unix +./configure --prefix=/tools + +Build the package: + +make + +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: + +TZ=UTC make test + +The meaning of the make option: + + +TZ=UTC: 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 . + + +Sometimes, package test suites will give false failures. You can +consult the LFS Wiki at +to verify that these failures are normal. This applies to all tests +throughout the book. + +Install the package: + +make install + +Do not remove the +tcl&tcl-version; source directory yet, as the next package +will need its internal headers. + +Make a necessary symbolic link: + +ln -s tclsh8.4 /tools/bin/tclsh + + 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 @@ -   - - -Installation of Texinfo - -Prepare Texinfo to be compiled: - -./configure --prefix=/tools - -Compile the programs: - -make - -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: - -make check - -Then install them and their documentation: - -make install - - - 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; &aa-texinfo-shortdesc; &aa-texinfo-dep; -&c5-texinfo-inst; + +   + + +Installation of Texinfo + +Prepare Texinfo to be compiled: + +./configure --prefix=/tools + +Compile the programs: + +make + +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: + +make check + +Then install them and their documentation: + +make install + + 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 @@ -   - - -Installation of Util-linux - -Util-linux doesn't use the freshly installed headers and libraries from -the /tools directory. This is fixed by altering the configure script: - -cp configure configure.backup -sed "s@/usr/include@/tools/include@g" configure.backup > configure - -Prepare Util-linux for compilation: - -./configure - -Compile some support routines: - -make -C lib - -And, since you'll need only a couple of the utilities contained in this -package, build just those: - -make -C mount mount umount -make -C text-utils more - -Now copy these programs to the temporary tools directory: - -cp mount/{,u}mount text-utils/more /tools/bin - - - 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; &aa-utillinux-shortdesc; &aa-utillinux-dep; -&c5-utillinux-inst; + +   + + +Installation of Util-linux + +Util-linux doesn't use the freshly installed headers and libraries from +the /tools directory. This is fixed by altering the configure script: + +cp configure configure.backup +sed "s@/usr/include@/tools/include@g" configure.backup > configure + +Prepare Util-linux for compilation: + +./configure + +Compile some support routines: + +make -C lib + +And, since you'll need only a couple of the utilities contained in this +package, build just those: + +make -C mount mount umount +make -C text-utils more + +Now copy these programs to the temporary tools directory: + +cp mount/{,u}mount text-utils/more /tools/bin + + + -- cgit v1.2.3-54-g00ecf