From 4f3e4e369a9dacb51919455c56b6c1e1c775a15f Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Mon, 1 Jun 2020 12:21:38 +0000 Subject: Update to upstream r11885 git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11886 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- stylesheets/lfs-xsl/lfs.css | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stylesheets') diff --git a/stylesheets/lfs-xsl/lfs.css b/stylesheets/lfs-xsl/lfs.css index e57f424c6..15ceba1ef 100644 --- a/stylesheets/lfs-xsl/lfs.css +++ b/stylesheets/lfs-xsl/lfs.css @@ -162,6 +162,8 @@ div.navheader, div.navfooter { div.navheader { border-bottom: 1px solid #dbddec; + position: sticky; + top: 0; } div.navfooter { -- cgit v1.2.3-54-g00ecf From 79524a0c69fd6f6f1fa86086b86d52328af17750 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 9 Jun 2020 23:10:16 +0000 Subject: Text updates for cross2 Chapter 5 git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11914 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter04/aboutsbus.xml | 2 +- chapter05/binutils-pass1.xml | 21 ++++----------- chapter05/gcc-pass1.xml | 33 +++++++++++++++--------- chapter05/generalinstructions.xml | 6 ++--- chapter05/glibc.xml | 4 +-- chapter05/libstdc++.xml | 12 ++++----- chapter05/toolchaintechnotes.xml | 54 ++++++++++++++++++++------------------- stylesheets/lfs-xsl/lfs.css | 2 +- 8 files changed, 67 insertions(+), 67 deletions(-) (limited to 'stylesheets') diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index 646fe2875..1928423ea 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -41,7 +41,7 @@ compilation time for a package can be reduced by performing a "parallel make" by either setting an environment variable or telling the make program how many processors are available. For - instance, an Intel i5-6500 COU can support four simultaneous processes with: + instance, an Intel i5-6500 CPU can support four simultaneous processes with: export MAKEFLAGS='-j4' diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index e91c64a62..00816c94a 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -63,13 +63,10 @@ cd build to be of any use, measure the time it takes to build this package from the configuration, up to and including the first install. To achieve this easily, wrap the commands in a time - command like this: time { ./configure ... && ... + command like this: time { ./configure ... && make && make install; }. - + Now prepare Binutils for compilation: ../configure --prefix=$LFS/tools \ @@ -85,7 +82,7 @@ cd build --prefix=$LFS/tools This tells the configure script to prepare to install the - Binutils programs in the $LFS/tools directory. @@ -97,22 +94,14 @@ cd build $LFS for the target system libraries as needed. - + --target=$LFS_TGT Because the machine description in the LFS_TGT variable is slightly different than the value returned by the config.guess script, this switch will tell the - configure script to adjust Binutil's build system + configure script to adjust binutil's build system for building a cross linker. diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 7db6408c2..2f8145713 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -131,37 +131,46 @@ cd build + + --enable-initfini-array + + This switch forces the use of some internal data structures + that are needed but cannot be detected when building a cross + compiler. + + + --disable-shared This switch forces GCC to link its internal libraries - statically. We need this because the shared libraries require glibc, - which is not yet installed on the target system. + statically. We need this because the shared libraries require glibc, + which is not yet installed on the target system. + + + + + --disable-multilib + + On x86_64, LFS does not support a multilib configuration. + This switch is harmless for x86. --disable-decimal-float, --disable-threads, - --disable-libatomic, --disable-libgomp, + --disable-libatomic, --disable-libgomp, --disable-libquadmath, --disable-libssp, --disable-libvtv, --disable-libstdcxx These switches disable support for the decimal floating point - extension, threading, libatomic, libgomp, libquadmath, libssp, + extension, threading, libatomic, libgomp, libquadmath, libssp, libvtv, and the C++ standard library respectively. These features will fail to compile when building a cross-compiler and are not necessary for the task of cross-compiling the temporary libc. - - --disable-multilib - - On x86_64, LFS does not yet support a multilib configuration. - This switch is harmless for x86. - - - --enable-languages=c,c++ diff --git a/chapter05/generalinstructions.xml b/chapter05/generalinstructions.xml index 05b88b98c..b0a5377e1 100644 --- a/chapter05/generalinstructions.xml +++ b/chapter05/generalinstructions.xml @@ -18,7 +18,7 @@ Several of the packages are patched before compilation, but only when the patch is needed to circumvent a problem. A patch is often needed in - both this and the next chapter, but sometimes in only one or the other. + both this and the following chapters, but sometimes in only one location. Therefore, do not be concerned if instructions for a downloaded patch seem to be missing. Warning messages about offset or fuzz may also be encountered when applying a patch. Do @@ -93,8 +93,8 @@ Using the tar program, extract the package - to be built. In Chapter 5, ensure you are the lfs - user when extracting the package. + to be built. In Chapters 5 and 6, ensure you are + the lfs user when extracting the package. Change to the directory created when the package was diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index d6974bb21..361dd0e58 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -211,14 +211,14 @@ readelf -l a.out | grep '/ld-linux' - Building packages in the next sections will serve as an + Building packages in the next chapter will serve as an additional check that the toolchain has been built properly. If some package, especially binutils-pass2 or gcc-pass2, fails to build, it is an indication that something has gone wrong with the previous Binutils, GCC, or Glibc installations. Now that our cross-toolchain is complete, finalize the installation - of the limits.h header. For doing so, run an utility provided by the GCC + of the limits.h header. For doing so, run a utility provided by the GCC developers: $LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml index 3a1b0f2bf..5058be9a5 100644 --- a/chapter05/libstdc++.xml +++ b/chapter05/libstdc++.xml @@ -53,12 +53,12 @@ gcc-&gcc-version; directory. - Create a separate build directory for Libstdc++ and enter it: + Create a separate build directory for libstdc++ and enter it: mkdir -v build cd build - Prepare Libstdc++ for compilation: + Prepare libstdc++ for compilation: ../libstdc++-v3/configure \ --host=$LFS_TGT \ @@ -75,7 +75,7 @@ cd build --host=... - Indicates to use the cross compiler we have just built + Specifies the use the cross compiler we have just built instead of the one in /usr/bin. @@ -91,9 +91,9 @@ cd build --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version; - This is the location where the standard include files are - searched by the C++ compiler. In a normal build, this information - is automatically passed to the Libstdc++ configure + This is the location where the C++ compiler should search for the + standard include files. In a normal build, this information + is automatically passed to the libstdc++ configure options from the top level directory. In our case, this information must be explicitly given. diff --git a/chapter05/toolchaintechnotes.xml b/chapter05/toolchaintechnotes.xml index 376337662..9e582e345 100644 --- a/chapter05/toolchaintechnotes.xml +++ b/chapter05/toolchaintechnotes.xml @@ -16,13 +16,14 @@ clearer after performing an actual build. This section can be referred to at any time during the process. - The overall goal of is to - produce a temporary area that contains a known-good set of tools that can be - isolated from the host system. By using chroot, the - commands in the remaining chapters will be contained within that environment, - ensuring a clean, trouble-free build of the target LFS system. The build - process has been designed to minimize the risks for new readers and to provide - the most educational value at the same time. + The overall goal of this chapter and is to produce a temporary area that + contains a known-good set of tools that can be isolated from the host system. + By using chroot, the commands in the remaining chapters + will be contained within that environment, ensuring a clean, trouble-free + build of the target LFS system. The build process has been designed to + minimize the risks for new readers and to provide the most educational value + at the same time. The build process is based on the process of cross-compilation. Cross-compilation is normally used @@ -143,7 +144,7 @@ appearing, that proved insufficient. The word triplet remained. A simple way to determine your machine triplet is to run the config.guess - script that comes with the source for many packages. Unpack the Binutils + script that comes with the source for many packages. Unpack the binutils sources and run the script: ./config.guess and note the output. For example, for a 32-bit Intel processor the output will be i686-pc-linux-gnu. On a 64-bit @@ -151,7 +152,7 @@ Also be aware of the name of the platform's dynamic linker, often referred to as the dynamic loader (not to be confused with the standard - linker ld that is part of Binutils). The dynamic linker + linker ld that is part of binutils). The dynamic linker provided by Glibc finds and loads the shared libraries needed by a program, prepares the program to run, and then runs it. The name of the dynamic linker for a 32-bit Intel machine will be In order to fake a cross compilation, the name of the host triplet is slightly adjusted by changing the "vendor" field in the LFS_TGT variable. We also use the - --with-sysroot when building the cross linker and - cross compiler, to tell them where to find the needed host files. This - ensures none of the other programs built in --with-sysroot option when building the cross linker and + cross compiler to tell them where to find the needed host files. This + ensures that none of the other programs built in can link to libraries on the build machine. Only two stages are mandatory, and one more for tests: @@ -215,7 +216,7 @@ internal library is named libgcc, and must be linked to the glibc library to be fully functional! Furthermore, the standard library for C++ (libstdc++) also needs being linked to glibc. The solution - to this chicken and egg problem is to first build a degraded cc1+libgcc, + to this chicken and egg problem is to first build a degraded cc1 based libgcc, lacking some fuctionalities such as threads and exception handling, then build glibc using this degraded compiler (glibc itself is not degraded), then build libstdc++. But this last library will lack the @@ -225,8 +226,8 @@ paragraph is that cc1 is unable to build a fully functional libstdc++, but this is the only compiler available for building the C/C++ libraries during stage 2! Of course, the compiler built during stage 2, cc-lfs, - would be able to build those libraries, but (i) the build system of - gcc does not know that it is usable on pc, and (ii) using it on pc + would be able to build those libraries, but (1) the build system of + gcc does not know that it is usable on pc, and (2) using it on pc would be at risk of linking to the pc libraries, since cc-lfs is a native compiler. So we have to build libstdc++ later, in chroot. @@ -306,17 +307,18 @@ checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld - As said above, the standard C++ library is compiled next, followed - by all the programs that need themselves to be built. The install step - uses the DESTDIR variable to have the programs land into - the LFS filesystem. - - Then the native lfs compiler is built. First Binutils Pass 2, with - the same DESTDIR install as the other programs, then the - second pass of GCC, omitting libstdc++ and other non-important libraries. - Due to some weird logic in GCC's configure script, - CC_FOR_TARGET ends up as cc when host - is the same as target, but is different from build. This is why + As said above, the standard C++ library is compiled next, followed in + Chapter 6 by all the programs that need themselves to be built. The install + step of libstdc++ uses the DESTDIR variable to have the + programs land into the LFS filesystem. + + In Chapter 7 the native lfs compiler is built. First binutils-pass2, + with the same DESTDIR install as the other programs is + built, and then the second pass of GCC is constructed, omitting libstdc++ + and other non-important libraries. Due to some weird logic in GCC's + configure script, CC_FOR_TARGET ends up as + cc when the host is the same as the target, but is + different from the build system. This is why CC_FOR_TARGET=$LFS_TGT-gcc is put explicitely into the configure options. diff --git a/stylesheets/lfs-xsl/lfs.css b/stylesheets/lfs-xsl/lfs.css index 15ceba1ef..23d461304 100644 --- a/stylesheets/lfs-xsl/lfs.css +++ b/stylesheets/lfs-xsl/lfs.css @@ -342,7 +342,7 @@ div.important em, div.warning em, div.caution em { margin-bottom: .3em; } -.table table { +.table table, .informaltable { margin-left: auto; margin-right: auto; } -- cgit v1.2.3-54-g00ecf From 6a156bab1b41dfcbebcf69325dff81b73a2afad7 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 12 Jun 2020 04:40:07 +0000 Subject: Mostly text updates in Chapter 8. There are a couple of minor command changes. git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11924 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/glibc.xml | 2 +- chapter08/aboutdebug.xml | 4 ++-- chapter08/adjusting.xml | 8 ++++---- chapter08/attr.xml | 6 ++---- chapter08/autoconf.xml | 2 +- chapter08/automake.xml | 2 +- chapter08/bash.xml | 11 ++-------- chapter08/coreutils.xml | 25 ++++++++++++++--------- chapter08/e2fsprogs.xml | 16 +++++++-------- chapter08/expat.xml | 2 +- chapter08/gcc.xml | 30 ++++++++++----------------- chapter08/gdbm.xml | 6 +++--- chapter08/gettext.xml | 32 ++++------------------------- chapter08/glibc.xml | 50 ++++++--------------------------------------- chapter08/gzip.xml | 3 --- chapter08/intltool.xml | 4 ++++ chapter08/introduction.xml | 18 ++++++++-------- chapter08/iproute2.xml | 4 ++-- chapter08/kbd.xml | 14 ++++++------- chapter08/kmod.xml | 7 +------ chapter08/libffi.xml | 15 +------------- chapter08/m4.xml | 6 +++--- chapter08/make.xml | 4 +--- chapter08/man-db.xml | 11 ---------- chapter08/meson.xml | 12 ++++------- chapter08/openssl.xml | 7 +------ chapter08/patch.xml | 4 ++-- chapter08/pkgconfig.xml | 6 +++--- chapter08/pkgmgt.xml | 37 +++++++++++++++------------------ chapter08/procps.xml | 2 +- chapter08/python.xml | 23 +++++---------------- chapter08/shadow.xml | 10 +++++---- chapter08/sysklogd.xml | 2 +- chapter08/tar.xml | 6 +++--- chapter08/texinfo.xml | 10 ++++----- chapter08/util-linux.xml | 2 +- chapter08/vim.xml | 34 +++++++++++------------------- stylesheets/lfs-xsl/lfs.css | 18 +++++++++++++++- 38 files changed, 167 insertions(+), 288 deletions(-) (limited to 'stylesheets') diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 80d1638f5..6e14f0c7d 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -157,7 +157,7 @@ cd build Install the package: - If LFS is not proprly set, and despite the + If LFS is not properly set, and despite the recommendations, you are building as root, the next command will install the newly built glibc to your host system, which most likely will render it unusable. So double check that the environment is correctly set for user diff --git a/chapter08/aboutdebug.xml b/chapter08/aboutdebug.xml index f49618c83..d646b797e 100644 --- a/chapter08/aboutdebug.xml +++ b/chapter08/aboutdebug.xml @@ -13,8 +13,8 @@ Most programs and libraries are, by default, compiled with debugging symbols included (with gcc's -g option). This means that when debugging a - program or library that was compiled with debugging information - included, the debugger can provide not only memory addresses, but also + program or library that was compiled with debugging information, + the debugger can provide not only memory addresses, but also the names of the routines and variables. However, the inclusion of these debugging symbols enlarges a diff --git a/chapter08/adjusting.xml b/chapter08/adjusting.xml index 3e6b49e19..4bd8a85cc 100644 --- a/chapter08/adjusting.xml +++ b/chapter08/adjusting.xml @@ -50,7 +50,7 @@ readelf -l a.out | grep ': /lib' There should be no errors, and the output of the last command will be (allowing for - platform-specific differences in dynamic linker name): + platform-specific differences in the dynamic linker name): [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] @@ -104,7 +104,7 @@ SEARCH_DIR("/lib") attempt to open /lib/libc.so.6 succeeded - Lastly, make sure GCC is using the correct dynamic linker: + Make sure GCC is using the correct dynamic linker: grep found dummy.log @@ -115,8 +115,8 @@ SEARCH_DIR("/lib") If the output does not appear as shown above or is not received at all, then something is seriously wrong. Investigate and retrace the - steps to find out where the problem is and correct it. The most likely - reason is that something went wrong with the specs file adjustment. Any + steps to find out where the problem is and correct it. Any issues will need to be resolved before continuing with the process. Once everything is working correctly, clean up the test files: diff --git a/chapter08/attr.xml b/chapter08/attr.xml index 0033ae58f..526852b6d 100644 --- a/chapter08/attr.xml +++ b/chapter08/attr.xml @@ -43,15 +43,13 @@ Prepare Attr for compilation: - -./configure --prefix=/usr \ +./configure --prefix=/usr \ --bindir=/bin \ --disable-static \ --sysconfdir=/etc \ --docdir=/usr/share/doc/attr-&attr-version; - -./configure --prefix=/usr \ +./configure --prefix=/usr \ --disable-static \ --sysconfdir=/etc \ --docdir=/usr/share/doc/attr-&attr-version; diff --git a/chapter08/autoconf.xml b/chapter08/autoconf.xml index c490a3994..53d97070b 100644 --- a/chapter08/autoconf.xml +++ b/chapter08/autoconf.xml @@ -43,7 +43,7 @@ First, fix a bug generated by Perl 5.28. -sed '361 s/{/\\{/' -i bin/autoscan.in +sed -i '361 s/{/\\{/' bin/autoscan.in Prepare Autoconf for compilation: diff --git a/chapter08/automake.xml b/chapter08/automake.xml index 5587d577d..7c4143e91 100644 --- a/chapter08/automake.xml +++ b/chapter08/automake.xml @@ -43,7 +43,7 @@ Fix a failing test: -sed -i "s/''/etags/" t/tags-lisp-space.sh +sed -i "s/''/etags/" t/tags-lisp-space.sh Prepare Automake for compilation: diff --git a/chapter08/bash.xml b/chapter08/bash.xml index 60cb9b491..b8dd5fe40 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -83,14 +83,7 @@ su tester << EOF PATH=$PATH make tests < $(tty) EOF - + Install the package and move the main executable to /bin: @@ -104,7 +97,7 @@ mv -vf /usr/bin/bash /bin The parameters used make the bash - process an interactive login shell and continue to disable hashing so + process an interactive login shell and continues to disable hashing so that new programs are found as they become available. diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index d97b9558a..13aaaa2c4 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -111,9 +111,9 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ make NON_ROOT_USERNAME=tester check-root We're going to run the remainder of the tests as the - tester user. Certain tests, - however, require that the user be a member of more than one group. So that - these tests are not skipped we'll add a temporary group and make the + tester user. Certain tests + require that the user be a member of more than one group. So that + these tests are not skipped, add a temporary group and make the user tester a part of it: echo "dummy:x:102:tester" >> /etc/group @@ -126,12 +126,6 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ Now run the tests: su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" - Remove the temporary group: @@ -147,7 +141,7 @@ mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin mv -v /usr/bin/chroot /usr/sbin mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 -sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8 +sed -i 's/"1"/"8"' /usr/share/man/man8/chroot.8 Some of the scripts in the LFS-Bootscripts package depend on head, nice, @@ -190,6 +184,17 @@ sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8 + + [ + + Is an actual command, /usr/bin/[, that is a synonym + for the test command. + + [ + + + + base32 diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml index dbfc1e7e8..308c97709 100644 --- a/chapter08/e2fsprogs.xml +++ b/chapter08/e2fsprogs.xml @@ -23,7 +23,7 @@ - <para>The E2fsprogs package contains the utilities for handling the + <para>The e2fsprogs package contains the utilities for handling the <systemitem class="filesystem">ext2</systemitem> file system. It also supports the <systemitem class="filesystem">ext3</systemitem> and <systemitem class="filesystem">ext4</systemitem> journaling @@ -44,13 +44,13 @@ <sect2 role="installation"> <title>Installation of E2fsprogs - The E2fsprogs documentation recommends that the package be built in + The e2fsprogs documentation recommends that the package be built in a subdirectory of the source tree: mkdir -v build cd build - Prepare E2fsprogs for compilation: + Prepare e2fsprogs for compilation: ../configure --prefix=/usr \ --bindir=/bin \ @@ -62,7 +62,7 @@ cd build --disable-fsck - The meaning of the environment variable and configure options: + The meaning of the configure options: --with-root-prefix="" and @@ -74,7 +74,7 @@ cd build programs still need to be available. They belong in directories like /lib and /sbin. If this option is not passed - to E2fsprogs' configure, the programs are installed into the + to configure, the programs are installed into the /usr directory. @@ -90,11 +90,11 @@ cd build --disable-* - This prevents E2fsprogs from building and installing the + This prevents e2fsprogs from building and installing the libuuid and libblkid libraries, the uuidd daemon, and the - fsck wrapper, as Util-Linux installs more + fsck wrapper, as util-linux installs more recent versions. @@ -109,7 +109,7 @@ cd build make check - One of the E2fsprogs tests will attempt to allocate 256 MB of memory. + One of the e2fsprogs tests will attempt to allocate 256 MB of memory. If you do not have significantly more RAM than this, be sure to enable sufficient swap space for the test. See and First fix a problem with the regression tests in the LFS environment: -sed -i 's|usr/bin/env |bin/|' run.sh.in +sed -i 's:usr/bin/env :bin/:' run.sh.in Prepare Expat for compilation: diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 6902211ca..f771c135d 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -65,9 +65,9 @@ cd build --disable-bootstrap \ --with-system-zlib - Note that for other languages, there are some prerequisites that + Note that for other programming languages there are some prerequisites that are not yet available. See the - BLFS Book + BLFS Book GCC page for instructions on how to build all of GCC's supported languages. @@ -77,7 +77,7 @@ cd build LD=ld This parameter makes the configure script use the ld installed - by the binutils installed earlier in this chapter, rather than + by the binutils built earlier in this chapter, rather than the cross-built version which would otherwise be used. @@ -86,7 +86,7 @@ cd build --with-system-zlib This switch tells GCC to link to the system installed copy of - the Zlib library, rather than its own internal copy. + the zlib library, rather than its own internal copy. @@ -100,8 +100,8 @@ cd build critical. Do not skip it under any circumstance. - One set of tests in the GCC test suite is known to exhaust the stack, - so increase the stack size prior to running the tests: + One set of tests in the GCC test suite is known to exhaust the default + stack, so increase the stack size prior to running the tests: ulimit -s 32768 @@ -175,7 +175,7 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \ Now that our final toolchain is in place, it is important to again ensure that compiling and linking will work as expected. We do this by performing - the same sanity checks as we did earlier in the chapter: + some sanity checks: - Depending on your machine architecture, the above may differ slightly, - the difference usually being the name of the directory + Depending on your machine architecture, the above may differ slightly. + The difference will be the name of the directory after /usr/lib/gcc. The important thing to look for here is that gcc has found all three crt*.o files under the @@ -228,16 +228,8 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \ /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed /usr/include - Again, note that the directory named after your target triplet may be - different than the above, depending on your architecture. - - + Again, the directory named after your target triplet may be + different than the above, depending on your system architecture. The GDBM package contains the GNU Database Manager. It is a library - of database functions that use extensible hashing and work similar to the + of database functions that use extensible hashing and works similar to the standard UNIX dbm. The library provides primitives for storing key/data pairs, searching and retrieving the data by its key and deleting a key along with its data. @@ -60,8 +60,8 @@ --enable-libgdbm-compat - This switch enables the libgdbm compatibility library to be - built, as some packages outside of LFS may require the older DBM + This switch enables building the libgdbm compatibility library. + Some packages outside of LFS may require the older DBM routines it provides. diff --git a/chapter08/gettext.xml b/chapter08/gettext.xml index dd5bebbe9..cafe26182 100644 --- a/chapter08/gettext.xml +++ b/chapter08/gettext.xml @@ -43,31 +43,6 @@ Installation of Gettext - - - - - - Prepare Gettext for compilation: ./configure --prefix=/usr \ @@ -76,8 +51,9 @@ sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.inCompile the package: -make BISON_LOCALEDIR=/usr/share/locale - + +make + To test the results (this takes a long time, around 3 SBUs), issue: diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 7d993d509..05a0b880e 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -49,34 +49,7 @@ store their runtime data in the FHS-compliant locations: patch -Np1 -i ../&glibc-fhs-patch; - - The Glibc documentation recommends building Glibc in a dedicated build directory: @@ -94,7 +67,7 @@ cd build The meaning of the options and new configure parameters: - + --disable-werror @@ -176,7 +149,7 @@ esac misc/tst-ttyname is known to fail in the LFS chroot environment. - + The nss/tst-nss-files-hosts-multi test may fail for reasons that have not been determined. @@ -206,18 +179,7 @@ esac systems where the CPU is not a relatively new Intel or AMD processor. - Though it is a harmless message, the install stage of Glibc will @@ -382,7 +344,7 @@ unset ZONEINFO zic -L /dev/null ... - This creates posix time zones, without any leap seconds. It is + This creates posix time zones without any leap seconds. It is conventional to put these in both zoneinfo and zoneinfo/posix. It is @@ -390,7 +352,7 @@ unset ZONEINFO zoneinfo, otherwise various test-suites will report errors. On an embedded system, where space is tight and you do not intend to ever update the time zones, you could save - 1.9MB by not using the posix + 1.9 MB by not using the posix directory, but some applications or test-suites might produce some failures. diff --git a/chapter08/gzip.xml b/chapter08/gzip.xml index 3d7783316..5040f2e0b 100644 --- a/chapter08/gzip.xml +++ b/chapter08/gzip.xml @@ -53,9 +53,6 @@ make check - Two tests are known to fail in the LFS environment: - help-version and zmore. - Install the package: make install diff --git a/chapter08/intltool.xml b/chapter08/intltool.xml index f402fec67..bf2cc8b47 100644 --- a/chapter08/intltool.xml +++ b/chapter08/intltool.xml @@ -45,6 +45,10 @@ sed -i 's:\\\${:\\\$\\{:' intltool-update.in + The above regular expression looks unusual because of all the + baxkslashes. What it does is add a backslash before the right brace + character in the sequence '\${' resulting in '\$\{'. + Prepare Intltool for compilation: ./configure --prefix=/usr diff --git a/chapter08/introduction.xml b/chapter08/introduction.xml index a407cba1b..b63ce1c3e 100644 --- a/chapter08/introduction.xml +++ b/chapter08/introduction.xml @@ -10,9 +10,8 @@ Introduction - In this chapter, we enter the building site and start constructing the - LFS system in earnest. That is, we chroot into the temporary mini Linux system, - make a few final preparations, and then begin installing the packages. + In this chapter, we start constructing the LFS system in earnest. + The installation of this software is straightforward. Although in many cases the installation instructions could be made shorter and more generic, @@ -41,25 +40,26 @@ contains, approximately how long it will take to build, and how much disk space is required during this building process. Following the installation instructions, there is a list of programs and libraries (along with brief - descriptions of these) that the package installs. + descriptions) that the package installs. - The SBU values and required disk space includes - test suite data for all applicable packages in - . + The SBU values and required disk space includes test suite data + for all applicable packages in . SBU + values have been calculated using a single CPU core (-j1) for all + operations. About libraries In general, the LFS editors discourage building and installing static libraries. The original purpose for most static libraries has been made - obsolete in a modern Linux system. In addition linking a static library + obsolete in a modern Linux system. In addition, linking a static library into a program can be detrimental. If an update to the library is needed to remove a security problem, all programs that use the static library will need to be relinked to the new library. Since the use of static libraries is not always obvious, the relevant programs (and the procedures needed to do the linking) may not even be known. - In the procedures in Chapter 6, we remove or disable installation of + In the procedures in this chapter, we remove or disable installation of most static libraries. Usually this is done by passing a option to configure. In other cases, alternate means are needed. In a few cases, especially diff --git a/chapter08/iproute2.xml b/chapter08/iproute2.xml index 64682a918..9e609e3cf 100644 --- a/chapter08/iproute2.xml +++ b/chapter08/iproute2.xml @@ -47,14 +47,14 @@ be installed. Prevent this by running the commands below. If the arpd binary is needed, instructions for compiling Berkeley DB can be found in the BLFS Book at - . + . sed -i /ARPD/d Makefile rm -fv man/man8/arpd.8 It is also necessary to disable building two modules that - requires . + require . sed -i 's/.m_ipt.o//' tc/Makefile diff --git a/chapter08/kbd.xml b/chapter08/kbd.xml index 7d85e4db5..a219102eb 100644 --- a/chapter08/kbd.xml +++ b/chapter08/kbd.xml @@ -41,21 +41,21 @@ Installation of Kbd - The behaviour of the Backspace and Delete keys is not consistent + The behaviour of the backspace and delete keys is not consistent across the keymaps in the Kbd package. The following patch fixes this issue for i386 keymaps: patch -Np1 -i ../&kbd-backspace-patch; - After patching, the Backspace key generates the character with code 127, - and the Delete key generates a well-known escape sequence. + After patching, the backspace key generates the character with code 127, + and the delete key generates a well-known escape sequence. Remove the redundant resizecons program (it requires the defunct svgalib to provide the video mode files - for normal use setfont sizes the console appropriately) together with its manpage. -sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure +sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in Prepare Kbd for compilation: @@ -63,12 +63,12 @@ sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in ./configure --prefix=/usr --disable-vlock - The meaning of the configure options: + The meaning of the configure option: --disable-vlock - This option prevents the vlock utility from being built, as it + This option prevents the vlock utility from being built because it requires the PAM library, which isn't available in the chroot environment. @@ -97,7 +97,7 @@ sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in If desired, install the documentation: -mkdir -v /usr/share/doc/kbd-&kbd-version; +mkdir -v /usr/share/doc/kbd-&kbd-version; cp -R -v docs/doc/* /usr/share/doc/kbd-&kbd-version; diff --git a/chapter08/kmod.xml b/chapter08/kmod.xml index b1fe24911..01eda165b 100644 --- a/chapter08/kmod.xml +++ b/chapter08/kmod.xml @@ -78,12 +78,7 @@ LFS chroot environment. At a minimum the git program is required and several tests will not run outside of a git repository. - - Install the package, and create symlinks for + Install the package and create symlinks for compatibility with Module-Init-Tools (the package that previously handled Linux kernel modules): diff --git a/chapter08/libffi.xml b/chapter08/libffi.xml index 825b09a57..3b5347992 100644 --- a/chapter08/libffi.xml +++ b/chapter08/libffi.xml @@ -49,18 +49,7 @@ If this is not done, all applications that link to libffi will trigger Illegal Operation Errors. - + Prepare libffi for compilation: ./configure --prefix=/usr --disable-static --with-gcc-arch=native @@ -92,8 +81,6 @@ sed -e '/^includedir/ s/=.*$/=@includedir@/' \ make check - Six tests, all related to test-callback.c, are known to fail. - Install the package: make install diff --git a/chapter08/m4.xml b/chapter08/m4.xml index a5911b576..54608bfeb 100644 --- a/chapter08/m4.xml +++ b/chapter08/m4.xml @@ -40,7 +40,7 @@ Installation of M4 - First, make some fixes required by glibc-2.28: + First, make some fixes required by glibc-2.28 and later: sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h @@ -84,13 +84,13 @@ echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h m4 Copies the given files while expanding the macros that they - contain [These macros are either built-in or user-defined and can + contain. These macros are either built-in or user-defined and can take any number of arguments. Besides performing macro expansion, m4 has built-in functions for including named files, running Unix commands, performing integer arithmetic, manipulating text, recursion, etc. The m4 program can be used either as a front-end to a compiler or as a macro processor - in its own right.] + in its own right. m4 diff --git a/chapter08/make.xml b/chapter08/make.xml index 887950b4b..080ed3989 100644 --- a/chapter08/make.xml +++ b/chapter08/make.xml @@ -53,9 +53,7 @@ make - The test suite needs to know where supporting perl files are located. - We use an environment variable to accomplish this. To test the - results, issue: + To test the results, issue: make check diff --git a/chapter08/man-db.xml b/chapter08/man-db.xml index dd8b6f970..45b1f4fa2 100644 --- a/chapter08/man-db.xml +++ b/chapter08/man-db.xml @@ -126,21 +126,10 @@ make check - One test, man-missing-locales, is known to fail in the LFS chroot envirnment. - Install the package: make install - diff --git a/chapter08/meson.xml b/chapter08/meson.xml index 1060fa2d4..128eb3d5a 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -23,8 +23,8 @@ - <para>Meson is an open source build system meant to be both extremely fast, - and, even more importantly, as user friendly as possible.</para> + <para>Meson is an open source build system meant to be both extremely fast + and as user friendly as possible.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> @@ -39,11 +39,7 @@ <sect2 role="installation"> <title>Installation of Meson - Compile Meson with the following command: python3 setup.py build @@ -64,8 +60,8 @@ cp -rv dest/* / By default python3 setup.py install installs various files (such as man pages) into Python Eggs. With a specified root location, setup.py installs - these files into a standard hierarchy. Then we can just copy - the hierarchy so the files will be in the standard location. + these files into a standard hierarchy. Then the hierarchy + can just be copied to the standard location. diff --git a/chapter08/openssl.xml b/chapter08/openssl.xml index c620ae629..0b22eab7f 100644 --- a/chapter08/openssl.xml +++ b/chapter08/openssl.xml @@ -25,7 +25,7 @@ The OpenSSL package contains management tools and libraries relating to cryptography. These are useful for providing cryptographic functions - to other packages, such as OpenSSH, email applications and web browsers + to other packages, such as OpenSSH, email applications, and web browsers (for accessing HTTPS sites). @@ -42,12 +42,7 @@ Installation of OpenSSL - Prepare OpenSSL for compilation: ./config --prefix=/usr \ diff --git a/chapter08/patch.xml b/chapter08/patch.xml index 174aa9192..870007b98 100644 --- a/chapter08/patch.xml +++ b/chapter08/patch.xml @@ -79,10 +79,10 @@ patch - Modifies files according to a patch file [A patch file is + Modifies files according to a patch file (A patch file is normally a difference listing created with the diff program. By applying these differences to the original files, - patch creates the patched versions.] + patch creates the patched versions.) patch diff --git a/chapter08/pkgconfig.xml b/chapter08/pkgconfig.xml index aa39b72e0..b987a7652 100644 --- a/chapter08/pkgconfig.xml +++ b/chapter08/pkgconfig.xml @@ -23,9 +23,9 @@ - <para> The pkg-config package contains a tool for passing the include path - and/or library paths to build tools during the configure and make file - execution.</para> + <para>The pkg-config package contains a tool for passing the include path + and/or library paths to build tools during the configure and make phases + of package installations.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index d28038467..14e94fdaf 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -45,36 +45,33 @@ <title>Upgrade Issues A Package Manager makes it easy to upgrade to newer versions when they - are released. Generally the instructions in the LFS and BLFS Book can be + are released. Generally the instructions in the LFS and BLFS books can be used to upgrade to the newer versions. Here are some points that you should be aware of when upgrading packages, especially on a running system. If Glibc needs to be upgraded to a newer version, (e.g. from - glibc-2.19 to glibc-2.20), it is safer to rebuild LFS. Though you + glibc-2.31 to glibc-2.32), it is safer to rebuild LFS. Though you may be able to rebuild all the packages in their dependency order, we do not recommend it. - - If a package containing a shared library is updated, and if the - name of the library changes, then all the packages dynamically linked - to the library need to be recompiled to link against the newer library. - (Note that there is no correlation between the package version and the - name of the library.) For example, consider a package foo-1.2.3 that - installs a shared library with name - libfoo.so.1. Say you upgrade - the package to a newer version foo-1.2.4 that installs a shared library - with name libfoo.so.2. In this - case, all packages that are dynamically linked to - libfoo.so.1 need to be - recompiled to link against - libfoo.so.2. Note that you - should not remove the previous libraries until the dependent packages - are recompiled. - - + If a package containing a shared library is updated, and + if the name of the library changes, then any the packages dynamically + linked to the library need to be recompiled in order to link against the + newer library. (Note that there is no correlation between the package + version and the name of the library.) For example, consider a package + foo-1.2.3 that installs a shared library with name libfoo.so.1. If you upgrade the package to + a newer version foo-1.2.4 that installs a shared library with name + libfoo.so.2. In this case, any + packages that are dynamically linked to libfoo.so.1 need to be recompiled to link + against libfoo.so.2 in order to + use the new library version. You should not remove the previous + libraries unless all the dependent packages are recompiled. + diff --git a/chapter08/procps.xml b/chapter08/procps.xml index a7080f247..b09f0f69d 100644 --- a/chapter08/procps.xml +++ b/chapter08/procps.xml @@ -58,7 +58,7 @@ --with-systemd - The meaning of the configure options: + The meaning of the configure option: --disable-kill diff --git a/chapter08/python.xml b/chapter08/python.xml index 54b0eeab3..81178ca1a 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -25,7 +25,7 @@ The Python 3 package contains the Python development environment. It is useful for object-oriented programming, writing scripts, prototyping - large programs or developing entire applications. + large programs, or developing entire applications. &buildtime; @@ -84,7 +84,7 @@ make To test the results, issue make test. - Some tests requiring network connection or additional packages are + Some tests requiring a network connection or additional packages are skipped. The test named test_normalization fails because network configuration is not completed yet. For more comprehensive results, the test can be rerun when Python 3 is reinstalled in BLFS. @@ -170,8 +170,8 @@ tar --strip-components=1 \ is a Python program that reads Python 2.x source code and applies a - series of fixes to transform it into valid - Python 3.x code. + series of fixes to transform it into + valid Python 3.x code. 2to3 @@ -231,20 +231,7 @@ tar --strip-components=1 \ - + diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml index 49d2789dc..36a81d966 100644 --- a/chapter08/shadow.xml +++ b/chapter08/shadow.xml @@ -67,13 +67,15 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;/var/mail location used currently: -sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \ - -e 's@/var/spool/mail@/var/mail@' etc/login.defs + +sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \ + -e 's:/var/spool/mail:/var/mail:' \ + -i etc/login.defs If you chose to build Shadow with Cracklib support, run the following: -sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs +sed -i 's:DICTPATH.*:DICTPATH\t/lib/cracklib/pw_dict:' etc/login.defs Make a minor change to make the first group number generated @@ -84,7 +86,7 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;Prepare Shadow for compilation: touch /usr/bin/passwd -./configure --sysconfdir=/etc \ +./configure --sysconfdir=/etc \ --with-group-name-max-length=32 diff --git a/chapter08/sysklogd.xml b/chapter08/sysklogd.xml index 26f57020b..9aec7ba9b 100644 --- a/chapter08/sysklogd.xml +++ b/chapter08/sysklogd.xml @@ -23,7 +23,7 @@ - <para>The Sysklogd package contains programs for logging system messages, + <para>The sysklogd package contains programs for logging system messages, such as those given by the kernel when unusual things happen.</para> <segmentedlist> diff --git a/chapter08/tar.xml b/chapter08/tar.xml index 0af1216ee..50a49d80b 100644 --- a/chapter08/tar.xml +++ b/chapter08/tar.xml @@ -23,8 +23,8 @@ <sect2 role="package"> <title/> - <para>The Tar package provides the ability to create tar archives, as well - as various other kinds of manipulation. Tar can be used on + <para>The Tar package provides the ability to create tar archives as well + as perform various other kinds of archive manipulation. Tar can be used on previously created archives to extract files, to store additional files, or to update or list files which were already stored. </para> @@ -50,7 +50,7 @@ --bindir=/bin</userinput></screen> <variablelist> - <title>The meaning of the configure options: + The meaning of the configure option: FORCE_UNSAFE_CONFIGURE=1 diff --git a/chapter08/texinfo.xml b/chapter08/texinfo.xml index 2f428bf47..7257ae5b5 100644 --- a/chapter08/texinfo.xml +++ b/chapter08/texinfo.xml @@ -46,7 +46,7 @@ ./configure --prefix=/usr --disable-static - The meaning of the configure options: + The meaning of the configure option: --disable-static @@ -101,10 +101,10 @@ recreated, the following optional commands will accomplish the task: pushd /usr/share/info -rm -v dir -for f in * - do install-info $f dir 2>/dev/null -done + rm -v dir + for f in * + do install-info $f dir 2>/dev/null + done popd diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index b2b6f2c0e..8f3df8366 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -90,7 +90,7 @@ Running the test suite as the root user can be harmful to your system. To run it, the CONFIG_SCSI_DEBUG option for the kernel must - be available in the currently running system, and must be built as a + be available in the currently running system and must be built as a module. Building it into the kernel will prevent booting. For complete coverage, other BLFS packages must be installed. If desired, this test can be run after rebooting into the completed LFS system and running: diff --git a/chapter08/vim.xml b/chapter08/vim.xml index 4ec0d1a3b..4d06d5a08 100644 --- a/chapter08/vim.xml +++ b/chapter08/vim.xml @@ -54,11 +54,7 @@ echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h - - Prepare Vim for compilation: + Prepare vim for compilation: ./configure --prefix=/usr @@ -66,19 +62,17 @@ make - To prepare the tests, ensure that the - tester user can write - to the sources tree: + To prepare the tests, ensure that user + tester can write + to the source tree: chown -Rv tester . - Now run the tests as the tester user: + Now run the tests as user tester: su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log - - The test suite outputs a lot of binary data to the screen. This can cause issues with the settings of the current terminal. The problem can be avoided by redirecting the output to a log file as shown above. A @@ -100,7 +94,7 @@ for L in /usr/share/man/{,*/}man1/vim.1; do ln -sv vim.1 $(dirname $L)/vi.1 done - By default, Vim's documentation is installed in By default, vim's documentation is installed in /usr/share/vim. The following symlink allows the documentation to be accessed via /usr/share/doc/vim-&vim-version;, making @@ -109,10 +103,10 @@ done ln -sv ../&vim-docdir;/doc /usr/share/doc/vim-&vim-version; If an X Window System is going to be installed on the LFS - system, it may be necessary to recompile Vim after installing X. Vim + system, it may be necessary to recompile vim after installing X. Vim comes with a GUI version of the editor that requires X and some additional libraries to be installed. For more information on this - process, refer to the Vim documentation and the Vim installation page + process, refer to the vim documentation and the vim installation page in the BLFS book at . @@ -157,7 +151,7 @@ EOF vi-compatible manner. Remove the no to keep the old vi behavior. The set backspace=2 setting allows backspacing over line breaks, autoindents, and the start of - insert. The syntax on parameter enables vim's syntax + an insert. The syntax on parameter enables vim's syntax highlighting. The set mouse= setting enables proper pasting of text with the mouse when working in chroot or over a remote connection. Finally, the if statement with the @@ -165,18 +159,14 @@ EOF vim's guess about the background color of some terminal emulators. This gives the highlighting a better color scheme for use on the black background of these programs. - + Documentation for other available options can be obtained by running the following command: vim -c ':options' - By default, Vim only installs spell files for the English language. + By default, vim only installs spell files for the English language. To install spell files for your preferred language, download the *.spl and optionally, the *.sug files for your language and character encoding from Date: Sun, 14 Jun 2020 13:00:39 +0000 Subject: Slightly modify lfs.css so that the Dependencies page renders Ok on epiphany with default fonts git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11938 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- stylesheets/lfs-xsl/lfs.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stylesheets') diff --git a/stylesheets/lfs-xsl/lfs.css b/stylesheets/lfs-xsl/lfs.css index 7f2cf1c1c..1c6b1ca71 100644 --- a/stylesheets/lfs-xsl/lfs.css +++ b/stylesheets/lfs-xsl/lfs.css @@ -433,7 +433,7 @@ div.materials dd { .segtitle { float: left; padding-left: 1em; - width: 14em; + width: 14.5em; } .content .segtitle { -- cgit v1.2.3-54-g00ecf