diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml
index 84dc75acd..fa20d3688 100644
--- a/appendices/dependencies.xml
+++ b/appendices/dependencies.xml
@@ -399,49 +399,6 @@
-
- Check
-
-
- &dependencies;
-
- Gawk, GCC, Grep, Make, Sed, and Texinfo
-
-
-
-
- &runtime;
-
- Bash and Gawk
-
-
-
-
- &testsuites;
-
- None
-
-
-
-
- &before;
-
- None
-
-
-
-
- &external;
-
-
- libsubunit
- and
-
- patchutils
-
-
-
-
Coreutils
@@ -871,7 +828,7 @@
&before;
- Wheel
+ Packaging and Wheel
@@ -1239,7 +1196,7 @@
&testsuites;
- No test suite available
+ None
@@ -1641,7 +1598,7 @@
&testsuites;
- No test suite available
+ None
@@ -2459,6 +2416,46 @@
+
+ Packaging
+
+
+ &dependencies;
+
+ Flit-core and Python
+
+
+
+
+ &runtime;
+
+ Python
+
+
+
+
+ &testsuites;
+
+ No test suite available
+
+
+
+
+ &before;
+
+ Wheel
+
+
+
+
+ &external;
+
+
+ pytest
+
+
+
+
Patch
@@ -2650,7 +2647,7 @@
&testsuites;
- No test suite available
+ Expect
@@ -3312,7 +3309,7 @@
&dependencies;
- Python and Flit-core
+ Python, Flit-core, and packaging
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 7780b3dc9..0b6f140b8 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -39,603 +39,345 @@
or as
appropriate for the entry or if needed the entire day's listitem.
-->
-
- 2025-03-02
+ 2025-06-04
- [bdubbs] - Update to vim-9.1.1166 (Security Update). Fixes
- #5666.
+ [bdubbs] - Update to ncurses-6.5-20250531. Fixes
+ #5737.
+
+
+ [bdubbs] - Update to readline-8.3-rc2. Fixes
+ #5738.
+
+
+ [bdubbs] - Update to bash-5.3-rc2. Fixes
+ #5738.
+
+
+ [bdubbs] - Update to Python-3.13.4. Fixes
+ #6739.
- 2025-02-27
+ 2025-06-01
- [bdubbs] - Update to zstd-1.5.7. Fixes
- #5652.
-
-
- [bdubbs] - Update to systemd-257.3. Fixes
- #5612.
-
-
- [bdubbs] - Update to shadow-4.17.3. Fixes
- #5660.
-
-
- [bdubbs] - Update to setuptools-75.8.1. Fixes
- #5662.
-
-
- [bdubbs] - Update to linux-6.13.4. Fixes
- #5647.
-
-
- [bdubbs] - Update to kmod-34. Fixes
- #5657.
-
-
- [bdubbs] - Update to inetutils-2.6. Fixes
- #5656.
-
-
- [bdubbs] - Update to gettext-0.24. Fixes
- #5661.
-
-
- [bdubbs] - Update to flit_core-3.11.0. Fixes
- #5654.
-
-
-
-
-
- 2025-02-24
-
-
- [bdubbs] - Update to man-pages-6.12. Fixes
- #5658.
-
-
-
-
-
- 2025-02-19
-
-
- [xry111] - Update to vim-9.1.1122 (Security Update).
- Addresses #4500.
-
-
- [xry111] - Update to man-pages-6.11. Fixes
- #5646.
-
-
-
-
-
- 2025-02-13
-
-
- [bdubbs] - Update to vim-9.1.1106. Addresses
- #4500.
-
-
- [bdubbs] - Update to diffutils-3.11. Fixes
- #5639.
-
-
- [bdubbs] - Update to libffi-3.4.7. Fixes
- #5642.
-
-
- [bdubbs] - Update to linux-6.13.2. Fixes
- #5643.
-
-
- [bdubbs] - Update to Python3-3.13.2. Fixes
- #5640.
-
-
- [bdubbs] - Update to sysvinit-3.14. Fixes
- #5641.
-
-
-
-
-
- 2025-02-02
-
-
- [bdubbs] - Update to vim-9.1.1071. Addresses
- #4500.
-
-
- [bdubbs] - Update to iana-etc-20250123. Addresses
+ [bdubbs] - Update to iana-etc-20250519. Addresses
#5006.
- [bdubbs] - Update to binutils-2.44.0. Fixes
- #5634.
-
-
- [bdubbs] - Update to coreutils-9.6. Fixes
- #5628.
-
-
- [bdubbs] - Update to e2fsprogs-1.47.2. Fixes
- #5637.
-
-
- [bdubbs] - Update to glibc-2.41. Fixes
- #5638.
-
-
- [bdubbs] - Update to iproute2-6.13.0. Fixes
- #5631.
-
-
- [bdubbs] - Update to libxcrypt-4.4.38. Fixes
- #5626.
-
-
- [bdubbs] - Update to linux-6.13.1. Fixes
- #5629.
-
-
- [bdubbs] - Update to man-pages-6.10. Fixes
- #5632.
-
-
- [bdubbs] - Update to meson-1.7.0. Fixes
- #5636.
-
-
- [bdubbs] - Update to perl-5.40.1. Fixes
- #5630.
-
-
- [bdubbs] - Update to tcl8.6.16. Fixes
- #5635.
-
-
- [bdubbs] - Update to tzdata2025a. Fixes
- #5627.
-
-
- [bdubbs] - Update to xz-5.6.4. Fixes
- #5633.
-
-
-
-
-
- 2025-01-15
-
-
- [bdubbs] - Update to vim-9.1.1016. Addresses
- #4500.
-
-
- [bdubbs] - Update to iana-etc-20250108. Addresses
- #5006.
-
-
- [bdubbs] - Update to util-linux-2.40.4. Fixes
- #5624.
-
-
- [bdubbs] - Update to sysvinit-3.13. Fixes
- #5621.
-
-
- [bdubbs] - Update to sysklogd-2.7.0. Fixes
- #5623.
-
-
- [bdubbs] - Update to shadow-4.17.2. Fixes
- #5625.
-
-
- [bdubbs] - Update to setuptools-75.8.0. Fixes
- #5622.
-
-
- [bdubbs] - Update to linux-6.12.9. Fixes
- #5620.
-
-
- [bdubbs] - Update to gettext-0.23.1. Fixes
- #5619.
-
-
-
-
-
- 2025-01-01
-
-
- [renodr] - Update to libxcrypt-4.4.37. Fixes
- #5618.
-
-
- [renodr] - Update to dbus-1.16.0. Fixes
- #5609.
-
-
- [bdubbs] - Update to iana-etc-20241220. Addresses
- #5006.
-
-
- [bdubbs] - Update to texinfo-7.2. Fixes
- #5616.
-
-
- [bdubbs] - Update to sysvinit-3.12. Fixes
- #5615.
-
-
- [bdubbs] - Update to shadow-4.17.1. Fixes
- #5617.
-
-
- [bdubbs] - Update to procps-ng-4.0.5. Fixes
- #5611.
-
-
- [bdubbs] - Update to meson-1.6.1. Fixes
- #5610.
-
-
- [bdubbs] - Update to linux-6.12.7. Fixes
- #5613.
-
-
- [bdubbs] - Update to kbd-2.7.1. Fixes
- #5608.
-
-
- [bdubbs] - Update to jinja2-3.1.5 (Security Update). Fixes
- #5614.
-
-
-
-
-
- 2024-12-15
-
-
- [bdubbs] - Update to vim-9.1.0927. Addresses
+ [bdubbs] - Update to vim-9.1.1418. Addresses
#4500.
- [bdubbs] - Update to iana-etc-20241206. Addresses
- #5006.
+ [bdubbs] - Update to kbd-2.8.0. Fixes
+ #5736.
- [bdubbs] - Update to systemd-257. Fixes
- #5559.
+ [bdubbs] - Update to systemd-257.6. Fixes
+ #5674.
- [bdubbs] - Update to Python-3.13.1 (Security Update). Fixes
- #5605.
+ [bdubbs] - Update to setuptools-80.9.0. Fixes
+ #5728.
- [bdubbs] - Update to libcap-2.73. Fixes
- #5604.
+ [bdubbs] - Update to meson-1.8.1. Fixes
+ #5731.
- [bdubbs] - Update to linux-6.12.5. Fixes
- #5607.
+ [bdubbs] - Update to automake-1.18. Fixes
+ #5734.
- [bdubbs] - Update to kbd-2.7. Fixes
- #5608.
+ [bdubbs] - Update build instructions to accomodate
+ gcc-15 for bc, expect, ncurses, and gmp.
- [bdubbs] - Update to gettext-0.23. Fixes
- #5603.
+ [bdubbs] - Update to gcc-15.1.0. Fixes
+ #5707.
+
+
+ [bdubbs] - Update to less-678. Fixes
+ #5724.
+
+
+ [bdubbs] - Update to readline-8.3-rc1. Fixes
+ #5726.
+
+
+ [bdubbs] - Update to bash-5.3-rc1. Fixes
+ #5714.
+
+
+
+
+
+ 2025-05-15
+
+
+ [bdubbs] - Update to setuptools-80.7.1. Fixes
+ #5715.
+
+
+ [bdubbs] - Update to man-pages-6.14. Fixes
+ #5720.
+
+
+ [bdubbs] - Update to man-db-2.13.1. Fixes
+ #5719.
+
+
+ [bdubbs] - Update to m4-1.4.20. Fixes
+ #5722.
+
+
+ [bdubbs] - Update to linux-6.14.6. Fixes
+ #5717.
+
+
+ [bdubbs] - Update to gettext-0.25. Fixes
+ #5718.
- 2024-12-01
+ 2025-05-01
- [bdubbs] - Update to iana-etc-20241122. Addresses
- #5006.
-
-
- [bdubbs] - Update to file-5.46. Fixes
- #5601.
-
-
- [bdubbs] - Update to iproute2-6.12.0. Fixes
- #5597.
-
-
- [bdubbs] - Update to libtool-2.5.4. Fixes
- #5598.
-
-
- [bdubbs] - Update to linux-6.12.1. Fixes
- #5586.
-
-
- [bdubbs] - Update to setuptools-75.6.0 (Python Module). Fixes
- #5599.
-
-
- [bdubbs] - Update to wheel-0.45.1 (Python Module). Fixes
- #5600.
-
-
-
-
-
- 2024-11-15
-
-
- [bdubbs] - Update to vim-9.1.0866. Addresses
+ [bdubbs] - Update to vim-9.1.1353. Addresses
#4500.
- [bdubbs] - Update to iana-etc-20241024. Addresses
+ [bdubbs] - Update to setuptools-80.0.1. Fixes
+ #5710.
+
+
+ [bdubbs] - Update to packaging-25.0. Fixes
+ #5706.
+
+
+ [bdubbs] - Update to meson-1.8.0. Fixes
+ #5713.
+
+
+ [bdubbs] - Update to linux-6.14.4. Fixes
+ #5709.
+
+
+ [bdubbs] - Update to iana-etc-20250407. Addresses
#5006.
- [bdubbs] - Update to wheel-0.45.0 (Python Module). Fixes
- #5593.
+ [bdubbs] - Update to gperf-3.3. Fixes
+ #5708.
- [bdubbs] - Update to setuptools-75.5.0 (Python Module). Fixes
- #5595.
-
-
- [bdubbs] - Update to linux-6.11.8. Fixes
- #5582.
-
-
- [bdubbs] - Update to libcap-2.72. Fixes
- #5594.
+ [bdubbs] - Update to elfutils-0.193. Fixes
+ #5711.
- 2024-11-08
+ 2025-04-15
- [bdubbs] - Added binutils-2.43.1-upstream_fix-1.patch. Fixes
- #5591.
+ [bdubbs] - Update to libcap-2.76. Fixes
+ #5704.
- [bdubbs] - Update to flit_core-3.10.1. Fixes
- #5589.
+ [bdubbs] - Update to perl-5.40.2 (Security update). Fixes
+ #5703.
- [bdubbs] - Update to expat-2.6.4. Fixes
- #5590.
+ [bdubbs] - Add packaging-24.2 (Python module). Needed for wheel.
+
+
+
+ [bdubbs] - Update to xz-5.8.1. Fixes
+ #5694.
+
+
+ [bdubbs] - Update to wheel-0.46.1 (Python Module). Fixes
+ #5693.
+
+
+ [bdubbs] - Update to sysklogd-2.7.2. Fixes
+ #5690.
+
+
+ [bdubbs] - Update to Python3-3.13.3. Fixes
+ #5697.
+
+
+ [bdubbs] - Update to openssl-3.5.0. Fixes
+ #5701.
+
+
+ [bdubbs] - Update to meson-1.7.2. Fixes
+ #5691.
+
+
+ [bdubbs] - Update to linux-6.14.2. Fixes
+ #5680.
+
+
+ [bdubbs] - Update to libffi-3.4.8. Fixes
+ #5700.
+
+
+ [bdubbs] - Update to iproute2-6.14.0. Fixes
+ #5682.
+
+
+ [bdubbs] - Update to gzip-1.14. Fixes
+ #5699.
+
+
+ [bdubbs] - Update to grep-3.12. Fixes
+ #5702.
+
+
+ [bdubbs] - Update to gperf-3.2.1. Fixes
+ #5695.
+
+
+ [bdubbs] - Update to gawk-5.3.2. Fixes
+ #5692.
+
+
+ [bdubbs] - Update to diffutils-3.12. Fixes
+ #5696.
+
+
+ [bdubbs] - Update to coreutils-9.7. Fixes
+ #5698.
- 2024-10-25
+ 2025-04-01
- [bdubbs] - Update to linux-6.11.6. Fixes
- #5588.
-
-
- [bdubbs] - Update to libcap-2.71. Fixes
- #5584.
-
-
- [bdubbs] - Update to setuptools-75.3.0. Fixes
- #5585.
-
-
- [bdubbs] - Update to flit_core-3.10.0. Fixes
- #5587.
-
-
-
-
-
- 2024-10-25
-
-
- [bdubbs] - Update to iana-etc-20241015. Addresses
- #5006.
-
-
- [bdubbs] - Update to vim-9.1.0813. Addresses
+ [bdubbs] - Update to vim-9.1.1263. Addresses
#4500.
- [bdubbs] - Update to xz-5.6.3. Fixes
- #5572.
-
-
- [bdubbs] - Update to sysvinit-3.11. Fixes
- #5581.
-
-
- [bdubbs] - Update to setuptools-75.2.0. Fixes
- #5577.
-
-
- [bdubbs] - Update to Python3-3.13.0. Fixes
- #5575.
-
-
- [bdubbs] - Update to openssl-3.4.0. Fixes
- #5582.
-
-
- [bdubbs] - Update to meson-1.6.0. Fixes
- #5580.
-
-
- [bdubbs] - Update to markupsafe-3.0.2. Fixes
- #5576.
-
-
- [bdubbs] - Update to linux-6.11.5. Fixes
- #5574.
-
-
- [bdubbs] - Update to less-668. Fixes
- #5578.
-
-
- [bdubbs] - Update to elfutils-0.192. Fixes
- #5579.
-
-
-
-
-
- 2024-10-03
-
-
- [bdubbs] - Revert back to tcl8.6.15.
-
-
-
-
-
- 2024-10-01
-
-
- [bdubbs] - Update to Python3-3.12.7. Fixes
- #5571.
-
-
- [bdubbs] - Update to tcl9.0.0. Fixes
- #5570.
-
-
- [bdubbs] - Update to linux-6.11.1. Fixes
- #5556.
-
-
- [bdubbs] - Update to libtool-2.5.3. Fixes
- #5569.
-
-
- [bdubbs] - Update to iproute2-6.11.0. Fixes
- #5561.
-
-
- [bdubbs] - Update to bash-5.2.37. Fixes
- #5567.
-
-
- [bdubbs] - Update to bc-7.0.3. Fixes
- #5568.
-
-
-
-
-
- 2024-09-20
-
-
- [bdubbs] - Update to vim-9.1.0738. Addresses
- #4500.
-
-
- [bdubbs] - Update to texinfo-7.1.1. Fixes
- #5558.
-
-
- [bdubbs] - Update to tcl8.6.15. Fixes
- #5562.
-
-
- [bdubbs] - Update to sysklogd-2.6.2. Fixes
- #5557.
-
-
- [bdubbs] - Update to setuptools-75.1.0. Fixes
- #5560.
-
-
- [bdubbs] - Update to meson-1.5.2. Fixes
- #5566.
-
-
- [bdubbs] - Update to iana-etc-20240912. Addresses
+ [bdubbs] - Update to iana-etc-20250328. Addresses
#5006.
- [bdubbs] - Update to gawk-5.3.1. Fixes
- #5564.
+ [bdubbs] - Update to xz-5.8.0. Fixes
+ #5684.
- [bdubbs] - Update to bc-7.0.2. Fixes
- #5563.
+ [bdubbs] - Update to util-linux-2.41. Fixes
+ #5648.
+
+
+ [bdubbs] - Update to tzdata-2025b. Fixes
+ #5681.
+
+
+ [bdubbs] - Update to shadow-4.17.4. Fixes
+ #5678.
+
+
+ [bdubbs] - Update to setuptools-78.1.0. Fixes
+ #5676.
+
+
+ [bdubbs] - Update to patch-2.8. Fixes
+ #5689.
+
+
+ [bdubbs] - Update to mpfr-4.2.2. Fixes
+ #5677.
+
+
+ [bdubbs] - Update to kmod-34.2. Fixes
+ #5688.
+
+
+ [bdubbs] - Update to gdbm-1.25. Fixes
+ #5679.
+
+
+ [bdubbs] - Update to flit_core-3.12.0. Fixes
+ #5683.
+
+
+ [bdubbs] - Update to expat-2.7.1. Fixes
+ #5685.
- 2024-09-07
+ 2025-03-15
- [bdubbs] - Update to tzdata-2024b. Fixes
- #5554.
+ [bdubbs] - Update to vim-9.1.1202. Addresses
+ #4500.
- [bdubbs] - Update to systemd-256.5. Fixes
- #5551.
+ [bdubbs] - Update to iana-etc-20250304. Addresses
+ #5006.
+
+
+ [bdubbs] - Update to sysklogd-2.7.1. Fixes
+ #5668.
- [bdubbs] - Update to setuptools-74.1.2. Fixes
- #5546.
+ [bdubbs] - Update to setuptools-76.0.0. Fixes
+ #5665.
- [bdubbs] - Update to python3-3.12.6. Fixes
- #5555.
+ [bdubbs] - Update to pkgconf-2.4.3. Fixes
+ #5672.
- [bdubbs] - Update to openssl-3.3.2. Fixes
- #5552.
+ [bdubbs] - Update to man-pages-6.13. Fixes
+ #5673.
- [bdubbs] - Update to man-db-2.13.0. Fixes
- #5550.
+ [bdubbs] - Update to linux-6.13.7. Fixes
+ #5664.
- [bdubbs] - Update to linux-6.10.8. Fixes
- #5545.
+ [bdubbs] - Update to libcap-2.75. Fixes
+ #5667.
- [bdubbs] - Update to libpipeline-1.5.8. Fixes
- #5548.
+ [bdubbs] - Update to kmod-34.1. Fixes
+ #5671.
- [bdubbs] - Update to expat-2.6.3. Fixes
- #5553.
+ [bdubbs] - Update to jinja2-3.1.6. Fixes
+ #5670.
- [bdubbs] - Update to bc-7.0.1. Fixes
- #5547.
+ [bdubbs] - Update to expat-2.7.0. Fixes
+ #5675.
+
+
+ [bdubbs] - Update to dbus-1.16.2. Fixes
+ #5663.
- 2024-09-01
+ 2025-03-05
- [bdubbs] - LFS-12.2 released.
+ [bdubbs] - LFS-12.3 released.
diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml
index 16f23520d..7b03c7f02 100644
--- a/chapter01/whatsnew.xml
+++ b/chapter01/whatsnew.xml
@@ -35,27 +35,24 @@
-
+ Bash-&bash-version;
-
+
+
-
Coreutils-&coreutils-version;
@@ -68,18 +65,18 @@
Diffutils-&diffutils-version;
-
+
Expat-&expat-version;
-
+
@@ -87,47 +84,47 @@
Flex-&flex-version;-->
- Flit-core-&flit-core-version;
+ Flit-Core-&flit-core-version;Gawk-&gawk-version;
-
-
+ Gettext-&gettext-version;
-
+
-
-
+
-
+ Iana-Etc-&iana-etc-version;
-
+
@@ -158,24 +155,24 @@
Libffi-&libffi-version;
-
+
+
+
Linux-&linux-version;
-
+
@@ -185,18 +182,18 @@
Man-pages-&man-pages-version;
-
+
Meson-&meson-version;
-
+
@@ -206,27 +203,27 @@
OpenSSL-&openssl-version;
-
+ Perl-&perl-version;
-
- Procps-ng-&procps-ng-version;
+ Pkgconf-&pkgconf-version;
+
Python-&python-version;
-
+
@@ -242,24 +239,24 @@
Systemd-&systemd-version;
-
+
-
+
+
Tzdata-&tzdata-version;
-
+
Util-linux-&util-linux-version;
@@ -278,9 +275,9 @@
-
+
-
+
+ coreutils-9.7-upstream_fix-1.patch
+
+
+ perl-5.40.2-upstream_fix-1.patch
+
+
Removed:
-
-
+
+ Check-0.15.2
+
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index d58002ad2..6cdb5e224 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -110,15 +110,6 @@
-
- Check (&check-version;) - &check-size;:
-
- Home page:
- Download:
- MD5 sum: &check-md5;
-
-
-
Coreutils (&coreutils-version;) - &coreutils-size;:
@@ -597,6 +588,15 @@
+
+ Packaging (&packaging-version;) - &packaging-size;:
+
+ Home page:
+ Download:
+ MD5 sum: &packaging-md5;
+
+
+
Patch (&patch-version;) - &patch-size;:
diff --git a/chapter03/patches.xml b/chapter03/patches.xml
index dd592f663..bea48d151 100644
--- a/chapter03/patches.xml
+++ b/chapter03/patches.xml
@@ -25,13 +25,12 @@
MD5 sum: &autoconf-fixes-patch-md5;
--->
-
@@ -52,6 +51,14 @@
+
+ Coreutils Upstream Fix Patch - &coreutils-upstream-patch-size;:
+
+ Download:
+ MD5 sum: &coreutils-upstream-patch-md5;
+
+
+
Coreutils Internationalization Fixes Patch - &coreutils-i18n-patch-size;:
@@ -61,10 +68,10 @@
- Expect GCC14 Patch - &expect-gcc14-patch-size;:
+ Expect GCC15 Patch - &expect-gcc15-patch-size;:
- Download:
- MD5 sum: &expect-gcc14-patch-md5;
+ Download:
+ MD5 sum: &expect-gcc15-patch-md5;
@@ -118,24 +125,25 @@
-->
+
+
+ Perl Upstream Fix Patch - &perl-upstream-fix-patch-size;:
+
+ Download:
+ MD5 sum: &perl-upstream-fix-patch-md5;
+
+
+
-
+
SysVinit Consolidated Patch - &sysvinit-consolidated-patch-size;:
diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml
index 7111ceb90..43aa5f1c8 100644
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@ -68,10 +68,9 @@ cd build
--prefix=/usr \
--host=$LFS_TGT \
--build=$(../scripts/config.guess) \
- --enable-kernel=&min-kernel; \
- --with-headers=$LFS/usr/include \
--disable-nscd \
- libc_cv_slibdir=/usr/lib
+ libc_cv_slibdir=/usr/lib \
+ --enable-kernel=&min-kernel;
The meaning of the configure options:
@@ -94,16 +93,6 @@ cd build
-
- --with-headers=$LFS/usr/include
-
- This tells Glibc to compile itself against the headers
- recently installed to the $LFS/usr/include directory, so that
- it knows exactly what features the kernel has and can optimize
- itself accordingly.
-
-
-
libc_cv_slibdir=/usr/lib
@@ -167,7 +156,7 @@ cd build
class="directory">/) directory. Here we specify that
the package is installed in
$LFS, which will become the root directory in .
+ "ch-tools-chroot" role='.'/>
@@ -178,32 +167,101 @@ cd build
sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd
-
- At this point, it is imperative to stop and ensure that the basic
- functions (compiling and linking) of the new toolchain are working as
- expected. To perform a sanity check, run the following commands:
+ Now that our cross toolchain is in place, it is important to ensure
+ that compiling and linking will work as expected. We do this by performing
+ some sanity checks:
-echo 'int main(){}' | $LFS_TGT-gcc -xc -
-readelf -l a.out | grep ld-linux
+echo 'int main(){}' | $LFS_TGT-gcc -x c - -v -Wl,--verbose &> dummy.log
+readelf -l a.out | grep ': /lib'
- If everything is working correctly, there should be no errors,
- and the output of the last command will be of the form:
+ There should be no errors,
+ and the output of the last command will be (allowing for
+ platform-specific differences in the dynamic linker name):[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]Note that for big-endian machines, the interpreter name will be
- /lib/ld-linux-aarch64_be.so.1.
+ /lib/ld-linux-aarch64_be.so.1.
- If the output is not as shown above, or there is no output at all,
- then something is wrong. Investigate and retrace the steps to find out
- where the problem is and correct it. This issue must be resolved before
- continuing.
+ Note that this path should not contain
+ /mnt/lfs (or the value of
+ the LFS variable if you used a different one). The path is
+ resolved when the compiled program is executed, and that should only happen
+ after we enter the chroot environment where the kernel would consider
+ $LFS as the root directory
+ (/).
- Once all is well, clean up the test file:
+ Now make sure that we're set up to use the correct start files:
-rm -v a.out
+grep -E -o "$LFS/lib.*/S?crt[1in].*succeeded" dummy.log
-
+ The output of the last command should be:
+
+/mnt/lfs/lib/../lib/Scrt1.o succeeded
+/mnt/lfs/lib/../lib/crti.o succeeded
+/mnt/lfs/lib/../lib/crtn.o succeeded
+
+ Verify that the compiler is searching for the correct header
+ files:
+
+grep -B3 "^ $LFS/usr/include" dummy.log
+
+ This command should return the following output:
+
+#include <...> search starts here:
+ /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/&gcc-version;/include
+ /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/&gcc-version;/include-fixed
+ /mnt/lfs/usr/include
+
+ Again, the directory named after your target triplet may be
+ different than the above, depending on your system architecture.
+
+ Next, verify that the new linker is being used with the correct search paths:
+
+grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
+
+ References to paths that have components with '-linux-gnu' should
+ be ignored, but otherwise the output of the last command should be:
+
+SEARCH_DIR("=/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib64")
+SEARCH_DIR("=/usr/local/lib64")
+SEARCH_DIR("=/lib64")
+SEARCH_DIR("=/usr/lib64")
+SEARCH_DIR("=/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib")
+SEARCH_DIR("=/usr/local/lib")
+SEARCH_DIR("=/lib")
+SEARCH_DIR("=/usr/lib");
+
+ A 32-bit system may use a few other directories, but anyway
+ the important facet here is all the paths should begin with an equal sign
+ (=), which would be replaced with the sysroot
+ directory that we've configured for the linker.
+
+ Next make sure that we're using the correct libc:
+
+grep "/lib.*/libc.so.6 " dummy.log
+
+ The output of the last command should be:
+
+attempt to open /mnt/lfs/usr/lib/libc.so.6 succeeded
+
+ Make sure GCC is using the correct dynamic linker:
+
+grep found dummy.log
+
+ The output of the last command should be (allowing for
+ platform-specific differences in dynamic linker name):
+
+found ld-linux-x86-64.so.2 at /mnt/lfs/usr/lib/ld-linux-x86-64.so.2
+
+ 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. Any
+ issues should be resolved before continuing with the process.
+
+ Once everything is working correctly, clean up the test files:
+
+rm -v a.out dummy.logBuilding the packages in the next chapter will serve as an
additional check that the toolchain has been built properly. If some
diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml
index e16efdea9..c7020290d 100644
--- a/chapter05/libstdc++.xml
+++ b/chapter05/libstdc++.xml
@@ -60,13 +60,13 @@ cd build
Prepare Libstdc++ for compilation:
-../libstdc++-v3/configure \
- --host=$LFS_TGT \
- --build=$(../config.guess) \
- --prefix=/usr \
- --disable-multilib \
- --disable-nls \
- --disable-libstdcxx-pch \
+../libstdc++-v3/configure \
+ --host=$LFS_TGT \
+ --build=$(../config.guess) \
+ --prefix=/usr \
+ --disable-multilib \
+ --disable-nls \
+ --disable-libstdcxx-pch \
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;
diff --git a/chapter06/bash.xml b/chapter06/bash.xml
index 54fa6f444..8e6a2396e 100644
--- a/chapter06/bash.xml
+++ b/chapter06/bash.xml
@@ -42,7 +42,11 @@
Installation of Bash
+
Prepare Bash for compilation:./configure --prefix=/usr \
diff --git a/chapter06/diffutils.xml b/chapter06/diffutils.xml
index 92951604d..404fe9b66 100644
--- a/chapter06/diffutils.xml
+++ b/chapter06/diffutils.xml
@@ -47,8 +47,36 @@
./configure --prefix=/usr \
--host=$LFS_TGT \
+ gl_cv_func_strcasecmp_works=y \
--build=$(./build-aux/config.guess)
+
+ The meaning of the configure options:
+
+
+
+ gl_cv_func_strcasecmp_works=y
+
+ This option specify the result of a check for the
+ strcasecmp. The check requires running a
+ compiled C program, and this is impossible during
+ cross-compilation because in general a cross-compiled program
+ cannot run on the host distro. Normally for such a check the
+ configure script would use a fall-back value
+ for cross-compilation, but the fall-back value for this check is
+ absent and the configure script would have no
+ value to use and error out. The upstream has already fixed the
+ issue, but to apply the fix we'd need to run
+ autoconf that the host distro may lack. So
+ we just specify the check result (y as we know
+ the strcasecmp function in
+ Glibc-&glibc-version; works fine) instead, then
+ configure will just use the specified value and
+ skip the check.
+
+
+
+
Compile the package:make
diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml
index 85454221f..2965312b3 100644
--- a/chapter06/gcc-pass2.xml
+++ b/chapter06/gcc-pass2.xml
@@ -79,24 +79,24 @@ cd buildNow prepare GCC for compilation:
-../configure \
- --build=$(../config.guess) \
- --host=$LFS_TGT \
- --target=$LFS_TGT \
- LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \
- --prefix=/usr \
- --with-build-sysroot=$LFS \
- --enable-default-pie \
- --enable-default-ssp \
- --disable-nls \
- --disable-multilib \
- --disable-libatomic \
- --disable-libgomp \
- --disable-libquadmath \
- --disable-libsanitizer \
- --disable-libssp \
- --disable-libvtv \
- --enable-languages=c,c++
+../configure \
+ --build=$(../config.guess) \
+ --host=$LFS_TGT \
+ --target=$LFS_TGT \
+ --prefix=/usr \
+ --with-build-sysroot=$LFS \
+ --enable-default-pie \
+ --enable-default-ssp \
+ --disable-nls \
+ --disable-multilib \
+ --disable-libatomic \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --disable-libsanitizer \
+ --disable-libssp \
+ --disable-libvtv \
+ --enable-languages=c,c++ \
+ LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgccThe meaning of the new configure options:
diff --git a/chapter06/make.xml b/chapter06/make.xml
index eaf0db48f..3d3ca9b38 100644
--- a/chapter06/make.xml
+++ b/chapter06/make.xml
@@ -45,23 +45,9 @@
Prepare Make for compilation:./configure --prefix=/usr \
- --without-guile \
--host=$LFS_TGT \
--build=$(build-aux/config.guess)
-
- The meaning of the new configure option:
-
-
- --without-guile
-
- Although we are cross-compiling, configure tries to use
- guile from the build host if it finds it. This makes compilation
- fail, so this switch prevents using it.
-
-
-
-
Compile the package:make
diff --git a/chapter06/tar.xml b/chapter06/tar.xml
index 67bc22540..691094e12 100644
--- a/chapter06/tar.xml
+++ b/chapter06/tar.xml
@@ -45,8 +45,8 @@
Prepare Tar for compilation:
-./configure --prefix=/usr \
- --host=$LFS_TGT \
+./configure --prefix=/usr \
+ --host=$LFS_TGT \
--build=$(build-aux/config.guess)Compile the package:
diff --git a/chapter07/changingowner.xml b/chapter07/changingowner.xml
index 1e1a0ea1e..6126c74bf 100644
--- a/chapter07/changingowner.xml
+++ b/chapter07/changingowner.xml
@@ -33,6 +33,6 @@
user root by running the following
command:
-chown -R --from &lfs-username; root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
+chown -R --from &lfs-username; root:root $LFS/{usr,var,etc,tools}
diff --git a/chapter07/python.xml b/chapter07/python.xml
index 872cf4a36..a75d5ad6f 100644
--- a/chapter07/python.xml
+++ b/chapter07/python.xml
@@ -52,9 +52,10 @@
Prepare Python for compilation:
-./configure --prefix=/usr \
- --enable-shared \
- --without-ensurepip
+./configure --prefix=/usr \
+ --enable-shared \
+ --without-ensurepip \
+ --without-static-libpythonThe meaning of the configure option:
@@ -74,6 +75,13 @@
+
+ --without-static-libpython
+
+ This switch prevents building a large, but unneeded, static
+ library.
+
+ Compile the package:
diff --git a/chapter08/acl.xml b/chapter08/acl.xml
index 63892d68e..f122deda1 100644
--- a/chapter08/acl.xml
+++ b/chapter08/acl.xml
@@ -44,8 +44,8 @@
Prepare Acl for compilation:
-./configure --prefix=/usr \
- --disable-static \
+./configure --prefix=/usr \
+ --disable-static \
--docdir=/usr/share/doc/acl-&acl-version;Compile the package:
diff --git a/chapter08/bc.xml b/chapter08/bc.xml
index 3d8cd9983..7df13a963 100644
--- a/chapter08/bc.xml
+++ b/chapter08/bc.xml
@@ -43,15 +43,15 @@
Prepare Bc for compilation:
-CC=gcc ./configure --prefix=/usr -G -O3 -r
+CC='gcc -std=c99' ./configure --prefix=/usr -G -O3 -rThe meaning of the configure options:
- CC=gcc
+ CC=gcc -std=c99
- This parameter specifies the compiler to use.
+ This parameter specifies the compiler and C standard to use.
diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml
index 85589c3be..bd8571903 100644
--- a/chapter08/chapter08.xml
+++ b/chapter08/chapter08.xml
@@ -64,13 +64,13 @@
+
-
diff --git a/chapter08/check.xml b/chapter08/check.xml
deleted file mode 100644
index 1000aaa68..000000000
--- a/chapter08/check.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
- %general-entities;
-]>
-
-
-
-
-
- check
- &check-version;
- &check-url;
-
-
- Check-&check-version;
-
-
- Check
-
-
-
-
-
- Check is a unit testing framework for C.
-
-
- &buildtime;
- &diskspace;
-
-
- &check-fin-sbu;
- &check-fin-du;
-
-
-
-
-
-
- Installation of Check
-
- Prepare Check for compilation:
-
-./configure --prefix=/usr --disable-static
-
- Build the package:
-
-make
-
- Compilation is now complete. To run the Check test suite, issue the
- following command:
-
-make check
-
-
- Install the package:
-
- make docdir=/usr/share/doc/check-&check-version; install
-
-
-
-
- Contents of Check
-
-
- Installed program
- Installed library
-
-
- checkmk
- libcheck.so
-
-
-
-
- Short Descriptions
-
-
-
-
- checkmk
-
- Awk script for generating C unit tests for use with the Check
- unit testing framework
-
- checkmk
-
-
-
-
-
- libcheck.so
-
- Contains functions that allow Check to be called from a test
- program
-
- libcheck
-
-
-
-
-
-
-
-
-
diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml
index 36d428981..1f6f14ecd 100644
--- a/chapter08/coreutils.xml
+++ b/chapter08/coreutils.xml
@@ -41,6 +41,10 @@
Installation of Coreutils
+ First, apply a patch for a security problem identified upstream:
+
+patch -Np1 -i ../&coreutils-upstream-patch;
+
POSIX requires that programs from Coreutils recognize character
boundaries correctly even in multibyte locales. The following patch fixes
this non-compliance and other internationalization-related bugs.
diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml
index 6f93dc99e..89f1fadb3 100644
--- a/chapter08/e2fsprogs.xml
+++ b/chapter08/e2fsprogs.xml
@@ -52,12 +52,12 @@ cd buildPrepare E2fsprogs for compilation:
-../configure --prefix=/usr \
- --sysconfdir=/etc \
- --enable-elf-shlibs \
- --disable-libblkid \
- --disable-libuuid \
- --disable-uuidd \
+../configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-elf-shlibs \
+ --disable-libblkid \
+ --disable-libuuid \
+ --disable-uuidd \
--disable-fsck
diff --git a/chapter08/expect.xml b/chapter08/expect.xml
index 51fd20460..2be9f65c7 100644
--- a/chapter08/expect.xml
+++ b/chapter08/expect.xml
@@ -73,9 +73,9 @@
tar -C tclconfig -xf ../autoconf-&autoconf-version;.tar.xz --strip-components=2 \
autoconf-&autoconf-version;/build-aux/config.{guess,sub}
- Now, make some changes to allow the package with gcc-14.1 or later:
+ Now, make some changes to allow the package with gcc-15.1 or later:
-patch -Np1 -i ../expect-&expect-version;-gcc14-1.patch
+patch -Np1 -i ../&expect-gcc15-patch;Prepare Expect for compilation:
diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml
index 5f7e9636b..79f318e31 100644
--- a/chapter08/gcc.xml
+++ b/chapter08/gcc.xml
@@ -231,8 +231,7 @@ su tester -c "PATH=$PATH make -k check"
that compiling and linking will work as expected. We do this by performing
some sanity checks:
-echo 'int main(){}' > dummy.c
-cc dummy.c -v -Wl,--verbose &> dummy.log
+echo 'int main(){}' | cc -x c - -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'There should be no errors,
@@ -327,7 +326,7 @@ SEARCH_DIR("/usr/lib");Once everything is working correctly, clean up the test files:
-rm -v dummy.c a.out dummy.log
+rm -v a.out dummy.logFinally, move a misplaced file:
diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml
index be1f99d0d..4e4d226a5 100644
--- a/chapter08/glibc.xml
+++ b/chapter08/glibc.xml
@@ -68,12 +68,12 @@ cd build
Prepare Glibc for compilation:
-../configure --prefix=/usr \
- --disable-werror \
- --enable-kernel=&min-kernel; \
- --enable-stack-protector=strong \
- --disable-nscd \
- libc_cv_slibdir=/usr/lib
+../configure --prefix=/usr \
+ --disable-werror \
+ --disable-nscd \
+ libc_cv_slibdir=/usr/lib \
+ --enable-stack-protector=strong \
+ --enable-kernel=&min-kernel;The meaning of the configure options:
@@ -327,9 +327,10 @@ install -vm755 dest/usr/lib/*.so.* /usr/lib
DIR=$(dirname $(gcc -print-libgcc-file-name))
-[ -e $DIR/include/limits.h ] || mv $DIR/include{-fixed,}/limits.h
+[ -e $DIR/include/limits.h ] || mv $DIR/include{-fixed,}/limits.h
[ -e $DIR/include/syslimits.h ] || mv $DIR/include{-fixed,}/syslimits.h
-rm -rfv $(dirname $(gcc -print-libgcc-file-name))/include-fixed/*
+rm -rfv $DIR/include-fixed/*
+unset DIR
Install the package:
@@ -393,7 +394,6 @@ localedef -i it_IT -f ISO-8859-1 it_IT
localedef -i it_IT -f ISO-8859-15 it_IT@euro
localedef -i it_IT -f UTF-8 it_IT.UTF-8
localedef -i ja_JP -f EUC-JP ja_JP
-localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro
localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
@@ -415,15 +415,6 @@ localedef -i zh_TW -f UTF-8 zh_TW.UTF-8
make localedata/install-locales
- Then use the localedef command to create and
- install locales not listed in the
- glibc-&glibc-version;/localedata/SUPPORTED file
- when you need them. For instance, the following two locales are
- needed for some tests later in this chapter:
-
-localedef -i C -f UTF-8 C.UTF-8
-localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
-
Glibc now uses libidn2 when resolving internationalized
domain names. This is a run time dependency. If this capability
is needed, the instructions for installing libidn2 are in the
diff --git a/chapter08/gmp.xml b/chapter08/gmp.xml
index 7157f2d13..374b9b37b 100644
--- a/chapter08/gmp.xml
+++ b/chapter08/gmp.xml
@@ -53,6 +53,10 @@
CFLAGS is still automatically set to -march=something. -->
+ First, make an adjustment for compatibilty with gcc-15 and later:
+
+sed -i '/long long t1;/,+1s/()/(...)/' configure
+
Prepare GMP for compilation:./configure --prefix=/usr \
diff --git a/chapter08/gperf.xml b/chapter08/gperf.xml
index bbfbbe735..25939135a 100644
--- a/chapter08/gperf.xml
+++ b/chapter08/gperf.xml
@@ -48,11 +48,9 @@
make
- The tests are known to fail if running multiple
- simultaneous tests (-j option greater than 1). To test
- the results, issue:
+ To test the results, issue:
-make -j1 check
+make checkInstall the package:
diff --git a/chapter08/grub.xml b/chapter08/grub.xml
index 11daec924..c8e192962 100644
--- a/chapter08/grub.xml
+++ b/chapter08/grub.xml
@@ -81,9 +81,9 @@
Prepare GRUB for compilation:
-./configure --prefix=/usr \
- --sysconfdir=/etc \
- --disable-efiemu \
+./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-efiemu \
--disable-werror
diff --git a/chapter08/kbd.xml b/chapter08/kbd.xml
index 54a55684f..7dc735fe3 100644
--- a/chapter08/kbd.xml
+++ b/chapter08/kbd.xml
@@ -88,9 +88,14 @@ sed -i 's/resizecons.8 //' docs/man/man8/Makefile.inmake
- To test the results, issue:
-
+ The tests for this package will all fail in the chroot environment
+ because they require valgrind. In addition
+ on a full system with valgrind, several
+ tests still fail in a graphical environment. The tests pass in
+ a non-graphical environment.
+
Install the package:
diff --git a/chapter08/kmod.xml b/chapter08/kmod.xml
index 2c1174d7f..0041199f5 100644
--- a/chapter08/kmod.xml
+++ b/chapter08/kmod.xml
@@ -47,7 +47,6 @@
cd build
meson setup --prefix=/usr .. \
- --sbindir=/usr/sbin \
--buildtype=release \
-D manpages=false
diff --git a/chapter08/libelf.xml b/chapter08/libelf.xml
index 68ccf2b42..c2d44c837 100644
--- a/chapter08/libelf.xml
+++ b/chapter08/libelf.xml
@@ -46,8 +46,8 @@
Prepare Libelf for compilation:
- ./configure --prefix=/usr \
- --disable-debuginfod \
+ ./configure --prefix=/usr \
+ --disable-debuginfod \
--enable-libdebuginfod=dummyCompile the package:
@@ -58,6 +58,9 @@
make check
+ Two tests are known to fail, dwarf_srclang_check and
+ run-backtrace-native-core.sh.
+
Install only Libelf:make -C libelf install
diff --git a/chapter08/libffi.xml b/chapter08/libffi.xml
index a06881f59..de2d8e804 100644
--- a/chapter08/libffi.xml
+++ b/chapter08/libffi.xml
@@ -51,17 +51,20 @@
Like GMP, Libffi builds with optimizations specific
to the processor in use. If building for another system, change the
value of the --with-gcc-arch= parameter in the
- following command to an architecture name fully implemented by the
+ following command to an architecture name fully implemented by
+ both the host CPU and the
CPU on that system.
If this is not done, all applications that link to
libffi will trigger
- Illegal Operation Errors.
+ Illegal Operation Errors. If you cannot figure out a value
+ safe for both the CPUs, replace the parameter with
+ to produce a generic library.
Prepare Libffi for compilation:
- ./configure --prefix=/usr \
- --disable-static \
+./configure --prefix=/usr \
+ --disable-static \
--with-gcc-arch=native
diff --git a/chapter08/libpipeline.xml b/chapter08/libpipeline.xml
index a1be58923..2968714c7 100644
--- a/chapter08/libpipeline.xml
+++ b/chapter08/libpipeline.xml
@@ -49,9 +49,8 @@
make
- To test the results, issue:
-
-make check
+ The tests require the Check library
+ that we've removed from LFS.Install the package:
diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml
index a825f63c9..e2f7415eb 100644
--- a/chapter08/ncurses.xml
+++ b/chapter08/ncurses.xml
@@ -127,7 +127,7 @@
make will spawn new shell processes during "make install". -->
The installation of this package will overwrite
- libncursesw.so.&ncurses-version;
+ libncursesw.so.&ncurses-base-version;
in-place. It may crash the shell process which is using code and data
from the library file. Install the package with
DESTDIR, and replace the library file correctly using
@@ -137,8 +137,8 @@
):make DESTDIR=$PWD/dest install
-install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
-rm -v dest/usr/lib/libncursesw.so.&ncurses-version;
+install -vm755 dest/usr/lib/libncursesw.so.&ncurses-base-version; /usr/lib
+rm -v dest/usr/lib/libncursesw.so.&ncurses-base-version;
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
-i dest/usr/include/curses.h
cp -av dest/* /
diff --git a/chapter08/packaging.xml b/chapter08/packaging.xml
new file mode 100644
index 000000000..17891d65b
--- /dev/null
+++ b/chapter08/packaging.xml
@@ -0,0 +1,75 @@
+
+
+ %general-entities;
+]>
+
+
+
+
+
+ packaging
+ &packaging-version;
+ &packaging-url;
+
+
+ Packaging-&packaging-version;
+
+
+ packaging
+
+
+
+
+
+
+ The packaging module is a Python library that provides utilities that
+ implement the interoperability specifications which have clearly one
+ correct behaviour (PEP440) or benefit greatly from having a single shared
+ implementation (PEP425). This includes utilities for version handling,
+ specifiers, markers, tags, and requirements.
+
+
+
+ &buildtime;
+ &diskspace;
+
+ &packaging-fin-sbu;
+ &packaging-fin-du;
+
+
+
+
+
+
+ Installation of Packaging
+
+ Compile packaging with the following command:
+
+pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
+
+ Install packaging with the following command:
+
+pip3 install --no-index --find-links dist packaging
+
+
+
+
+ Contents of Packaging
+
+
+ Installed directories
+
+
+
+ /usr/lib/python&python-minor;/site-packages/packaging and
+ /usr/lib/python&python-minor;/site-packages/packaging-&packaging-version;.dist-info
+
+
+
+
+
+
+
+
diff --git a/chapter08/perl.xml b/chapter08/perl.xml
index b678f7f9d..0416aa85e 100644
--- a/chapter08/perl.xml
+++ b/chapter08/perl.xml
@@ -41,6 +41,10 @@
Installation of Perl
+ First, apply a security patch identified upstream:
+
+patch -Np1 -i ../&perl-upstream-fix-patch;
+
This version of Perl builds the Compress::Raw::Zlib and
Compress::Raw::BZip2 modules. By
default Perl will use an internal copy of the sources for the build.
diff --git a/chapter08/pkgconf.xml b/chapter08/pkgconf.xml
index 3e7e737fa..d9f9c4da3 100644
--- a/chapter08/pkgconf.xml
+++ b/chapter08/pkgconf.xml
@@ -46,8 +46,8 @@
Prepare Pkgconf for compilation:
-./configure --prefix=/usr \
- --disable-static \
+./configure --prefix=/usr \
+ --disable-static \
--docdir=/usr/share/doc/pkgconf-&pkgconf-version;Compile the package:
diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml
index 10ec5d199..3640b519d 100644
--- a/chapter08/pkgmgt.xml
+++ b/chapter08/pkgmgt.xml
@@ -69,10 +69,25 @@
If a package containing a shared library is updated, and
- if the name of the library changes, then any packages dynamically
+ if the name of the libraryThe name of a shared library is
+ the string coded in the DT_SONAME entry of its
+ ELF dynamic section. You can get it with the
+ readelf -d <library file>
+ | grep SONAME command. In most cases it's suffixed with
+ .so.<a version
+ number>, but there are some cases where
+ it contains multiple numbers for versioning (like
+ libbz2.so.1.0), contains the version number
+ before the .so suffix (like
+ libbfd-&binutils-version;), or does not contain
+ any version number at all (for example
+ libmemusage.so).
+ Generally there is no correlation between the package version and the
+ version number(s) in the library name.
+ changes, then any packages dynamically
linked to the library must 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
+ newer library.
+ For example, consider a package
foo-1.2.3 that installs a shared library with the name libfoo.so.1. Suppose you upgrade the package to
a newer version foo-1.2.4 that installs a shared library with the name
@@ -370,11 +385,13 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install
differences in system hardware and the original kernel
configuration.
- There have been some reports of issues when copying between
- similar but not identical architectures. For instance, the instruction set
- for an Intel system is not identical with the AMD processor's instructions, and later
- versions of some processors may provide instructions that are unavailable with
- earlier versions.
+ If you want to deploy the LFS system onto a system
+ with a different CPU, when you build and
+ you must follow the notes about
+ overriding the architecture-specific optimization to produce libraries
+ suitable for both the host system and the system(s) where you'll deploy
+ the LFS system. Otherwise you'll get Illegal
+ Instruction errors running LFS.Finally, the new system has to be made bootable via .
diff --git a/chapter08/python.xml b/chapter08/python.xml
index ebda61181..534b81acd 100644
--- a/chapter08/python.xml
+++ b/chapter08/python.xml
@@ -42,13 +42,18 @@
Installation of Python 3
+
Prepare Python for compilation:
-./configure --prefix=/usr \
- --enable-shared \
- --with-system-expat \
- --enable-optimizations
+./configure --prefix=/usr \
+ --enable-shared \
+ --with-system-expat \
+ --enable-optimizations \
+ --without-static-libpythonThe meaning of the configure options:
diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml
index 6193fd9b4..3a9596395 100644
--- a/chapter08/stripping.xml
+++ b/chapter08/stripping.xml
@@ -24,16 +24,20 @@
backup of the LFS system in its current state.
A strip command with the
- --strip-unneeded option removes all debug symbols
- from a binary or library. It also removes all symbol table entries not
+ --strip-unneeded option removes all debug symbols from
+ a binary or library. It also removes all symbol table entries not normally
needed by the linker (for static libraries) or dynamic linker (for
- dynamically linked binaries and shared libraries).
+ dynamically linked binaries and shared libraries). Using
+ --strip-debug does not remove symbol table entries
+ that may be needed by some applications. The difference between
+ unneeded and debug is very small.
+ For example, an unstripped libc.a
+ is 22.4 MB. After stripping with --strip-debug it
+ is 5.9 MB. Using --strip-unneeded only reduces the
+ size further to 5.8 MB.
-
The debugging symbols from selected libraries are compressed with
- Zlib and preserved in separate files. That
+ Zstd and preserved in separate files. That
debugging information is needed to run regression tests with valgrind or gdb later, in BLFS.
@@ -82,9 +86,9 @@
cd /usr/lib
for LIB in $save_usrlib; do
- objcopy --only-keep-debug --compress-debug-sections=zlib $LIB $LIB.dbg
+ objcopy --only-keep-debug --compress-debug-sections=zstd $LIB $LIB.dbg
cp $LIB /tmp/$LIB
- strip --strip-unneeded /tmp/$LIB
+ strip --strip-debug /tmp/$LIB
objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB
install -vm755 /tmp/$LIB /usr/lib
rm /tmp/$LIB
@@ -103,14 +107,14 @@ online_usrlib="libbfd-&binutils-version;.so
for BIN in $online_usrbin; do
cp /usr/bin/$BIN /tmp/$BIN
- strip --strip-unneeded /tmp/$BIN
+ strip --strip-debug /tmp/$BIN
install -vm755 /tmp/$BIN /usr/bin
rm /tmp/$BIN
done
for LIB in $online_usrlib; do
cp /usr/lib/$LIB /tmp/$LIB
- strip --strip-unneeded /tmp/$LIB
+ strip --strip-debug /tmp/$LIB
install -vm755 /tmp/$LIB /usr/lib
rm /tmp/$LIB
done
@@ -121,7 +125,7 @@ for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg) \
case "$online_usrbin $online_usrlib $save_usrlib" in
*$(basename $i)* )
;;
- * ) strip --strip-unneeded $i
+ * ) strip --strip-debug $i
;;
esac
done
diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml
index 989082419..01730e235 100644
--- a/chapter08/systemd.xml
+++ b/chapter08/systemd.xml
@@ -243,7 +243,7 @@ ninja testtar -xf ../../systemd-man-pages-&systemd-man-version;.tar.xz \
- --no-same-owner --strip-components=1 \
+ --no-same-owner --strip-components=1 \
-C /usr/share/manCreate the /etc/machine-id file needed by
diff --git a/chapter08/tcl.xml b/chapter08/tcl.xml
index 0905af0d4..2cb10d72c 100644
--- a/chapter08/tcl.xml
+++ b/chapter08/tcl.xml
@@ -82,9 +82,9 @@ sed -e "s|$SRCDIR/unix|/usr/lib|" \
-i tclConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
- -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
- -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
- -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
+ -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
+ -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
+ -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
-i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
diff --git a/chapter10/fstab.xml b/chapter10/fstab.xml
index ad835be30..8eb314b87 100644
--- a/chapter10/fstab.xml
+++ b/chapter10/fstab.xml
@@ -108,6 +108,8 @@ EOFDefault iocharset for FAT ().
There is no way to specify these settings for the
ntfs filesystem at kernel compilation time.
+
diff --git a/chapter11/reboot.xml b/chapter11/reboot.xml
index 5a8cfd51e..497445346 100644
--- a/chapter11/reboot.xml
+++ b/chapter11/reboot.xml
@@ -88,17 +88,14 @@
- /etc/bashrc
- /etc/dircolors /etc/fstab /etc/hosts /etc/inputrc /etc/profile
- /etc/resolv.conf
+ /etc/resolv.conf
+ (optional)/etc/vimrc
- /root/.bash_profile
- /root/.bashrc
- /etc/sysconfig/ifconfig.eth0
+ /etc/sysconfig/ifconfig.eth0
diff --git a/general.ent b/general.ent
index eca7a2ad5..25f243173 100644
--- a/general.ent
+++ b/general.ent
@@ -7,9 +7,9 @@
-
-
-
+
+
+
@@ -98,10 +98,8 @@
-
+ so for LFS 12.5 we may consider moving to 5.10. -->
+
-
+
+
-
+
-
-
-
-
+
+
+
+
@@ -200,28 +192,28 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
@@ -237,18 +229,18 @@
-
-
+
+
-
+
-
-
+
+
-
+
@@ -273,18 +265,18 @@
-
-
+
+
-
+
-
-
+
+
-
+
@@ -307,20 +299,20 @@
-
-
+
+
-
+
-
-
+
+
-
+
@@ -341,42 +333,42 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
@@ -389,18 +381,18 @@
-
-
+
+
-
+
-
-
+
+
-
+
@@ -430,13 +422,13 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
-
+
+
+
-
+
@@ -637,45 +638,45 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
@@ -719,10 +720,10 @@
-
-
+
+
-
+
@@ -733,21 +734,21 @@
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
@@ -782,10 +783,10 @@
-
-
+
+
-
+
diff --git a/part3intro/toolchaintechnotes.xml b/part3intro/toolchaintechnotes.xml
index 1dad94103..2239b2c7a 100644
--- a/part3intro/toolchaintechnotes.xml
+++ b/part3intro/toolchaintechnotes.xml
@@ -3,6 +3,9 @@
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
%general-entities;
+
+ <the host triplet>">
]>
@@ -44,6 +47,14 @@
book for a cross-toolchain for some purpose other
than building LFS, unless you really understand what you are doing.
+
+
+ It's known installing GCC pass 2 will break the cross-toolchain.
+ We don't consider it a bug because GCC pass 2 is the last package
+ to be cross-compiled in the book, and we won't fix
+ it until we really need to cross-compile some package after GCC
+ pass 2 in the future.
+ Cross-compilation involves some concepts that deserve a section of
@@ -197,14 +208,105 @@
page.
- In order to fake a cross-compilation in LFS, the name of the host triplet
- is slightly adjusted by changing the "vendor" field in the
- LFS_TGT variable so it says "lfs". We also use the
- --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, plus one more for tests.
+
+ There are two key points for a cross-compilation:
+
+
+
+
+
+ When producing and processing the machine code supposed to be
+ executed on the host, the cross-toolchain must be
+ used. Note that the native toolchain from the build
+ may be still invoked to generate machine code supposed to be
+ executed on the build. For example, the build system
+ may compile a generator with the native toolchain, then generate
+ a C source file with the generator, and finally compile the C
+ source file with the cross-toolchain so the generated code will
+ be able to run on the host.
+
+
+ With an autoconf-based build system, this requirement is ensured
+ by using the --host switch to specify
+ the host triplet. With this switch the build
+ system will use the toolchain components prefixed
+ with &host-triplet;
+ for generating and processing the machine code for
+ the host; e.g. the compiler will be
+ &host-triplet;-gcc and the
+ readelf tool will be
+ &host-triplet;-readelf.
+
+
+
+
+ The build system should not attempt to run any generated machine
+ code supposed to be executed on the host. For
+ example, when building a utility natively, its man page can be
+ generated by running the utility with the
+ --help switch and processing the output,
+ but generally it's not possible to do so for a cross-compilation
+ as the utility may fail
+ to run on the build: it's obviously impossible to
+ run ARM64 machine code on a x86 CPU (without an emulator).
+
+
+ With an autoconf-based build system, this requirement is
+ satisfied in the cross-compilation mode where
+ the optional features requiring to run machine code for
+ the host during the build time are disabled. When the
+ host triplet is explicitly specified, the
+ cross-compilation mode is enabled if and only if either
+ the configure script fails to run a dummy
+ program compiled into the host machine code, or
+ the build triplet is explicitly specified via the
+ --build switch and it's different from
+ the host triplet.
+
+
+
+
+ In order to cross-compile a package for the LFS temporary system,
+ the name of the system triplet is slightly adjusted by changing the
+ "vendor" field in the LFS_TGT variable so it
+ says "lfs" and LFS_TGT is then specified as
+ the host triplet via --host, so
+ the cross-toolchain will be used for generating and processing the
+ machine code running as a part of the LFS temporary system. And, we
+ also need to enable the cross-compilation mode: despite
+ the host machine code, i.e. the machine code for the LFS
+ temporary system, is able to execute on the current CPU, it may refer
+ to a library not available on the the build (the host
+ distro), or some code or data non-exist or defined differently in the
+ library even if it happens to be available. When cross-compiling a
+ package for the LFS temporary system, we cannot rely on the
+ configure script to detect this issue with the
+ dummy program: the dummy only uses a few components in
+ libc that the host distro
+ libc likely provides (unless,
+ maybe the host distro uses a different
+ libc implementation like Musl),
+ so it won't fail like how the really useful programs would likely.
+ Thus we must explicitly specify the build triplet to
+ enable the cross-compilation mode. The value we use is
+ just the default, i.e. the original system triplet from
+ config.guess output, but the cross-compilation
+ mode depends on an explicit specification as we've
+ discussed.
+
+ We use the --with-sysroot option when
+ building the cross-linker and cross-compiler, to tell them where to find
+ the needed files for the host. This nearly ensures that
+ none of the other programs built in
+ can link to libraries on
+ the build. The word nearly is used because
+ libtool, a compatibility wrapper of
+ the compiler and the linker for autoconf-based build systems,
+ can try to be too clever and mistakenly pass options allowing the linker
+ to find libraries of the build.
+ To prevent this fallout, we need to delete the libtool archive
+ (.la) files and fix up an
+ outdated libtool copy shipped with the Binutils code.
@@ -228,7 +330,7 @@
3lfslfslfs
- Rebuild and test cc-lfs using cc-lfs on lfs.
+ Rebuild (and maybe test) cc-lfs using cc-lfs on lfs.
@@ -256,30 +358,11 @@
The upshot of the preceding paragraph is that cc1 is unable to
build a fully functional libstdc++ with the degraded libgcc, but cc1
is the only compiler available for building the C/C++ libraries
- during stage 2. There are two reasons we don't immediately use the
- compiler built in stage 2, cc-lfs, to build those libraries.
-
-
-
-
- Generally speaking, cc-lfs cannot run on pc (the host system). Even though the
- triplets for pc and lfs are compatible with each other, an executable
- for lfs must depend on glibc-&glibc-version;; the host distro
- may utilize either a different implementation of libc (for example, musl), or
- a previous release of glibc (for example, glibc-2.13).
-
-
-
-
- Even if cc-lfs can run on pc, using it on pc would create
- a risk of linking to the pc libraries, since cc-lfs is a native
- compiler.
-
-
-
-
- So when we build gcc stage 2, we instruct the building system to
- rebuild libgcc and libstdc++ with cc1, but we link libstdc++ to the newly
+ during stage 2. As we've discussed, we cannot run cc-lfs on pc (the
+ host distro) because it may require some library, code, or data not
+ available on the build (the host distro).
+ So when we build gcc stage 2, we override the library
+ search path to link libstdc++ against the newly
rebuilt libgcc instead of the old, degraded build. This makes the rebuilt
libstdc++ fully functional.
@@ -290,12 +373,11 @@
package on a completed LFS system, the reinstalled content of the package
should be the same as the content of the same package when first installed in
&ch-final;. The temporary packages installed in &ch-tmp-cross; or
- &ch-tmp-chroot; cannot satisfy this requirement, because some of them
- are built without optional dependencies, and autoconf cannot
- perform some feature checks in &ch-tmp-cross; because of cross-compilation,
- causing the temporary packages to lack optional features,
- or use suboptimal code routines. Additionally, a minor reason for
- rebuilding the packages is to run the test suites.
+ &ch-tmp-chroot; cannot satisfy this requirement, because some optional
+ features of them are disabled because of either the missing
+ dependencies or the cross-compilation mode.
+ Additionally, a minor reason for rebuilding the packages is to run the
+ test suites.
@@ -357,39 +439,25 @@ checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld
- Next comes glibc. The most important
- considerations for building glibc are the compiler, binary tools, and
- kernel headers. The compiler and binary tools are generally not an issue
- since glibc will always use those relating to the --host
- parameter passed to its configure script; e.g., in our case, the compiler
- will be $LFS_TGT-gcc and the readelf
- tool will be $LFS_TGT-readelf. The kernel headers can
- be a bit more complicated. Therefore, we take no risks and use
- the available configure switch to enforce the correct selection. After
- the run of configure, check the contents of the
- config.make file in the build directory for all important details.
- These items highlight an important aspect of the glibc
- package—it is very self-sufficient in terms of its build machinery,
- and generally does not rely on toolchain defaults.
+ Next comes glibc. This is the first package that we cross-compile.
+ We use the --host=$LFS_TGT option to make
+ the build system to use those tools prefixed with
+ $LFS_TGT-, and the
+ --build=$(../scripts/config.guess) option to
+ enable the cross-compilation mode as we've discussed.
+ The DESTDIR variable is used to force installation into
+ the LFS file system.As mentioned above, the standard C++ library is compiled next, followed in
by other programs that must
be cross-compiled to break circular dependencies at build time.
- The install step of all those packages uses the
- DESTDIR variable to force installation
- in the LFS filesystem.
+ The steps for those packages are similar to the steps for glibc.
At the end of the native
LFS compiler is installed. First binutils-pass2 is built,
in the same DESTDIR directory as the other programs,
then the second pass of gcc is constructed, omitting some
- non-critical 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
- different from the build system. This is why
- CC_FOR_TARGET=$LFS_TGT-gcc is declared explicitly
- as one of the configuration options.
+ non-critical libraries.
Upon entering the chroot environment in ,
diff --git a/patches.ent b/patches.ent
index c90d38120..7c0a42133 100644
--- a/patches.ent
+++ b/patches.ent
@@ -1,48 +1,60 @@
+
-
+
-
-
+
+
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
+ unchanged. Note that the priority attribute is not strictly
+ required, because the original template is less restrictive in
+ matching, so has less precedence. But in case the docbook dev
+ add a match="sect1" template in their chunk-code.xsl, then it will
+ be necessary!-->
+
diff --git a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl
index 834b7057c..8f5576d9f 100644
--- a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl
+++ b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl
@@ -80,6 +80,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl b/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl
index b13e5e11b..0ecfaa4f6 100644
--- a/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl
+++ b/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl
@@ -166,7 +166,7 @@
-
+