diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml
index 3930090d0..a8f0f9802 100644
--- a/chapter08/binutils.xml
+++ b/chapter08/binutils.xml
@@ -163,6 +163,10 @@ cd build
make tooldir=/usr install
+ Remove useless static libraries:
+
+rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a
+
@@ -176,7 +180,7 @@ cd build
addr2line, ar, as, c++filt, dwp, elfedit, gprof, ld, ld.bfd, ld.gold, nm,
objcopy, objdump, ranlib, readelf, size, strings, and strip
- libbfd.{a,so}, libctf.{a,so}, libctf-nobfd.{a,so}, and libopcodes.{a,so}
+ libbfd.so, libctf.so, libctf-nobfd.so, and libopcodes.so
/usr/lib/ldscripts
diff --git a/chapter08/bzip2.xml b/chapter08/bzip2.xml
index e2ff5108f..bc38c6023 100644
--- a/chapter08/bzip2.xml
+++ b/chapter08/bzip2.xml
@@ -95,6 +95,10 @@ rm -v /usr/bin/{bunzip2,bzcat,bzip2}
ln -sv bzip2 /bin/bunzip2
ln -sv bzip2 /bin/bzcat
+ Remove an useless static library:
+
+rm -fv /usr/lib/libz.a
+
@@ -109,7 +113,7 @@ ln -sv bzip2 /bin/bzcat
bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to
bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep),
bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore
- libbz2.{a,so}
+ libbz2.so
/usr/share/doc/bzip2-&bzip2-version;
diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml
index 65d8604cd..fc6f897f5 100644
--- a/chapter08/e2fsprogs.xml
+++ b/chapter08/e2fsprogs.xml
@@ -122,10 +122,9 @@ cd build
make install
- Make the installed static libraries writable so debugging symbols can
- be removed later:
+ Remove useless static libraries:
-chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
+rm -fv /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
This package installs a gzipped
.info file but doesn't update the
diff --git a/chapter08/flex.xml b/chapter08/flex.xml
index fc8574c1d..d05474f03 100644
--- a/chapter08/flex.xml
+++ b/chapter08/flex.xml
@@ -53,8 +53,9 @@
Prepare Flex for compilation:
-
-./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;
+./configure --prefix=/usr \
+ --docdir=/usr/share/doc/flex-&flex-version; \
+ --disable-static
Compile the package:
diff --git a/chapter08/libtool.xml b/chapter08/libtool.xml
index affeaca95..a2abdbe70 100644
--- a/chapter08/libtool.xml
+++ b/chapter08/libtool.xml
@@ -68,6 +68,13 @@
make install
+
+
+ Remove an useless static library:
+
+rm -fv /usr/lib/libltdl.a
+
diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml
index d0036c7de..53527003d 100644
--- a/chapter08/ncurses.xml
+++ b/chapter08/ncurses.xml
@@ -41,10 +41,6 @@
Installation of Ncurses
- Don't install a static library that is not handled by configure:
-
-sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in
-
Prepare Ncurses for compilation:
./configure --prefix=/usr \
@@ -133,6 +129,10 @@ done
echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so
+ Remove a static library that is not handled by configure:
+
+rm -fv /usr/lib/libncurses++w.a
+
If desired, install the Ncurses documentation:
mkdir -v /usr/share/doc/ncurses-&ncurses-version;
@@ -188,7 +188,6 @@ cp -av lib/lib*.so.5* /usr/lib
libformw.so,
libmenuw.so,
libncursesw.so,
- libncurses++w.a,
libpanelw.so, and their non-wide-character counterparts without "w"
in the library names.
diff --git a/chapter08/revisedchroot.xml b/chapter08/revisedchroot.xml
index 725c76170..3a2defb07 100644
--- a/chapter08/revisedchroot.xml
+++ b/chapter08/revisedchroot.xml
@@ -36,19 +36,6 @@ chroot "$LFS" /usr/bin/env -i \
linkend="ch-tools-bindmount"/> and .
- There were several static libraries that were not suppressed earlier
- in the chapter in order to satisfy the regression tests in several packages. These
- libraries are from binutils, bzip2, e2fsprogs, flex, libtool, and zlib. If desired,
- remove them now:
-
-rm -f /usr/lib/lib{bfd,opcodes}.a
-rm -f /usr/lib/libctf{,-nobfd}.a
-rm -f /usr/lib/libbz2.a
-rm -f /usr/lib/lib{com_err,e2p,ext2fs,ss}.a
-rm -f /usr/lib/libltdl.a
-rm -f /usr/lib/libfl.a
-rm -f /usr/lib/libz.a
-
There are also several files installed in the /usr/lib and /usr/libexec
directories with a file name extension of .la. These are "libtool archive"
files. As already said, they are only useful when linking with static
diff --git a/chapter08/zlib.xml b/chapter08/zlib.xml
index 90c343ca5..f00988468 100644
--- a/chapter08/zlib.xml
+++ b/chapter08/zlib.xml
@@ -65,6 +65,10 @@
mv -v /usr/lib/libz.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so
+ Remove an useless static library:
+
+rm -fv /usr/lib/libz.a
+
@@ -74,7 +78,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.soInstalled libraries
- libz.{a,so}
+ libz.so