From 6a82dd9a1814badb87e18df165474a8b89a39b73 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sat, 4 Feb 2006 13:28:41 +0000 Subject: Indenting chapter 6, part 5 git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7344 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/gawk.xml | 262 ++++++---- chapter06/gcc.xml | 374 ++++++++------ chapter06/gettext.xml | 655 +++++++++++++---------- chapter06/glibc.xml | 1378 +++++++++++++++++++++++++++---------------------- chapter06/grep.xml | 163 +++--- 5 files changed, 1581 insertions(+), 1251 deletions(-) (limited to 'chapter06') diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml index 710ef57ef..13e5bb818 100644 --- a/chapter06/gawk.xml +++ b/chapter06/gawk.xml @@ -1,145 +1,181 @@ - %general-entities; ]> + -Gawk-&gawk-version; - + + + Gawk-&gawk-version; + + + Gawk + + + + -<indexterm zone="ch-system-gawk"><primary sortas="a-Gawk">Gawk</primary></indexterm> + <para>The Gawk package contains programs for manipulating text files.</para> -<sect2 role="package"><title/> -<para>The Gawk package contains programs for manipulating text files.</para> + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> -<segmentedlist> -<segtitle>&buildtime;</segtitle> -<segtitle>&diskspace;</segtitle> -<seglistitem><seg>0.2 SBU</seg><seg>16.4 MB</seg></seglistitem> -</segmentedlist> + <seglistitem> + <seg>0.2 SBU</seg> + <seg>16.4 MB</seg> + </seglistitem> + </segmentedlist> -<segmentedlist> -<segtitle>&dependencies;</segtitle> -<seglistitem><seg>Bash, Binutils, Coreutils, -Diffutils, GCC, Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem> -</segmentedlist> -</sect2> + <segmentedlist> + <segtitle>&dependencies;</segtitle> -<sect2 role="installation"> -<title>Installation of Gawk + + Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, + Grep, Make, and Sed + + -Under some circumstances, Gawk-&gawk-version; attempts to free a chunk -of memory that was not allocated. This bug is fixed by the following patch: + + + + Installation of Gawk + + Under some circumstances, Gawk-&gawk-version; attempts to free a + chunk of memory that was not allocated. This bug is fixed by the following + patch: patch -Np1 -i ../&gawk-segfault-patch; -Prepare Gawk for compilation: + Prepare Gawk for compilation: ./configure --prefix=/usr --libexecdir=/usr/lib -Due to a bug in the configure script, Gawk fails -to detect certain aspects of locale support in Glibc. This -bug leads to, e.g., Gettext testsuite failures. Work around this issue -by appending the missing macro definitions to config.h: + Due to a bug in the configure script, Gawk fails + to detect certain aspects of locale support in Glibc. This bug leads to, + e.g., Gettext testsuite failures. Work around this issue by appending the + missing macro definitions to config.h: cat >>config.h <<"EOF" #define HAVE_LANGINFO_CODESET 1 #define HAVE_LC_MESSAGES 1 EOF -Compile the package: + Compile the package: make -To test the results, issue: -make check. + To test the results, issue: + make check. -Install the package: + Install the package: make install - - - -Contents of Gawk - - -Installed programs -awk (link to gawk), gawk, gawk-&gawk-version;, grcat, igawk, -pgawk, pgawk-&gawk-version;, and pwcat - - -Short Descriptions - - - - -awk - -A link to gawk -awk - - - - -gawk - -A program for manipulating text files; it is the GNU -implementation of awk -gawk - - - - -gawk-&gawk-version; - -A hard link to gawk -gawk-&gawk-version; - - - - -grcat - -Dumps the group database /etc/group -grcat - - - - -igawk - -Gives gawk the ability to include files -igawk - - - - -pgawk - -The profiling version of gawk -pgawk - - - - -pgawk-&gawk-version; - -Hard link to pgawk -pgawk-&gawk-version; - - - - -pwcat - -Dumps the password database /etc/passwd -pwcat - - - - - + + + + Contents of Gawk + + + Installed programs + + + awk (link to gawk), gawk, gawk-&gawk-version;, grcat, igawk, pgawk, + pgawk-&gawk-version;, and pwcat + + + + + Short Descriptions + + + + + awk + + A link to gawk + + awk + + + + + + gawk + + A program for manipulating text files; it is the GNU + implementation of awk + + gawk + + + + + + gawk-&gawk-version; + + A hard link to gawk + + gawk-&gawk-version; + + + + + + grcat + + Dumps the group database /etc/group + + grcat + + + + + + igawk + + Gives gawk the ability to include files + + igawk + + + + + + pgawk + + The profiling version of gawk + + pgawk + + + + + + pgawk-&gawk-version; + + Hard link to pgawk + + pgawk-&gawk-version; + + + + + + pwcat + + Dumps the password database /etc/passwd + + pwcat + + + + + + + - diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index b67e4ede7..1611b2c59 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -1,217 +1,261 @@ - %general-entities; ]> + -GCC-&gcc-version; - + + + GCC-&gcc-version; + + + GCC + + + + -<indexterm zone="ch-system-gcc"><primary sortas="a-GCC">GCC</primary></indexterm> + <para>The GCC package contains the GNU compiler collection, which includes + the C and C++ compilers.</para> -<sect2 role="package"><title/> -<para>The GCC package contains the GNU compiler collection, which includes -the C and C++ compilers.</para> + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> -<segmentedlist> -<segtitle>&buildtime;</segtitle> -<segtitle>&diskspace;</segtitle> -<seglistitem><seg>11.7 SBU</seg><seg>451 MB</seg></seglistitem> -</segmentedlist> + <seglistitem> + <seg>11.7 SBU</seg> + <seg>451 MB</seg> + </seglistitem> + </segmentedlist> -<segmentedlist> -<segtitle>&dependencies;</segtitle> -<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, Findutils, -Gawk, Gettext, Glibc, Grep, Make, Perl, Sed, and Texinfo</seg></seglistitem> -</segmentedlist> -</sect2> + <segmentedlist> + <segtitle>&dependencies;</segtitle> -<sect2 role="installation"> -<title>Installation of GCC + + Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, Gettext, + Glibc, Grep, Make, Perl, Sed, and Texinfo + + -Apply a sed substitution that will suppress the -installation of libiberty.a. The -version of libiberty.a provided by -Binutils will be used instead: + + + + Installation of GCC + + Apply a sed substitution that will suppress the + installation of libiberty.a. The + version of libiberty.a provided by + Binutils will be used instead: sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in -The bootstrap build performed in -built GCC with the compiler flag. -Non-bootstrap builds omit this flag by default, so apply the following -sed to use it in order to ensure consistent compiler builds. - + The bootstrap build performed in + built GCC with the compiler flag. + Non-bootstrap builds omit this flag by default, so apply the following + sed to use it in order to ensure consistent compiler + builds. sed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in -The fixincludes script is known to occasionally -erroneously attempt to "fix" the system headers installed so far. As -the headers installed by GCC-&gcc-version; and Glibc-&glibc-version; are known -to not require fixing, issue the following command to prevent the -fixincludes script from running: + The fixincludes script is known to occasionally + erroneously attempt to "fix" the system headers installed so far. As + the headers installed by GCC-&gcc-version; and Glibc-&glibc-version; are known + to not require fixing, issue the following command to prevent the + fixincludes script from running: sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in -GCC provides a gccbug script which detects at -compile time whether mktemp is present, and hardcodes the result in a test. -This will cause the script to fall back to using less random names for -temporary files. We will be installing mktemp later, so the following sed -will simulate its presence. + GCC provides a gccbug script which detects at + compile time whether mktemp is present, and hardcodes the result in a test. + This will cause the script to fall back to using less random names for + temporary files. We will be installing mktemp later, so the following sed + will simulate its presence. sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in -The GCC documentation recommends building GCC outside of the source -directory in a dedicated build directory: + The GCC documentation recommends building GCC outside of the source + directory in a dedicated build directory: mkdir -v ../gcc-build cd ../gcc-build -Prepare GCC for compilation: + Prepare GCC for compilation: ../gcc-&gcc-version;/configure --prefix=/usr \ --libexecdir=/usr/lib --enable-shared \ --enable-threads=posix --enable-__cxa_atexit \ --enable-clocale=gnu --enable-languages=c,c++ -Compile the package: + Compile the package: make -In this section, the test suite for GCC is considered -critical. Do not skip it under any circumstance. + + In this section, the test suite for GCC is considered + critical. Do not skip it under any circumstance. + -Test the results, but do not stop at errors: + Test the results, but do not stop at errors: make -k check -Some of the errors are known issues and were noted in the -previous chapter. The test suite notes from are still relevant here. Be sure to -refer back to them as necessary. + Some of the errors are known issues and were noted in the + previous chapter. The test suite notes from are still relevant here. Be sure to + refer back to them as necessary. -Install the package: + Install the package: make install -Some packages expect the C preprocessor to be installed in the -/lib directory. -To support those packages, create this symlink: + Some packages expect the C preprocessor to be installed in the + /lib directory. + To support those packages, create this symlink: ln -sv ../usr/bin/cpp /lib -Many packages use the name cc to call the C -compiler. To satisfy those packages, create a symlink: + Many packages use the name cc to call the C + compiler. To satisfy those packages, create a symlink: ln -sv gcc /usr/bin/cc -At this point, it is strongly recommended to repeat the -sanity check performed earlier in this chapter. Refer back to and repeat the check. If the results -are in error, then the most likely reason is that the GCC Specs patch -from was erroneously applied -here. - - - - -Contents of GCC - - -Installed programs -Installed libraries -c++, cc (link to gcc), cpp, g++, gcc, gccbug, and -gcov -libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.[a,so], and libsupc++.a - - -Short Descriptions - - - - -cc - -The C compiler -cc - - - - -cpp - -The C preprocessor; it is used by the compiler to expand the -#include, #define, and similar statements in the source files -cpp - - - - -c++ - -The C++ compiler -c++ - - - - -g++ - -The C++ compiler -g++ - - - - -gcc - -The C compiler -gcc - - - - -gccbug - -A shell script used to help create useful bug reports -gccbug - - - - -gcov - -A coverage testing tool; it is used to analyze programs to -determine where optimizations will have the most effect -gcov - - - - -libgcc - -Contains run-time support for gcc -libgcc* - - - - -libstdc++ - -The standard C++ library -libstdc++ - - - - -libsupc++ - -Provides supporting routines for the C++ programming language -libsupc++ - - - - - + + At this point, it is strongly recommended to repeat the sanity + check performed earlier in this chapter. Refer back to and repeat the check. If + the results are in error, then the most likely reason is that the GCC + Specs patch from was + erroneously applied here. + + + + + + Contents of GCC + + + Installed programs + Installed libraries + + + c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov + libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.[a,so], and + libsupc++.a + + + + + Short Descriptions + + + + + cc + + The C compiler + + cc + + + + + + cpp + + The C preprocessor; it is used by the compiler to expand the + #include, #define, and similar statements in the source files + + cpp + + + + + + c++ + + The C++ compiler + + c++ + + + + + + g++ + + The C++ compiler + + g++ + + + + + + gcc + + The C compiler + + gcc + + + + + + gccbug + + A shell script used to help create useful bug reports + + gccbug + + + + + + gcov + + A coverage testing tool; it is used to analyze programs to + determine where optimizations will have the most effect + + gcov + + + + + + libgcc + + Contains run-time support for gcc + + libgcc* + + + + + + libstdc++ + + The standard C++ library + + libstdc++ + + + + + + libsupc++ + + Provides supporting routines for the C++ programming + language + + libsupc++ + + + + + + + - diff --git a/chapter06/gettext.xml b/chapter06/gettext.xml index 42e8fd2ba..0c88354c4 100644 --- a/chapter06/gettext.xml +++ b/chapter06/gettext.xml @@ -1,308 +1,393 @@ - %general-entities; ]> + -Gettext-&gettext-version; - + + + Gettext-&gettext-version; + + + Gettext + + + + -<indexterm zone="ch-system-gettext"><primary sortas="a-Gettext">Gettext</primary></indexterm> + <para>The Gettext package contains utilities for internationalization and + localization. These allow programs to be compiled with NLS (Native Language + Support), enabling them to output messages in the user's native + language.</para> -<sect2 role="package"><title/> -<para>The Gettext package contains utilities for internationalization and -localization. These allow programs to be compiled with NLS (Native Language -Support), enabling them to output messages in the user's native language.</para> + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> -<segmentedlist> -<segtitle>&buildtime;</segtitle> -<segtitle>&diskspace;</segtitle> -<seglistitem><seg>1.2 SBU</seg><seg>65.1 MB</seg></seglistitem> -</segmentedlist> + <seglistitem> + <seg>1.2 SBU</seg> + <seg>65.1 MB</seg> + </seglistitem> + </segmentedlist> -<segmentedlist> -<segtitle>&dependencies;</segtitle> -<seglistitem><seg>Bash, Binutils, Bison, Coreutils, -Diffutils, Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem> -</segmentedlist> -</sect2> + <segmentedlist> + <segtitle>&dependencies;</segtitle> -<sect2 role="installation"> -<title>Installation of Gettext + + Bash, Binutils, Bison, Coreutils, Diffutils, Gawk, GCC, Glibc, + Grep, Make, and Sed + + -Prepare Gettext for compilation: + + + + Installation of Gettext + + Prepare Gettext for compilation: ./configure --prefix=/usr -Compile the package: + Compile the package: make -To test the results, issue: -make check. This takes a very long time, around -7 SBUs. + To test the results, issue: + make check. + This takes a very long time, around 7 SBUs. -Install the package: + Install the package: make install - - - -Contents of Gettext - - -Installed programs -Installed libraries -autopoint, config.charset, config.rpath, envsubst, gettext, -gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen, -msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq, -ngettext, and xgettext -libasprintf.[a,so], libgettextlib.so, libgettextpo.[a,so], and libgettextsrc.so - - -Short Descriptions - - - - -autopoint - -Copies standard Gettext infrastructure files into a source package -autopoint - - - - -config.charset - -Outputs a system-dependent table of character encoding aliases -config.charset - - - - -config.rpath - -Outputs a system-dependent set of variables, describing how to set the -runtime search path of shared libraries in an executable -config.rpath - - - - -envsubst - -Substitutes environment variables in shell format strings -envsubst - - - - -gettext - -Translates a natural language message into the user's language -by looking up the translation in a message catalog -gettext - - - - -gettextize - -Copies all standard Gettext files into the given top-level -directory of a package to begin internationalizing it -gettextize - - - - -hostname - -Displays a network hostname in various forms -hostname - - - - -msgattrib - -Filters the messages of a translation catalog according to their -attributes and manipulates the attributes -msgattrib - - - - -msgcat - -Concatenates and merges the given .po files -msgcat - - - - -msgcmp - -Compares two .po -files to check that both contain the same set of msgid strings -msgcmp - - - - -msgcomm - -Finds the messages that are common to -to the given .po files -msgcomm - - - - -msgconv - -Converts a translation catalog to a different character encoding -msgconv - - - - -msgen - -Creates an English translation catalog -msgen - - - - -msgexec - -Applies a command to all translations of a translation catalog -msgexec - - - - -msgfilter - -Applies a filter to all translations of a translation catalog -msgfilter - - - - -msgfmt - -Generates a binary message catalog from a translation catalog -msgfmt - - - - -msggrep - -Extracts all messages of a translation catalog that match a -given pattern or belong to some given source files -msggrep - - - - -msginit - -Creates a new .po file, initializing the meta -information with values from the user's environment -msginit - - - - -msgmerge - -Combines two raw translations into a single file -msgmerge - - - - -msgunfmt - -Decompiles a binary message catalog into raw translation text -msgunfmt - - - - -msguniq - -Unifies duplicate translations in a translation catalog -msguniq - - - - -ngettext - -Displays native language translations of a textual message whose -grammatical form depends on a number -ngettext - - - - -xgettext - -Extracts the translatable message lines from the given source -files to make the first translation template -xgettext - - - - -libasprintf - -defines the autosprintf class, which makes -C formatted output routines usable in C++ programs, for use with the -<string> strings and the -<iostream> streams -libasprintf - - - - -libgettextlib - -a private library containing common routines used by the various Gettext -programs; these are not intended for general use -libgettextlib - - - - -libgettextpo - -Used to write specialized programs that process .po files; this library is used when the -standard applications shipped with Gettext (such as -msgcomm, msgcmp, -msgattrib, and msgen) will not -suffice -libgettextpo - - - - -libgettextsrc - -A private library containing common routines used by the various Gettext -programs; these are not intended for general use -libgettextsrc - - - - - + + + + Contents of Gettext + + + Installed programs + Installed libraries + + + autopoint, config.charset, config.rpath, envsubst, gettext, + gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen, + msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq, + ngettext, and xgettext + libasprintf.[a,so], libgettextlib.so, libgettextpo.[a,so], and + libgettextsrc.so + + + + + Short Descriptions + + + + + autopoint + + Copies standard Gettext infrastructure files into a source + package + + autopoint + + + + + + config.charset + + Outputs a system-dependent table of character encoding + aliases + + config.charset + + + + + + config.rpath + + Outputs a system-dependent set of variables, describing how + to set the runtime search path of shared libraries in an + executable + + config.rpath + + + + + + envsubst + + Substitutes environment variables in shell format strings + + envsubst + + + + + + gettext + + Translates a natural language message into the user's language + by looking up the translation in a message catalog + + gettext + + + + + + gettextize + + Copies all standard Gettext files into the given top-level + directory of a package to begin internationalizing it + + gettextize + + + + + + hostname + + Displays a network hostname in various forms + + hostname + + + + + + msgattrib + + Filters the messages of a translation catalog according to their + attributes and manipulates the attributes + + msgattrib + + + + + + msgcat + + Concatenates and merges the given + .po files + + msgcat + + + + + + msgcmp + + Compares two .po + files to check that both contain the same set of msgid strings + + msgcmp + + + + + + msgcomm + + Finds the messages that are common to to the given + .po files + + msgcomm + + + + + + msgconv + + Converts a translation catalog to a different character + encoding + + msgconv + + + + + + msgen + + Creates an English translation catalog + + msgen + + + + + + msgexec + + Applies a command to all translations of a translation + catalog + + msgexec + + + + + + msgfilter + + Applies a filter to all translations of a translation + catalog + + msgfilter + + + + + + msgfmt + + Generates a binary message catalog from a translation + catalog + + msgfmt + + + + + + msggrep + + Extracts all messages of a translation catalog that match a + given pattern or belong to some given source files + + msggrep + + + + + + msginit + + Creates a new .po file, + initializing the meta information with values from the user's + environment + + msginit + + + + + + msgmerge + + Combines two raw translations into a single file + + msgmerge + + + + + + msgunfmt + + Decompiles a binary message catalog into raw translation + text + + msgunfmt + + + + + + msguniq + + Unifies duplicate translations in a translation catalog + + msguniq + + + + + + ngettext + + Displays native language translations of a textual message whose + grammatical form depends on a number + + ngettext + + + + + + xgettext + + Extracts the translatable message lines from the given source + files to make the first translation template + + xgettext + + + + + + libasprintf + + defines the autosprintf class, which makes + C formatted output routines usable in C++ programs, for use with the + <string> strings and the + <iostream> streams + + libasprintf + + + + + + libgettextlib + + a private library containing common routines used by the + various Gettext programs; these are not intended for general use + + libgettextlib + + + + + + libgettextpo + + Used to write specialized programs that process + .po files; this library is + used when the standard applications shipped with Gettext (such as + msgcomm, msgcmp, + msgattrib, and msgen) will + not suffice + + libgettextpo + + + + + + libgettextsrc + + A private library containing common routines used by the + various Gettext programs; these are not intended for general use + + libgettextsrc + + + + + + + - diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index de0d272e5..dfab1c2a5 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -1,170 +1,195 @@ - %general-entities; ]> + -Glibc-&glibc-version; - - -Glibc - - -<para>The Glibc package contains the main C library. This library provides -the basic routines for allocating memory, searching directories, opening and -closing files, reading and writing files, string handling, pattern matching, -arithmetic, and so on.</para> - -<segmentedlist> -<segtitle>&buildtime;</segtitle> -<segtitle>&diskspace;</segtitle> -<seglistitem><seg>16.7 SBU</seg><seg>500 MB</seg></seglistitem> -</segmentedlist> - -<segmentedlist> -<segtitle>&dependencies;</segtitle> -<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, -Gawk, GCC, Gettext, Grep, Make, Perl, Sed, and Texinfo</seg></seglistitem> -</segmentedlist> -</sect2> - -<sect2 role="installation"> -<title>Installation of Glibc - -Some packages outside of LFS suggest installing GNU libiconv in -order to translate data from one encoding to another. The project's home page -() says This library -provides an iconv() implementation, for use on systems -which don't have one, or whose implementation cannot convert from/to Unicode. - Glibc provides an iconv() implementation and can -convert from/to Unicode, therefore libiconv is not required on an LFS -system. - -The Glibc build system is self-contained and will install -perfectly, even though the compiler specs file and linker are still -pointing at /tools. The specs -and linker cannot be adjusted before the Glibc install because the -Glibc autoconf tests would give false results and defeat the goal -of achieving a clean build. - -The glibc-libidn tarball adds support for internationalized -domain names (IDN) to Glibc. Many programs that -support IDN require the full libidn library (see -), -not this add-on. -Unpack the tarball from within the Glibc source -directory: + + + Glibc-&glibc-version; + + + Glibc + + + + + + <para>The Glibc package contains the main C library. This library provides + the basic routines for allocating memory, searching directories, opening and + closing files, reading and writing files, string handling, pattern matching, + arithmetic, and so on.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>16.7 SBU</seg> + <seg>500 MB</seg> + </seglistitem> + </segmentedlist> + + <segmentedlist> + <segtitle>&dependencies;</segtitle> + + <seglistitem> + <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Gettext, Grep, + Make, Perl, Sed, and Texinfo</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Glibc + + + Some packages outside of LFS suggest installing GNU libiconv in + order to translate data from one encoding to another. The project's + home page () says + This library provides an iconv() + implementation, for use on systems which don't have one, or whose + implementation cannot convert from/to Unicode. Glibc provides + an iconv() implementation and can convert from/to + Unicode, therefore libiconv is not required on an LFS system. + + + The Glibc build system is self-contained and will install + perfectly, even though the compiler specs file and linker are still + pointing at /tools. The specs + and linker cannot be adjusted before the Glibc install because the + Glibc autoconf tests would give false results and defeat the goal + of achieving a clean build. + + The glibc-libidn tarball adds support for internationalized domain + names (IDN) to Glibc. Many programs that support IDN require the full + libidn library (see + ), not this add-on. + Unpack the tarball from within the Glibc source directory: tar -xf ../glibc-libidn-&glibc-version;.tar.bz2 -In the vi_VN.TCVN locale, bash enters an infinite loop -at startup. It is unknown whether this is a bash bug or a -Glibc problem. Disable installation of this locale in order to avoid the -problem: + In the vi_VN.TCVN locale, bash enters an infinite loop + at startup. It is unknown whether this is a bash bug or a + Glibc problem. Disable installation of this locale in order to avoid the + problem: sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED -When running make install, a script called -test-installation.pl performs a small sanity test -on our newly installed Glibc. However, because our toolchain still points to the -/tools directory, the sanity test would -be carried out against the wrong Glibc. We can force the script to check the -Glibc we have just installed with the following: + When running make install, a script called + test-installation.pl performs a small sanity test on + our newly installed Glibc. However, because our toolchain still points to + the /tools directory, the sanity + test would be carried out against the wrong Glibc. We can force the script + to check the Glibc we have just installed with the following: sed -i \ 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \ scripts/test-installation.pl -The Glibc documentation recommends building Glibc outside of the source -directory in a dedicated build directory: + The Glibc documentation recommends building Glibc outside of the source + directory in a dedicated build directory: mkdir -v ../glibc-build cd ../glibc-build -Prepare Glibc for compilation: + Prepare Glibc for compilation: ../glibc-&glibc-version;/configure --prefix=/usr \ --disable-profile --enable-add-ons \ --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc -The meaning of the new configure options: + + The meaning of the new configure options: + + + --libexecdir=/usr/lib/glibc + + This changes the location of the pt_chown + program from its default of /usr/libexec to /usr/lib/glibc. + + - - ---libexecdir=/usr/lib/glibc -This changes the location of the -pt_chown program from its default of /usr/libexec to /usr/lib/glibc. - - + -Compile the package: + Compile the package: make -In this section, the test suite for Glibc is -considered critical. Do not skip it under any -circumstance. + + In this section, the test suite for Glibc is considered critical. + Do not skip it under any circumstance. + -Test the results: + Test the results: make -k check >glibc-check-log 2>&1 grep Error glibc-check-log -On at least i686 you can expect to see failures in the test-double - and test-idouble math tests with -gcc-&gcc-version;, as well as an expected (ignored) failure in -posix/annexc. These two failures in the math tests appear to be -harmless. - -The Glibc test suite is highly dependent on certain functions of -the host system, in particular the kernel. In certain circumstances, -some failures are unavoidable. This is a list of the most common -issues: - - -The math tests sometimes fail in other tests -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. - -If you have mounted the LFS partition with the -noatime option, the atime test will -fail. As mentioned in , do not use the -noatime option while building LFS. - -When running on older and slower hardware, some tests -can fail because of test timeouts being exceeded. - - -Though it is a harmless message, the install stage of Glibc will -complain about the absence of /etc/ld.so.conf. -Prevent this warning with: + On at least i686 you can expect to see failures in the + test-double and test-idouble + math tests with gcc-&gcc-version;, as well as an expected (ignored) + failure in posix/annexc. These two failures in + the math tests appear to be harmless. + + The Glibc test suite is highly dependent on certain functions of + the host system, in particular the kernel. In certain circumstances, + some failures are unavoidable. This is a list of the most common + issues: + + + + The math tests sometimes fail in other + tests 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. + + + If you have mounted the LFS partition with the + noatime option, the atime + test will fail. As mentioned in , do not + use the noatime option while building LFS. + + + When running on older and slower hardware, some tests + can fail because of test timeouts being exceeded. + + + + Though it is a harmless message, the install stage of Glibc will + complain about the absence of /etc/ld.so.conf. + Prevent this warning with: touch /etc/ld.so.conf -Install the package: + Install the package: make install -The locales that can make the system respond in a different -language were not installed by the above command. None of the -locales are required, but, if some of them are misssing, testuites of the -future packages would skip important testcases. - -Individual locales can be installed using the localedef -program. E.g., the first localedef command below combines -the /usr/share/i18n/locales/de_DE charset-independent -locale definition with the -/usr/share/i18n/charmaps/ISO-8859-1.gz charmap definition -and appends the result to the -/usr/lib/locale/locale-archive file. The following -instructions will install the minimum set of locales necessary -for the optimal coverage of tests: + The locales that can make the system respond in a different language + were not installed by the above command. None of the locales are required, + but, if some of them are misssing, testuites of the future packages would + skip important testcases. + + Individual locales can be installed using the + localedef program. E.g., the first + localedef command below combines the + /usr/share/i18n/locales/de_DE + charset-independent locale definition with the + /usr/share/i18n/charmaps/ISO-8859-1.gz + charmap definition and appends the result to the + /usr/lib/locale/locale-archive file. + The following instructions will install the minimum set of + locales necessary for the optimal coverage of tests: mkdir -pv /usr/lib/locale localedef -i de_DE -f ISO-8859-1 de_DE @@ -181,36 +206,43 @@ localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 localedef -i it_IT -f ISO-8859-1 it_IT localedef -i ja_JP -f EUC-JP ja_JP -In addition, install the locale for your own country, language and -character set. + In addition, install the locale for your own country, language and + character set. -Alternatively, install all locales -listed in the glibc-&glibc-version;/localedata/SUPPORTED -file (it includes every locale listed above and many more) -at once with the following time-consuming command: + Alternatively, install all locales listed in the + glibc-&glibc-version;/localedata/SUPPORTED file + (it includes every locale listed above and many more) at once with the + following time-consuming command: make localedata/install-locales -Then use the localedef command to create and -install locales not listed in the -glibc-&glibc-version;/localedata/SUPPORTED file -in the unlikely case if you need them. - + Then use the localedef command to create and + install locales not listed in the + glibc-&glibc-version;/localedata/SUPPORTED file + in the unlikely case if you need them. + + + - + + Configuring Glibc -Configuring Glibc -/etc/nsswitch.conf -/etc/localtime + + /etc/nsswitch.conf + -The /etc/nsswitch.conf file needs to be created -because, although Glibc provides defaults when this file is missing or corrupt, -the Glibc defaults do not work well in a networked environment. The time zone -also needs to be configured. + + /etc/localtime + -Create a new file /etc/nsswitch.conf by running the -following: + The /etc/nsswitch.conf file needs to be created + because, although Glibc provides defaults when this file is missing or corrupt, + the Glibc defaults do not work well in a networked environment. The time zone + also needs to be configured. + + Create a new file /etc/nsswitch.conf by running the + following: cat > /etc/nsswitch.conf << "EOF" # Begin /etc/nsswitch.conf @@ -230,59 +262,62 @@ rpc: files # End /etc/nsswitch.conf EOF -To determine the local time zone, run the following script: + To determine the local time zone, run the following script: tzselect -After answering a few questions about the location, the script -will output the name of the time zone (e.g., -EST5EDT or Canada/Eastern). -Then create the /etc/localtime file by -running: + After answering a few questions about the location, the script will + output the name of the time zone (e.g., EST5EDT or + Canada/Eastern). Then create the + /etc/localtime file by running: cp -v --remove-destination /usr/share/zoneinfo/[xxx] \ /etc/localtime -Replace [xxx] with the name of the time zone -that tzselect provided (e.g., Canada/Eastern). - -The meaning of the cp option: - - - ---remove-destination -This is needed to force removal of the already -existing symbolic link. The reason for copying the file instead of -using a symlink is to cover the situation where /usr is on a separate partition. This -could be important when booted into single user -mode. - - - - - - - -Configuring the Dynamic Loader -/etc/ld.so.conf - -By default, the dynamic loader (/lib/ld-linux.so.2) searches through -/lib and /usr/lib for dynamic libraries that are -needed by programs as they are run. However, if there are libraries in -directories other than /lib and -/usr/lib, these need to be -added to the /etc/ld.so.conf file in order -for the dynamic loader to find them. Two directories that are commonly -known to contain additional libraries are /usr/local/lib and /opt/lib, so add those directories to the -dynamic loader's search path. - -Create a new file /etc/ld.so.conf by running the -following: + Replace [xxx] with the name of the time zone + that tzselect provided (e.g., Canada/Eastern). + + + The meaning of the cp option: + + + --remove-destination + + This is needed to force removal of the already existing symbolic + link. The reason for copying the file instead of using a symlink is to + cover the situation where /usr + is on a separate partition. This could be important when booted into + single user mode. + + + + + + + + + Configuring the Dynamic Loader + + + /etc/ld.so.conf + + + By default, the dynamic loader (/lib/ld-linux.so.2) searches through + /lib and /usr/lib for dynamic libraries that are + needed by programs as they are run. However, if there are libraries in + directories other than /lib and + /usr/lib, these need to be added + to the /etc/ld.so.conf file in order for the + dynamic loader to find them. Two directories that are commonly known + to contain additional libraries are /usr/local/lib and /opt/lib, so add those directories to the + dynamic loader's search path. + + Create a new file /etc/ld.so.conf by running the + following: cat > /etc/ld.so.conf << "EOF" # Begin /etc/ld.so.conf @@ -293,430 +328,535 @@ following: # End /etc/ld.so.conf EOF - - -Contents of Glibc - - -Installed programs -Installed libraries -catchsegv, gencat, getconf, -getent, iconv, iconvconfig, ldconfig, ldd, lddlibc4, locale, -localedef, mtrace, nscd, nscd_nischeck, pcprofiledump, pt_chown, rpcgen, -rpcinfo, sln, sprof, tzselect, xtrace, zdump, and zic -ld.so, libBrokenLocale.[a,so], -libSegFault.so, libanl.[a,so], libbsd-compat.a, libc.[a,so], libcidn.so, -libcrypt.[a,so], libdl.[a,so], libg.a, libieee.a, libm.[a,so], libmcheck.a, -libmemusage.so, libnsl.a, libnss_compat.so, libnss_dns.so, libnss_files.so, -libnss_hesiod.so, libnss_nis.so, libnss_nisplus.so, libpcprofile.so, -libpthread.[a,so], libresolv.[a,so], librpcsvc.a, librt.[a,so], -libthread_db.so, and libutil.[a,so] - - -Short Descriptions - - - - -catchsegv - -Can be used to create a stack trace when a program -terminates with a segmentation fault -catchsegv - - - - -gencat - -Generates message catalogues -gencat - - - - -getconf - -Displays the system configuration values for file system specific variables -getconf - - - - -getent - -Gets entries from an administrative database -getent - - - - -iconv - -Performs character set conversion -iconv - - - - -iconvconfig - -Creates fastloading iconv module configuration files -iconvconfig - - - - -ldconfig - -Configures the dynamic linker runtime bindings -ldconfig - - - - -ldd - -Reports which shared libraries are required -by each given program or shared library -ldd - - - - -lddlibc4 - -Assists ldd with object files -lddlibc4 - - - - -locale - -Prints various information about the current locale -locale - - - - -localedef - -Compiles locale specifications -localedef - - - - -mtrace - -Reads and interprets a memory trace file and displays a summary in human-readable format -mtrace - - - - -nscd - -A daemon that provides a cache for the most common name -service requests -nscd - - - - -nscd_nischeck - -Checks whether or not secure mode is necessary for NIS+ lookup -nscd_nischeck - - - - -pcprofiledump - -Dumps information generated by PC profiling -pcprofiledump - - - - -pt_chown - -A helper program for grantpt to set -the owner, group and access permissions of a slave pseudo terminal -pt_chown - - - - -rpcgen - -Generates C code to implement the Remote Procecure Call (RPC) protocol -rpcgen - - - - -rpcinfo - -Makes an RPC call to an RPC server -rpcinfo - - - - -sln - -A statically linked ln program -sln - - - - -sprof - -Reads and displays shared object profiling data -sprof - - - - -tzselect - -Asks the user about the location of the -system and reports the corresponding time zone description -tzselect - - - - -xtrace - -Traces the execution of a program by -printing the currently executed function -xtrace - - - - -zdump - -The time zone dumper -zdump - - - - -zic - -The time zone compiler -zic - - - - -ld.so - -The helper program for shared library executables -ld.so - - - - -libBrokenLocale - -Used internally by Glibc as a gross hack to get broken programs -(e.g., some Motif applications) running. See comments in -glibc-&glibc-version;/locale/broken_cur_max.c for more -information -libBrokenLocale - - - - -libSegFault - -The segmentation fault signal handler, used by -catchsegv -libSegFault - - - - -libanl - -An asynchronous name lookup library -libanl - - - - -libbsd-compat - -Provides the portability needed -in order to run certain Berkey Software Distribution (BSD) programs under Linux -libbsd-compat - - - - -libc - -The main C library -libc - - - - -libcidn - -Used internally by Glibc for handling internationalized domain names in -the getaddrinfo() function -libcrypt - - - - -libcrypt - -The cryptography library -libcrypt - - - - -libdl - -The dynamic linking interface library -libdl - - - - -libg - -Dummy library containing no functions. Previously was a runtime library -for g++ -libg - - - - -libieee - -Linking in this module forces error handling rules for math functions as -defined by the Institute of Electrical and Electronic Engineers (IEEE). -The default is POSIX.1 error handling -libieee - - - - -libm - -The mathematical library -libm - - - - -libmcheck - -Turns on memory allocation checking when linked to -libmcheck - - - - -libmemusage - -Used by memusage to help collect -information about the memory usage of a program -libmemusage - - - - -libnsl - -The network services library -libnsl - - - - -libnss - -The Name Service Switch libraries, -containing functions for resolving host names, user names, group names, -aliases, services, protocols, etc. -libnss - - - - -libpcprofile - -Contains profiling functions used -to track the amount of CPU time spent in specific source code lines -libpcprofile - - - - -libpthread - -The POSIX threads library -libpthread - - - - -libresolv - -Contains functions for creating, -sending, and interpreting packets to the Internet domain name servers -libresolv - - - - -librpcsvc - -Contains functions providing miscellaneous RPC services -librpcsvc - - - - -librt - -Contains functions providing most of the -interfaces specified by the POSIX.1b Realtime Extension -librt - - - - -libthread_db - -Contains functions useful for -building debuggers for multi-threaded programs -libthread_db - - - - -libutil - -Contains code for standard functions used in many different Unix utilities -libutil - - - - - + + + + Contents of Glibc + + + Installed programs + Installed libraries + + + catchsegv, gencat, getconf, getent, iconv, iconvconfig, ldconfig, + ldd, lddlibc4, locale, localedef, mtrace, nscd, nscd_nischeck, + pcprofiledump, pt_chown, rpcgen, rpcinfo, sln, sprof, tzselect, xtrace, + zdump, and zic + ld.so, libBrokenLocale.[a,so], libSegFault.so, libanl.[a,so], + libbsd-compat.a, libc.[a,so], libcidn.so, libcrypt.[a,so], libdl.[a,so], + libg.a, libieee.a, libm.[a,so], libmcheck.a, libmemusage.so, libnsl.a, + libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so, + libnss_nis.so, libnss_nisplus.so, libpcprofile.so, libpthread.[a,so], + libresolv.[a,so], librpcsvc.a, librt.[a,so], libthread_db.so, and + libutil.[a,so] + + + + + Short Descriptions + + + + + catchsegv + + Can be used to create a stack trace when a program + terminates with a segmentation fault + + catchsegv + + + + + + gencat + + Generates message catalogues + + gencat + + + + + + getconf + + Displays the system configuration values for file system + specific variables + + getconf + + + + + + getent + + Gets entries from an administrative database + + getent + + + + + + iconv + + Performs character set conversion + + iconv + + + + + + iconvconfig + + Creates fastloading iconv module configuration + files + + iconvconfig + + + + + + ldconfig + + Configures the dynamic linker runtime bindings + + ldconfig + + + + + + ldd + + Reports which shared libraries are required + by each given program or shared library + + ldd + + + + + + lddlibc4 + + Assists ldd with object files + + lddlibc4 + + + + + + locale + + Prints various information about the current locale + + locale + + + + + + localedef + + Compiles locale specifications + + localedef + + + + + + mtrace + + Reads and interprets a memory trace file and displays a summary + in human-readable format + + mtrace + + + + + + nscd + + A daemon that provides a cache for the most common name + service requests + + nscd + + + + + + nscd_nischeck + + Checks whether or not secure mode is necessary for NIS+ + lookup + + nscd_nischeck + + + + + + pcprofiledump + + Dumps information generated by PC profiling + + pcprofiledump + + + + + + pt_chown + + A helper program for grantpt to set the owner, + group and access permissions of a slave pseudo terminal + + pt_chown + + + + + + rpcgen + + Generates C code to implement the Remote Procecure Call (RPC) + protocol + + rpcgen + + + + + + rpcinfo + + Makes an RPC call to an RPC server + + rpcinfo + + + + + + sln + + A statically linked ln program + + sln + + + + + + sprof + + Reads and displays shared object profiling data + + sprof + + + + + + tzselect + + Asks the user about the location of the system and reports + the corresponding time zone description + + tzselect + + + + + + xtrace + + Traces the execution of a program by printing the currently + executed function + + xtrace + + + + + + zdump + + The time zone dumper + + zdump + + + + + + zic + + The time zone compiler + + zic + + + + + + ld.so + + The helper program for shared library executables + + ld.so + + + + + + libBrokenLocale + + Used internally by Glibc as a gross hack to get broken programs + (e.g., some Motif applications) running. See comments in + glibc-&glibc-version;/locale/broken_cur_max.c + for more information + + libBrokenLocale + + + + + + libSegFault + + The segmentation fault signal handler, used by + catchsegv + + libSegFault + + + + + + libanl + + An asynchronous name lookup library + + libanl + + + + + + libbsd-compat + + Provides the portability needed in order to run certain Berkey + Software Distribution (BSD) programs under Linux + + libbsd-compat + + + + + + libc + + The main C library + + libc + + + + + + libcidn + + Used internally by Glibc for handling internationalized domain + names in the getaddrinfo() function + + libcrypt + + + + + + libcrypt + + The cryptography library + + libcrypt + + + + + + libdl + + The dynamic linking interface library + + libdl + + + + + + libg + + Dummy library containing no functions. Previously was a runtime + library for g++ + + libg + + + + + + libieee + + Linking in this module forces error handling rules for math + functions as defined by the Institute of Electrical and Electronic + Engineers (IEEE). The default is POSIX.1 error handling + + libieee + + + + + + libm + + The mathematical library + + libm + + + + + + libmcheck + + Turns on memory allocation checking when linked to + + libmcheck + + + + + + libmemusage + + Used by memusage to help collect + information about the memory usage of a program + + libmemusage + + + + + + libnsl + + The network services library + + libnsl + + + + + + libnss + + The Name Service Switch libraries, containing functions for + resolving host names, user names, group names, aliases, services, + protocols, etc. + + libnss + + + + + + libpcprofile + + Contains profiling functions used to track the amount of CPU + time spent in specific source code lines + + libpcprofile + + + + + + libpthread + + The POSIX threads library + + libpthread + + + + + + libresolv + + Contains functions for creating, sending, and interpreting + packets to the Internet domain name servers + + libresolv + + + + + + librpcsvc + + Contains functions providing miscellaneous RPC services + + librpcsvc + + + + + + librt + + Contains functions providing most of the interfaces specified + by the POSIX.1b Realtime Extension + + librt + + + + + + libthread_db + + Contains functions useful for building debuggers for + multi-threaded programs + + libthread_db + + + + + + libutil + + Contains code for standard functions used in + many different Unix utilities + + libutil + + + + + + + - diff --git a/chapter06/grep.xml b/chapter06/grep.xml index f050a89a1..84742ae30 100644 --- a/chapter06/grep.xml +++ b/chapter06/grep.xml @@ -1,98 +1,123 @@ - %general-entities; ]> - -Grep-&grep-version; - - -Grep - -<para>The Grep package contains programs for searching through files.</para> - -<segmentedlist> -<segtitle>&buildtime;</segtitle> -<segtitle>&diskspace;</segtitle> -<seglistitem><seg>0.1 SBU</seg><seg>4.5 MB</seg></seglistitem> -</segmentedlist> +<sect1 id="ch-system-grep" role="wrap"> + <?dbhtml filename="grep.html"?> -<segmentedlist> -<segtitle>&dependencies;</segtitle> -<seglistitem><seg>Bash, Binutils, Coreutils, -Diffutils, GCC, Gettext, Glibc, Make, Sed, and Texinfo</seg></seglistitem> -</segmentedlist> -</sect2> + <title>Grep-&grep-version; - -Installation of Grep + + Grep + -The current Grep package has many bugs, especially in the support of -multibyte locales. RedHat fixed some of them with the following patch: + + -<screen><userinput>patch -Np1 -i ../&grep-fixes-patch;</userinput></screen> + <para>The Grep package contains programs for searching through files.</para> -<para>In order for the tests added by this patch to pass, the permissions for -the test file have to be changed:</para> + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> -<screen><userinput>chmod +x tests/fmbtest.sh</userinput></screen> + <seglistitem> + <seg>0.1 SBU</seg> + <seg>4.5 MB</seg> + </seglistitem> + </segmentedlist> -<para>Prepare Grep for compilation:</para> + <segmentedlist> + <segtitle>&dependencies;</segtitle> -<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen> + <seglistitem> + <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Make, + Sed, and Texinfo</seg> + </seglistitem> + </segmentedlist> -<para>Compile the package:</para> + </sect2> -<screen><userinput>make</userinput></screen> + <sect2 role="installation"> + <title>Installation of Grep -To test the results, issue: -make check. + The current Grep package has many bugs, especially in the support of + multibyte locales. RedHat fixed some of them with the following patch: -Install the package: +patch -Np1 -i ../&grep-fixes-patch; -make install + In order for the tests added by this patch to pass, the permissions for + the test file have to be changed: - +chmod +x tests/fmbtest.sh + Prepare Grep for compilation: -Contents of Grep +./configure --prefix=/usr --bindir=/bin - -Installed programs -egrep (link to grep), fgrep (link to grep), and grep - + Compile the package: -Short Descriptions - - +make - -egrep - -Prints lines matching an extended regular expression -egrep - - + To test the results, issue: + make check. - -fgrep - -Prints lines matching a list of fixed strings -fgrep - - + Install the package: - -grep - -Prints lines matching a basic regular expression -grep - - - +make install - + + + + Contents of Grep + + + Installed programs + + + egrep (link to grep), fgrep (link to grep), and grep + + + + + Short Descriptions + + + + + egrep + + Prints lines matching an extended regular expression + + egrep + + + + + + fgrep + + Prints lines matching a list of fixed strings + + fgrep + + + + + + grep + + Prints lines matching a basic regular expression + + grep + + + + + + + - -- cgit v1.2.3-54-g00ecf