From 5ab114b712633b01656148638cba50bca9429b1d Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 28 Jul 2021 12:08:52 +0800 Subject: [PATCH 1/7] temp python: add a note about (not so) "fatal" errors --- chapter07/python.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chapter07/python.xml b/chapter07/python.xml index 68a02dd8c..d25432d1f 100644 --- a/chapter07/python.xml +++ b/chapter07/python.xml @@ -80,6 +80,19 @@ make + + + Some Python 3 modules can't be built now because the dependencies + are not installed yet. The building system still attempts to build + them however, so the compilation of some files will fail and the + compiler message may seem to indicate fatal error. + The message should be ignored. Just make sure the toplevel + make command has not failed. The optional + modules are not needed now and they will be built in + . + + + Install the package: make install From cefb4c9641d500161118a34b5f5516efb1597dfd Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 28 Jul 2021 12:09:14 +0800 Subject: [PATCH 2/7] grub cfg: replace hardcoded (and outdated) chapter number --- chapter10/grub.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chapter10/grub.xml b/chapter10/grub.xml index f54dbd2f9..f76605f49 100644 --- a/chapter10/grub.xml +++ b/chapter10/grub.xml @@ -112,8 +112,9 @@ xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.isoIf the system has been booted using UEFI, grub-install will try to install files for the x86_64-efi target, but those files - have not been installed in chapter 6. If this is the case, add - to the command above. + have not been installed in . + If this is the case, add to the + command above. + + 2021-07-27 + + + [xry111] - Always use --strip-unneeded for stripping. + + + + + 2021-07-27 diff --git a/chapter07/stripping.xml b/chapter07/stripping.xml index 99caf7e3c..22a5a0804 100644 --- a/chapter07/stripping.xml +++ b/chapter07/stripping.xml @@ -87,7 +87,7 @@ umount $LFS/{sys,proc,run} symbols. Strip off debugging symbols from binaries: -strip --strip-debug $LFS/usr/lib/* +strip --strip-unneeded $LFS/usr/lib/* strip --strip-unneeded $LFS/usr/{,s}bin/* strip --strip-unneeded $LFS/tools/bin/* @@ -97,11 +97,6 @@ strip --strip-unneeded $LFS/tools/bin/* Binutils pass 2, since it is the one that knows how to strip our cross-compiled programs.--> - Take care NOT to use - --strip-unneeded on the libraries. The static - ones would be destroyed and the toolchain packages would need to be - built all over again. - At this point, you should have at least 5 GB of free space on the chroot partition that can be used to build and install Glibc and GCC in the next phase. If you can build and install Glibc, you can build and install diff --git a/chapter08/strippingagain.xml b/chapter08/strippingagain.xml index ed690eb1a..f1eaa060d 100644 --- a/chapter08/strippingagain.xml +++ b/chapter08/strippingagain.xml @@ -67,7 +67,7 @@ online_usrlib="libbfd-&binutils-version;.so libdl-&glibc-version;.so for BIN in $online_usrbin; do cp /usr/bin/$BIN /tmp/$BIN - strip --strip-all /tmp/$BIN + strip --strip-unneeded /tmp/$BIN install -vm755 /tmp/$BIN /usr/bin rm /tmp/$BIN done @@ -79,11 +79,10 @@ for LIB in $online_usrlib; do rm /tmp/$LIB done -find /usr/lib -type f -name \*.a \ - -exec strip --strip-debug {} ';' - -for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg); do - case "$online_usrlib $save_usrlib" in +for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg) \ + $(find /usr/lib -type f -name \*.a) \ + $(find /usr/{bin,sbin,libexec} -type f); do + case "$online_usrbin $online_usrlib $save_usrlib" in *$(basename $i)* ) ;; * ) strip --strip-unneeded $i @@ -91,18 +90,6 @@ for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg); do esac done -for i in $(find /usr/bin -type f); do - case "$online_usrbin" in - *$(basename $i)* ) - ;; - * ) strip --strip-all $i - ;; - esac -done - -find /usr/{sbin,libexec} -type f \ - -exec strip --strip-all {} ';' - unset BIN LIB save_usrlib online_usrbin online_usrlib From 46e44863c1b86f7520e08c565a36c9b8255cc200 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 28 Jul 2021 17:04:08 +0800 Subject: [PATCH 5/7] don't use host tool for stripping --- chapter07/stripping.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chapter07/stripping.xml b/chapter07/stripping.xml index 22a5a0804..24ac67e4b 100644 --- a/chapter07/stripping.xml +++ b/chapter07/stripping.xml @@ -87,9 +87,9 @@ umount $LFS/{sys,proc,run} symbols. Strip off debugging symbols from binaries: -strip --strip-unneeded $LFS/usr/lib/* -strip --strip-unneeded $LFS/usr/{,s}bin/* -strip --strip-unneeded $LFS/tools/bin/* +$LFS_TGT-strip --strip-unneeded $LFS/usr/lib/* +$LFS_TGT-strip --strip-unneeded $LFS/usr/{,s}bin/* +$LFS_TGT-strip --strip-unneeded $LFS/tools/bin/* These commands will skip a number of files reporting that it does not recognize their file format. Most of these are scripts instead of binaries. From 8416b1f926c9ec17bd41c4ce79d600433661ef12 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 28 Jul 2021 17:05:31 +0800 Subject: [PATCH 6/7] Revert coreutils library location change libstdbuf.so is a LD_PRELOAD hook, instead of a library which would be used at link time. So let's keep the upstream default. --- chapter06/coreutils.xml | 1 - chapter08/coreutils.xml | 1 - 2 files changed, 2 deletions(-) diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index e98645d82..af75e60cf 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -46,7 +46,6 @@ Prepare Coreutils for compilation: ./configure --prefix=/usr \ - --libexecdir=/usr/lib \ --host=$LFS_TGT \ --build=$(build-aux/config.guess) \ --enable-install-program=hostname \ diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index c3c62bf89..c5d2a5032 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -69,7 +69,6 @@ autoreconf -fiv FORCE_UNSAFE_CONFIGURE=1 ./configure \ --prefix=/usr \ - --libexecdir=/usr/lib \ --enable-no-install-program=kill,uptime From 7f9a48070ec6c9c4246f6afdd8a65b6836134288 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 28 Jul 2021 17:16:37 +0800 Subject: [PATCH 7/7] package update Update to GCC-11.2.0 (#4883) Update to inetutils-2.1 (#4892) Update to automake-1.16.4 (#4894) SHA256 checksum entities for the three packages are added. I think we can start a transition to SHA256 now. --- chapter01/changelog.xml | 13 ++++++++++++- chapter03/packages.xml | 3 +++ chapter03/patches.xml | 8 -------- chapter08/gcc.xml | 5 ----- packages.ent | 21 ++++++++++++--------- 5 files changed, 27 insertions(+), 23 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index c84ee042a..ab574e5a5 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -46,13 +46,24 @@ 2021-07-27 + + [xry111] - Update to GCC-11.2.0. Fixes + #4883. + + + [xry111] - Update to inetutils-2.1. Fixes + #4892. + + + [xry111] - Update to automake-1.16.4. Fixes + #4894. + [xry111] - Always use --strip-unneeded for stripping. - 2021-07-27 diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 8cfba4ba8..191f7f921 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -47,6 +47,7 @@ Home page: Download: MD5 sum: &automake-md5; + SHA256 sum: &automake-sha256; @@ -226,6 +227,7 @@ Home page: Download: MD5 sum: &gcc-md5; + SHA256 sum: &gcc-sha256; @@ -325,6 +327,7 @@ Home page: Download: MD5 sum: &inetutils-md5; + SHA256 sum: &inetutils-sha256; diff --git a/chapter03/patches.xml b/chapter03/patches.xml index fc980206b..8aa5bed39 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -68,14 +68,6 @@ - - GCC Upstream Fixes Patch - &gcc-upstream-fixes-patch-size;: - - Download: - MD5 sum: &gcc-upstream-fixes-patch-md5; - - - Kbd Backspace/Delete Fix Patch - &kbd-backspace-patch-size;: diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 26711f632..f7facefdd 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -41,11 +41,6 @@ Installation of GCC - First, apply a patch to fix some regressions and to cope - with the removal of an obsolete kernel header in linux-5.13: - -patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch - If building on x86_64, change the default directory name for 64-bit libraries to lib: diff --git a/packages.ent b/packages.ent index acaf9d22d..ddcd52b97 100644 --- a/packages.ent +++ b/packages.ent @@ -38,11 +38,12 @@ - + - + - + + @@ -217,10 +218,11 @@ - - + + - + + @@ -327,10 +329,11 @@ - - + + - + +