version upgrade

This commit is contained in:
tux 2024-09-15 12:36:07 +02:00
parent 25dab41a41
commit a19c771df1
11 changed files with 734 additions and 538 deletions

@ -36,6 +36,7 @@ edit **vars.sh** and change the options to suit the desired needs:
- PAPERSIZE: the default paper size used by the groff package
- MAKECHECK: to run the checks for each package in addition to the build and
install process
- TMPASTMPFS: if the mountpoint for /tmp should be set up as tmpfs by systemd
start with the LFS chapters:
@ -65,7 +66,7 @@ environment
continue with the LFS chapters:
- 10.2. Creating the /etc/fstab File
- 10.3. Linux-6.1.11
- 10.3. Linux
- 10.4. Using LFS_GRUB to Set Up the Boot Process
- 11.1. The End

@ -19,6 +19,24 @@ cat > /etc/profile << "EOF"
# ~/.bash_profile. Personal aliases and functions should go into
# ~/.bashrc.
# LFS
for i in $(locale); do
unset ${i%=*}
done
if [[ "$TERM" = linux ]]; then
export LANG=C.UTF-8
else
source /etc/locale.conf
for i in $(locale); do
key=${i%=*}
if [[ -v $key ]]; then
export $key
fi
done
fi
# Functions to help us manage paths. Second argument is the name of the
# path variable to be modified (default: PATH)
pathremove () {

@ -15,7 +15,9 @@ cd build &&
--target=$LFS_TGT \
--disable-nls \
--enable-gprofng=no \
--disable-werror &&
--disable-werror \
--enable-new-dtags \
--enable-default-hash-style=gnu &&
make &&
make install &&
cd ../.. &&
@ -48,7 +50,7 @@ cd build &&
../configure \
--target=$LFS_TGT \
--prefix=$LFS/tools \
--with-glibc-version=2.37 \
--with-glibc-version=2.40 \
--with-sysroot=$LFS \
--with-newlib \
--without-headers \
@ -69,7 +71,7 @@ make &&
make install &&
cd .. &&
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h &&
$(dirname $($LFS_TGT-gcc -print-libgcc-file-name))/install-tools/include/limits.h &&
cd .. &&
rm -rf "$LFS_GCC" &&
@ -115,8 +117,9 @@ echo "rootsbindir=/usr/sbin" > configparms &&
--prefix=/usr \
--host=$LFS_TGT \
--build=$(../scripts/config.guess) \
--enable-kernel=3.2 \
--enable-kernel=4.19 \
--with-headers=$LFS/usr/include \
--disable-nscd \
libc_cv_slibdir=/usr/lib &&
make &&
make DESTDIR=$LFS install &&
@ -127,7 +130,6 @@ readelf -l a.out | grep ld-linux
echo 'If everything is working correctly, there should be no errors, and the output of the last command will be of the form: [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]'
sleep 10
rm -v a.out &&
$LFS/tools/libexec/gcc/$LFS_TGT/12.2.0/install-tools/mkheaders &&
cd ../.. &&
rm -rf "$LFS_GLIBC" &&
@ -150,10 +152,10 @@ cd build &&
--disable-multilib \
--disable-nls \
--disable-libstdcxx-pch \
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/12.2.0 &&
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/14.2.0 &&
make &&
make DESTDIR=$LFS install &&
rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la &&
rm -v $LFS/usr/lib/lib{stdc++{,exp,fs},supc++}.la &&
cd ../.. &&
rm -rf "$LFS_GCC" &&
@ -202,12 +204,13 @@ popd
--with-cxx-shared \
--without-debug \
--without-ada \
--disable-stripping \
--enable-widec &&
--disable-stripping &&
make &&
make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install &&
echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so &&
ln -sv libncursesw.so $LFS/usr/lib/libncurses.so &&
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
-i $LFS/usr/include/curses.h &&
cd .. &&
rm -rf "$LFS_NCURSES" &&
@ -224,7 +227,8 @@ cd "$LFS_BASH" &&
./configure --prefix=/usr \
--build=$(sh support/config.guess) \
--host=$LFS_TGT \
--without-bash-malloc &&
--without-bash-malloc \
bash_cv_strtold_broken=no &&
make &&
make DESTDIR=$LFS install &&
ln -sv bash $LFS/bin/sh &&
@ -265,7 +269,9 @@ echo "Starting 6.6. ""$LFS_DIFFUTILS""" >> build.log
tar xf "$LFS_DIFFUTILS".tar.xz &&
cd "$LFS_DIFFUTILS" &&
./configure --prefix=/usr --host=$LFS_TGT &&
./configure --prefix=/usr \
--host=$LFS_TGT \
--build=$(./build-aux/config.guess) &&
make &&
make DESTDIR=$LFS install &&
cd .. &&
@ -286,7 +292,7 @@ pushd build
../configure --disable-bzlib \
--disable-libseccomp \
--disable-xzlib \
--disable-zlib
--disable-zlib &&
make
popd
./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess) &&
@ -310,7 +316,6 @@ cd "$LFS_FINDUTILS" &&
--localstatedir=/var/lib/locate \
--host=$LFS_TGT \
--build=$(build-aux/config.guess) &&
make &&
make DESTDIR=$LFS install &&
cd .. &&
@ -330,7 +335,6 @@ sed -i 's/extras//' Makefile.in &&
./configure --prefix=/usr \
--host=$LFS_TGT \
--build=$(build-aux/config.guess) &&
make &&
make DESTDIR=$LFS install &&
cd .. &&
@ -347,7 +351,8 @@ echo "Starting 6.10. ""$LFS_GREP""" >> build.log
tar xf "$LFS_GREP".tar.xz &&
cd "$LFS_GREP" &&
./configure --prefix=/usr \
--host=$LFS_TGT &&
--host=$LFS_TGT \
--build=$(./build-aux/config.guess) &&
make &&
make DESTDIR=$LFS install &&
cd .. &&
@ -379,9 +384,6 @@ echo "Starting 6.12. ""$LFS_MAKE""" >> build.log
tar xf "$LFS_MAKE".tar.gz &&
cd "$LFS_MAKE" &&
sed -e '/ifdef SIGPIPE/,+2 d' \
-e '/undef FATAL_SIG/i FATAL_SIG (SIGPIPE);' \
-i src/main.c &&
./configure --prefix=/usr \
--without-guile \
--host=$LFS_TGT \
@ -420,7 +422,8 @@ echo "Starting 6.14. ""$LFS_SED""" >> build.log
tar xf "$LFS_SED".tar.xz &&
cd "$LFS_SED" &&
./configure --prefix=/usr \
--host=$LFS_TGT &&
--host=$LFS_TGT \
--build=$(./build-aux/config.guess) &&
make &&
make DESTDIR=$LFS install &&
cd .. &&
@ -459,7 +462,7 @@ cd "$LFS_XZ" &&
--host=$LFS_TGT \
--build=$(build-aux/config.guess) \
--disable-static \
--docdir=/usr/share/doc/"$LFS_XZ" &&
--docdir=/usr/share/doc/xz-5.6.2 &&
make &&
make DESTDIR=$LFS install &&
@ -488,10 +491,12 @@ cd build &&
--enable-shared \
--enable-gprofng=no \
--disable-werror \
--enable-64-bit-bfd &&
--enable-64-bit-bfd \
--enable-new-dtags \
--enable-default-hash-style=gnu &&
make &&
make DESTDIR=$LFS install &&
rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.{a,la} &&
rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes,sframe}.{a,la} &&
cd ../.. &&
rm -rf "$LFS_BINUTILS" &&
@ -534,6 +539,7 @@ cd build &&
--disable-libatomic \
--disable-libgomp \
--disable-libquadmath \
--disable-libsanitizer \
--disable-libssp \
--disable-libvtv \
--enable-languages=c,c++ &&

@ -7,6 +7,7 @@ mkdir -pv /etc/{opt,sysconfig} &&
mkdir -pv /lib/firmware &&
mkdir -pv /media/{floppy,cdrom} &&
mkdir -pv /usr/{,local/}{include,src} &&
mkdir -pv /usr/lib/locale &&
mkdir -pv /usr/local/{bin,lib,sbin} &&
mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} &&
mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} &&
@ -55,7 +56,6 @@ dialout:x:10:
audio:x:11:
video:x:12:
utmp:x:13:
usb:x:14:
cdrom:x:15:
adm:x:16:
messagebus:x:18:
@ -76,6 +76,7 @@ wheel:x:97:
users:x:999:
nogroup:x:65534:
EOF
localedef -i C -f UTF-8 C.UTF-8 &&
echo "tester:x:101:101::/home/tester:/bin/bash" >> /etc/passwd &&
echo "tester:x:101:" >> /etc/group &&
install -o tester -d /home/tester &&

@ -6,6 +6,7 @@ touch /var/log/{btmp,lastlog,faillog,wtmp} &&
chgrp -v utmp /var/log/lastlog &&
chmod -v 664 /var/log/lastlog &&
chmod -v 600 /var/log/btmp &&
cd /sources &&
chown root:root build.log &&
@ -48,15 +49,16 @@ echo "Starting 7.9 ""$LFS_PERL""" >> build.log
tar xf "$LFS_PERL".tar.xz &&
cd "$LFS_PERL" &&
sh Configure -des \
-Dprefix=/usr \
-Dvendorprefix=/usr \
-Dprivlib=/usr/lib/perl5/5.36/core_perl \
-Darchlib=/usr/lib/perl5/5.36/core_perl \
-Dsitelib=/usr/lib/perl5/5.36/site_perl \
-Dsitearch=/usr/lib/perl5/5.36/site_perl \
-Dvendorlib=/usr/lib/perl5/5.36/vendor_perl \
-Dvendorarch=/usr/lib/perl5/5.36/vendor_perl &&
sh Configure -des \
-D prefix=/usr \
-D vendorprefix=/usr \
-D useshrplib \
-D privlib=/usr/lib/perl5/5.40/core_perl \
-D archlib=/usr/lib/perl5/5.40/core_perl \
-D sitelib=/usr/lib/perl5/5.40/site_perl \
-D sitearch=/usr/lib/perl5/5.40/site_perl \
-D vendorlib=/usr/lib/perl5/5.40/vendor_perl \
-D vendorarch=/usr/lib/perl5/5.40/vendor_perl &&
make &&
make install &&
cd .. &&
@ -107,19 +109,20 @@ echo "Starting 7.12 ""$LFS_UTILLINUX""" >> build.log
tar xf "$LFS_UTILLINUX".tar.xz &&
cd "$LFS_UTILLINUX" &&
mkdir -pv /var/lib/hwclock &&
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--libdir=/usr/lib \
--docdir=/usr/share/doc/util-linux-2.38.1 \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser \
--disable-pylibmount \
--disable-static \
--without-python \
runstatedir=/run &&
./configure --libdir=/usr/lib \
--runstatedir=/run \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser \
--disable-pylibmount \
--disable-static \
--disable-liblastlog2 \
--without-python \
ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-2.40.2 &&
make &&
make install &&
cd .. &&

@ -8,6 +8,7 @@ echo "Starting 8.3 ""$LFS_MANPAGES""" >> build.log
tar xf "$LFS_MANPAGES".tar.xz &&
cd "$LFS_MANPAGES" &&
rm -v man3/crypt* &&
make prefix=/usr install &&
cd .. &&
rm -rf "$LFS_MANPAGES" &&
@ -38,17 +39,15 @@ echo "Starting 8.5 ""$LFS_GLIBC""" >> build.log
tar xf "$LFS_GLIBC".tar.xz &&
cd "$LFS_GLIBC" &&
patch -Np1 -i ../glibc-2.37-fhs-1.patch &&
sed '/width -=/s/workend - string/number_length/' \
-i stdio-common/vfprintf-process-arg.c &&
patch -Np1 -i ../"$LFS_GLIBC"-fhs-1.patch &&
mkdir -v build &&
cd build &&
echo "rootsbindir=/usr/sbin" > configparms &&
../configure --prefix=/usr \
--disable-werror \
--enable-kernel=3.2 \
--enable-kernel=4.19 \
--enable-stack-protector=strong \
--with-headers=/usr/include \
--disable-nscd \
libc_cv_slibdir=/usr/lib &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
@ -58,21 +57,17 @@ touch /etc/ld.so.conf &&
sed '/test-installation/s@$(LFS_PERL)@echo not running@' -i ../Makefile &&
make install &&
sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd &&
cp -v ../nscd/nscd.conf /etc/nscd.conf &&
mkdir -pv /var/cache/nscd &&
install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf &&
install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service &&
make localedata/install-locales
make localedata/install-locales &&
localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
cat > /etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf
passwd: files
group: files
shadow: files
passwd: files systemd
group: files systemd
shadow: files systemd
hosts: files dns
hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
networks: files
protocols: files
@ -82,7 +77,7 @@ rpc: files
# End /etc/nsswitch.conf
EOF
tar -xf ../../tzdata2022g.tar.gz &&
tar -xf ../../tzdata2024a.tar.gz &&
ZONEINFO=/usr/share/zoneinfo &&
mkdir -pv $ZONEINFO/{posix,right} &&
for tz in etcetera southamerica northamerica europe africa antarctica \
@ -94,8 +89,8 @@ done &&
cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO &&
zic -d $ZONEINFO -p America/New_York &&
unset ZONEINFO &&
ln -sfv /usr/share/zoneinfo/UTC /etc/localtime &&
cat > /etc/ld.so.conf << "EOF"
ln -sfv /usr/share/zoneinfo/UTC /etc/localtime &&
cat > /etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf
/usr/local/lib
/opt/lib
@ -172,7 +167,7 @@ tar xf "$LFS_XZ".tar.xz &&
cd "$LFS_XZ" &&
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/xz-5.4.1 &&
--docdir=/usr/share/doc/xz-5.6.2 &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../check-log_"$LFS_XZ".log;
@ -188,7 +183,26 @@ echo "$LFS_XZ" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.9 ""$LFS_ZSTD""" >> build.log
echo "Starting 8.9 ""$LFS_LZ4""" >> build.log
tar xf "$LFS_LZ4".tar.gz &&
cd "$LFS_LZ4" &&
make BUILD_STATIC=no PREFIX=/usr &&
if [ "$MAKECHECK" = TRUE ]; then
make -j1 check | tee ../check-log_"$LFS_LZ4".log;
fi
make BUILD_STATIC=no PREFIX=/usr install &&
cd .. &&
rm -rf "$LFS_LZ4" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.9 ""$LFS_LZ4""" >> build.log &&
echo "$LFS_LZ4" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.10 ""$LFS_ZSTD""" >> build.log
tar xf "$LFS_ZSTD".tar.gz &&
cd "$LFS_ZSTD" &&
@ -203,12 +217,12 @@ rm -rf "$LFS_ZSTD" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.9 ""$LFS_ZSTD""" >> build.log &&
echo "Finished 8.10 ""$LFS_ZSTD""" >> build.log &&
echo "$LFS_ZSTD" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.10 ""$LFS_FILE""" >> build.log
echo "Starting 8.11 ""$LFS_FILE""" >> build.log
tar xf "$LFS_FILE".tar.gz &&
cd "$LFS_FILE" &&
@ -223,36 +237,35 @@ rm -rf "$LFS_FILE" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.10 ""$LFS_FILE""" >> build.log &&
echo "Finished 8.11 ""$LFS_FILE""" >> build.log &&
echo "$LFS_FILE" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.11 ""$LFS_READLINE""" >> build.log
echo "Starting 8.12 ""$LFS_READLINE""" >> build.log
tar xf "$LFS_READLINE".tar.gz &&
cd "$LFS_READLINE" &&
sed -i '/MV.*old/d' Makefile.in &&
sed -i '/{OLDSUFF}/c:' support/shlib-install &&
patch -Np1 -i ../readline-8.2-upstream_fix-1.patch &&
./configure --prefix=/usr \
--disable-static \
--with-curses \
--docdir=/usr/share/doc/readline-8.2 &&
--docdir=/usr/share/doc/readline-8.2.13 &&
make SHLIB_LIBS="-lncursesw" &&
make SHLIB_LIBS="-lncursesw" install &&
install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.2 &&
install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.2.13 &&
cd .. &&
rm -rf "$LFS_READLINE" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.11 ""$LFS_READLINE""" >> build.log &&
echo "Finished 8.12 ""$LFS_READLINE""" >> build.log &&
echo "$LFS_READLINE" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.12 ""$LFS_M4""" >> build.log
echo "Starting 8.13 ""$LFS_M4""" >> build.log
tar xf "$LFS_M4".tar.xz &&
cd "$LFS_M4" &&
@ -267,12 +280,12 @@ rm -rf "$LFS_M4" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.12 ""$LFS_M4""" >> build.log &&
echo "Finished 8.13 ""$LFS_M4""" >> build.log &&
echo "$LFS_M4" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.13 ""$LFS_BC""" >> build.log
echo "Starting 8.14 ""$LFS_BC""" >> build.log
tar xf "$LFS_BC".tar.xz &&
cd "$LFS_BC" &&
@ -287,12 +300,12 @@ rm -rf "$LFS_BC" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.13 ""$LFS_BC""" >> build.log
echo "Finished 8.14 ""$LFS_BC""" >> build.log
echo "$LFS_BC" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.14 ""$LFS_FLEX""" >> build.log
echo "Starting 8.15 ""$LFS_FLEX""" >> build.log
tar xf "$LFS_FLEX".tar.gz &&
cd "$LFS_FLEX" &&
@ -304,38 +317,40 @@ if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../check-log_"$LFS_FLEX".log;
fi
make install &&
ln -sv flex /usr/bin/lex &&
ln -sv flex /usr/bin/lex &&
ln -sv flex.1 /usr/share/man/man1/lex.1 &&
cd .. &&
rm -rf "$LFS_FLEX" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.14 ""$LFS_FLEX""" >> build.log &&
echo "Finished 8.15 ""$LFS_FLEX""" >> build.log &&
echo "$LFS_FLEX" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.15 ""$LFS_TCL""" >> build.log
echo "Starting 8.16 ""$LFS_TCL""" >> build.log
tar xf "$LFS_TCL"-src.tar.gz &&
cd "$LFS_TCL" &&
SRCDIR=$(pwd) &&
cd unix &&
./configure --prefix=/usr \
--mandir=/usr/share/man &&
--mandir=/usr/share/man \
--disable-rpath &&
make &&
sed -e "s|$SRCDIR/unix|/usr/lib|" \
-e "s|$SRCDIR|/usr/include|" \
-i tclConfig.sh &&
sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.5|/usr/lib/tdbc1.1.5|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.5/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.5/library|/usr/lib/tcl8.6|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.5|/usr/include|" \
-i pkgs/tdbc1.1.5/tdbcConfig.sh &&
sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.3|/usr/lib/itcl4.2.3|" \
-e "s|$SRCDIR/pkgs/itcl4.2.3/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/itcl4.2.3|/usr/include|" \
-i pkgs/itcl4.2.3/itclConfig.sh &&
sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.7|/usr/lib/tdbc1.1.7|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.7/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.7/library|/usr/lib/tcl8.6|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.7|/usr/include|" \
-i pkgs/tdbc1.1.7/tdbcConfig.sh &&
sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.4|/usr/lib/itcl4.2.4|" \
-e "s|$SRCDIR/pkgs/itcl4.2.4/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/itcl4.2.4|/usr/include|" \
-i pkgs/itcl4.2.4/itclConfig.sh &&
unset SRCDIR &&
if [ "$MAKECHECK" = TRUE ]; then
make test | tee ../../check-log_"$LFS_TCL".log;
@ -346,26 +361,28 @@ make install-private-headers &&
ln -sfv tclsh8.6 /usr/bin/tclsh &&
mv /usr/share/man/man3/{Thread,Tcl_Thread}.3 &&
cd .. &&
tar -xf ../tcl8.6.13-html.tar.gz --strip-components=1 &&
mkdir -v -p /usr/share/doc/tcl-8.6.13 &&
cp -v -r ./html/* /usr/share/doc/tcl-8.6.13 &&
tar -xf ../tcl8.6.14-html.tar.gz --strip-components=1 &&
mkdir -v -p /usr/share/doc/tcl-8.6.14 &&
cp -v -r ./html/* /usr/share/doc/tcl-8.6.14 &&
cd .. &&
rm -rf "$LFS_TCL" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.15 ""$LFS_TCL""" >> build.log &&
echo "Finished 8.16 ""$LFS_TCL""" >> build.log &&
echo "$LFS_TCL" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.16 ""$LFS_EXPECT""" >> build.log
echo "Starting 8.17 ""$LFS_EXPECT""" >> build.log
tar xf "$LFS_EXPECT".tar.gz &&
cd "$LFS_EXPECT" &&
patch -Np1 -i ../$LFS_EXPECT-gcc14-1.patch &&
./configure --prefix=/usr \
--with-tcl=/usr/lib \
--enable-shared \
--disable-rpath \
--mandir=/usr/share/man \
--with-tclinclude=/usr/include &&
make &&
@ -374,16 +391,17 @@ if [ "$MAKECHECK" = TRUE ]; then
fi
make install &&
ln -svf expect5.45.4/libexpect5.45.4.so /usr/lib &&
cd .. && rm -rf "$LFS_EXPECT" &&
cd .. &&
rm -rf "$LFS_EXPECT" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.16 ""$LFS_EXPECT""" >> build.log &&
echo "Finished 8.17 ""$LFS_EXPECT""" >> build.log &&
echo "$LFS_EXPECT" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.17 ""$LFS_DEJAGNU""" >> build.log
echo "Starting 8.18 ""$LFS_DEJAGNU""" >> build.log
tar xf "$LFS_DEJAGNU".tar.gz &&
cd "$LFS_DEJAGNU" &&
@ -392,30 +410,47 @@ cd build &&
../configure --prefix=/usr &&
makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi &&
makeinfo --plaintext -o doc/dejagnu.txt ../doc/dejagnu.texi &&
make install &&
install -v -dm755 /usr/share/doc/dejagnu-1.6.3 &&
install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-1.6.3 &&
if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../../check-log_"$LFS_DEJAGNU".log;
fi
make install &&
install -v -dm755 /usr/share/doc/dejagnu-1.6.3 &&
install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-1.6.3 &&
cd ../.. &&
rm -rf "$LFS_DEJAGNU" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.17 ""$LFS_DEJAGNU""" >> build.log &&
echo "Finished 8.18 ""$LFS_DEJAGNU""" >> build.log &&
echo "$LFS_DEJAGNU" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.18 ""$LFS_BINUTILS""" >> build.log
echo "Starting 8.19 ""$LFS_PKGCONF""" >> build.log
tar xf "$LFS_PKGCONF".tar.xz &&
cd "$LFS_PKGCONF" &&
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/pkgconf-2.3.0 &&
make &&
make install &&
ln -sv pkgconf /usr/bin/pkg-config &&
ln -sv pkgconf.1 /usr/share/man/man1/pkg-config.1 &&
cd ../.. &&
rm -rf "$LFS_PKGCONF" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.19 ""$LFS_PKGCONF""" >> build.log &&
echo "$LFS_PKGCONF" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.20 ""$LFS_BINUTILS""" >> build.log
tar xf "$LFS_BINUTILS".tar.xz &&
cd "$LFS_BINUTILS" &&
echo "Verify that the PTYs are working properly inside the chroot environment"
echo "The output should be: spawn ls"
expect -c "spawn ls"
sleep 5;
mkdir -v build &&
cd build &&
../configure --prefix=/usr \
@ -426,33 +461,34 @@ cd build &&
--enable-shared \
--disable-werror \
--enable-64-bit-bfd \
--with-system-zlib &&
--enable-new-dtags \
--with-system-zlib \
--enable-default-hash-style=gnu &&
make tooldir=/usr &&
if [ "$MAKECHECK" = TRUE ]; then
make -k check | tee ../../check-log_"$LFS_BINUTILS".log;
grep '^FAIL:' $(find -name '*.log')
fi
make tooldir=/usr install &&
rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,sframe,opcodes}.a &&
rm -fv /usr/share/man/man1/{gprofng,gp-*}.1 &&
rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a &&
cd ../.. &&
rm -rf "$LFS_BINUTILS" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.18 ""$LFS_BINUTILS""" >> build.log &&
echo "Finished 8.20 ""$LFS_BINUTILS""" >> build.log &&
echo "$LFS_BINUTILS" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.19 ""$LFS_GMP""" >> build.log
echo "Starting 8.21 ""$LFS_GMP""" >> build.log
tar xf "$LFS_GMP".tar.xz &&
cd "$LFS_GMP" &&
./configure --prefix=/usr \
--enable-cxx \
--disable-static \
--docdir=/usr/share/doc/gmp-6.2.1 &&
--docdir=/usr/share/doc/gmp-6.3.0 &&
make &&
make html &&
if [ "$MAKECHECK" = TRUE ]; then
@ -467,22 +503,19 @@ rm -rf "$LFS_GMP" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.19 ""$LFS_GMP""" >> build.log &&
echo "Finished 8.21 ""$LFS_GMP""" >> build.log &&
echo "$LFS_GMP" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.20 ""$LFS_MPFR""" >> build.log
echo "Starting 8.22 ""$LFS_MPFR""" >> build.log
tar xf "$LFS_MPFR".tar.xz &&
cd "$LFS_MPFR" &&
sed -e 's/+01,234,567/+1,234,567 /' \
-e 's/13.10Pd/13Pd/' \
-i tests/tsprintf.c &&
./configure --prefix=/usr \
--disable-static \
--enable-thread-safe \
--docdir=/usr/share/doc/mpfr-4.2.0 &&
--docdir=/usr/share/doc/mpfr-4.2.1 &&
make &&
make html &&
if [ "$MAKECHECK" = TRUE ]; then
@ -495,12 +528,12 @@ rm -rf "$LFS_MPFR" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.20 ""$LFS_MPFR""" >> build.log &&
echo "Finished 8.22 ""$LFS_MPFR""" >> build.log &&
echo "$LFS_MPFR" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.21 ""$LFS_MPC""" >> build.log
echo "Starting 8.23 ""$LFS_MPC""" >> build.log
tar xf "$LFS_MPC".tar.gz &&
cd "$LFS_MPC" &&
@ -519,19 +552,19 @@ rm -rf "$LFS_MPC" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.21 ""$LFS_MPC""" >> build.log &&
echo "Finished 8.23 ""$LFS_MPC""" >> build.log &&
echo "$LFS_MPC" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.22 ""$LFS_ATTR""" >> build.log
echo "Starting 8.24 ""$LFS_ATTR""" >> build.log
tar xf "$LFS_ATTR".tar.gz &&
cd "$LFS_ATTR" &&
./configure --prefix=/usr \
--disable-static \
--sysconfdir=/etc \
--docdir=/usr/share/doc/attr-2.5.1 &&
--docdir=/usr/share/doc/attr-2.5.2 &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../check-log_"$LFS_ATTR".log;
@ -542,18 +575,18 @@ rm -rf "$LFS_ATTR" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.22 ""$LFS_ATTR""" >> build.log &&
echo "Finished 8.24 ""$LFS_ATTR""" >> build.log &&
echo "$LFS_ATTR" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.23 ""$LFS_ACL""" >> build.log
echo "Starting 8.25 ""$LFS_ACL""" >> build.log
tar xf "$LFS_ACL".tar.xz &&
cd "$LFS_ACL" &&
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/acl-2.3.1 &&
--docdir=/usr/share/doc/acl-2.3.2 &&
make &&
make install &&
cd .. &&
@ -561,12 +594,12 @@ rm -rf "$LFS_ACL" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.23 ""$LFS_ACL""" >> build.log &&
echo "Finished 8.25 ""$LFS_ACL""" >> build.log &&
echo "$LFS_ACL" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.24 ""$LFS_LIBCAP""" >> build.log
echo "Starting 8.26 ""$LFS_LIBCAP""" >> build.log
tar xf "$LFS_LIBCAP".tar.xz &&
cd "$LFS_LIBCAP" &&
@ -581,27 +614,52 @@ rm -rf "$LFS_LIBCAP" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.24 ""$LFS_LIBCAP""" >> build.log &&
echo "Finished 8.26 ""$LFS_LIBCAP""" >> build.log &&
echo "$LFS_LIBCAP" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.25 ""$LFS_SHADOW""" >> build.log
echo "Starting 8.27 ""$LFS_LIBXCRYPT""" >> build.log
tar xf "$LFS_LIBXCRYPT".tar.xz &&
cd "$LFS_LIBXCRYPT" &&
./configure --prefix=/usr \
--enable-hashes=strong,glibc \
--enable-obsolete-api=no \
--disable-static \
--disable-failure-tokens &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../check-log_"$LFS_LIBXCRYPT".log;
fi
make install &&
cd .. &&
rm -rf "$LFS_LIBXCRYPT" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.27 ""$LFS_LIBXCRYPT""" >> build.log &&
echo "$LFS_LIBXCRYPT" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.28 ""$LFS_SHADOW""" >> build.log
tar xf "$LFS_SHADOW".tar.xz &&
cd "$LFS_SHADOW" &&
sed -i 's/groups$(EXEEXT) //' src/Makefile.in &&
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
-e 's@#\(SHA_CRYPT_..._ROUNDS 5000\)@\100@' \
-e 's:/var/spool/mail:/var/mail:' \
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
-i etc/login.defs &&
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \
-e 's:/var/spool/mail:/var/mail:' \
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
-i etc/login.defs &&
touch /usr/bin/passwd &&
./configure --sysconfdir=/etc \
--disable-static \
./configure --sysconfdir=/etc \
--disable-static \
--with-{b,yes}crypt \
--without-libbsd \
--with-group-name-max-length=32 &&
make &&
make exec_prefix=/usr install &&
@ -611,7 +669,7 @@ grpconv &&
mkdir -p /etc/default &&
useradd -D --gid 999 &&
# sed -i '/MAIL/s/yes/no/' /etc/default/useradd
echo root:root | chpasswd #Set the root password
echo root:root | chpasswd # Set the root password
echo "The password for the user root has been set to 'root'"
sleep 5
cd .. &&
@ -619,12 +677,12 @@ rm -rf "$LFS_SHADOW" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.25 ""$LFS_SHADOW""" >> build.log &&
echo "Finished 8.28 ""$LFS_SHADOW""" >> build.log &&
echo "$LFS_SHADOW" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.26 ""$LFS_GCC""" >> build.log
echo "Starting 8.29 ""$LFS_GCC""" >> build.log
tar xf "$LFS_GCC".tar.xz &&
cd "$LFS_GCC" &&
@ -641,11 +699,18 @@ cd build &&
--enable-languages=c,c++ \
--enable-default-pie \
--enable-default-ssp \
--enable-host-pie \
--disable-multilib \
--disable-bootstrap \
--disable-fixincludes \
--with-system-zlib &&
make &&
ulimit -s 32768 &&
ulimit -s -H unlimited &&
sed -e '/cpython/d' -i ../gcc/testsuite/gcc.dg/plugin/plugin.exp &&
sed -e 's/no-pic /&-no-pie /' -i ../gcc/testsuite/gcc.target/i386/pr113689-1.c &&
sed -e 's/300000/(1|300000)/' -i ../libgomp/testsuite/libgomp.c-c++-common/pr109062.c &&
sed -e 's/{ target nonpic } //' \
-e '/GOTPCREL/d' -i ../gcc/testsuite/gcc.target/i386/fentryname3.c &&
if [ "$MAKECHECK" = TRUE ]; then
chown -Rv tester . &&
su tester -c "PATH=$PATH make -k -j""$JOBS"" check";
@ -654,9 +719,10 @@ if [ "$MAKECHECK" = TRUE ]; then
fi
make install &&
chown -v -R root:root \
/usr/lib/gcc/$(gcc -dumpmachine)/12.2.0/include{,-fixed} &&
/usr/lib/gcc/$(gcc -dumpmachine)/14.2.0/include{,-fixed} &&
ln -svr /usr/bin/cpp /usr/lib &&
ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/12.2.0/liblto_plugin.so \
ln -sv gcc.1 /usr/share/man/man1/cc.1 &&
ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/14.2.0/liblto_plugin.so \
/usr/lib/bfd-plugins/ &&
echo "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 some sanity checks"
echo "There should be no errors, and the output of the last command will be (allowing for platform-specific differences in the dynamic linker name):"
@ -666,16 +732,16 @@ cc dummy.c -v -Wl,--verbose &> dummy.log &&
readelf -l a.out | grep ': /lib'
echo "Now make sure that we're set up to use the correct start files"
echo "The output should be:"
echo "/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/Scrt1.o succeeded"
echo "/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/crti.o succeeded"
echo "/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/crtn.o succeeded"
echo "/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../lib/Scrt1.o succeeded"
echo "/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../lib/crti.o succeeded"
echo "/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../lib/crtn.o succeeded"
grep -E -o '/usr/lib.*/S?crt[1in].*succeeded' dummy.log
echo "Verify that the compiler is searching for the correct header files"
echo "The output should be:"
echo "#include <...> search starts here:"
echo" /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include"
echo" /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/include"
echo" /usr/local/include"
echo" /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include-fixed"
echo" /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/include-fixed"
echo" /usr/include"
grep -B4 '^ /usr/include' dummy.log
echo "Verify that the new linker is being used with the correct search paths"
@ -706,35 +772,16 @@ rm -rf "$LFS_GCC" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.26 ""$LFS_GCC""" >> build.log &&
echo "Finished 8.29 ""$LFS_GCC""" >> build.log &&
echo "$LFS_GCC" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.27 ""$LFS_PKGCONFIG""" >> build.log
tar xf "$LFS_PKGCONFIG".tar.gz &&
cd "$LFS_PKGCONFIG" &&
./configure --prefix=/usr \
--with-internal-glib \
--disable-host-tool \
--docdir=/usr/share/doc/pkg-config-0.29.2 &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../check-log_"$LFS_PKGCONFIG".log;
fi
make install &&
cd .. &&
rm -rf "$LFS_PKGCONFIG" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.27 ""$LFS_PKGCONFIG""" >> build.log &&
echo "$LFS_PKGCONFIG" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.28 ""$LFS_NCURSES""" >> build.log
echo "Starting 8.30 ""$LFS_NCURSES""" >> build.log
tar xf "$LFS_NCURSES".tar.gz &&
cd "$LFS_NCURSES" &&
@ -745,34 +792,31 @@ cd "$LFS_NCURSES" &&
--without-normal \
--with-cxx-shared \
--enable-pc-files \
--enable-widec \
--with-pkg-config-libdir=/usr/lib/pkgconfig &&
make &&
make DESTDIR=$PWD/dest install &&
install -vm755 dest/usr/lib/libncursesw.so.6.4 /usr/lib &&
rm -v dest/usr/lib/libncursesw.so.6.4 &&
install -vm755 dest/usr/lib/libncursesw.so.6.5 /usr/lib &&
rm -v dest/usr/lib/libncursesw.so.6.5 &&
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
-i dest/usr/include/curses.h &&
cp -av dest/* / &&
for lib in ncurses form panel menu ; do
rm -vf /usr/lib/lib${lib}.so
echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so
ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
ln -sfv lib${lib}w.so /usr/lib/lib${lib}.so
ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
done &&
rm -vf /usr/lib/libcursesw.so &&
echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so &&
ln -sfv libncurses.so /usr/lib/libcurses.so &&
mkdir -pv /usr/share/doc/ncurses-6.4 &&
cp -v -R doc/* /usr/share/doc/ncurses-6.4 &&
ln -sfv libncursesw.so /usr/lib/libcurses.so &&
cp -v -R doc -T /usr/share/doc/ncurses-6.5 &&
cd .. &&
rm -rf "$LFS_NCURSES" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.28 ""$LFS_NCURSES""" >> build.log &&
echo "Finished 8.30 ""$LFS_NCURSES""" >> build.log &&
echo "$LFS_NCURSES" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.29 ""$LFS_SED""" >> build.log
echo "Starting 8.31 ""$LFS_SED""" >> build.log
tar xf "$LFS_SED".tar.xz &&
cd "$LFS_SED" &&
@ -781,7 +825,7 @@ make &&
make html &&
if [ "$MAKECHECK" = TRUE ]; then
chown -Rv tester . &&
su tester -c "PATH=$PATH make check" | tee ../check-log_"$LFS_GCC".log;
su tester -c "PATH=$PATH make check" | tee ../check-log_"$LFS_SED".log;
fi
make install &&
install -d -m755 /usr/share/doc/sed-4.9 &&
@ -791,38 +835,41 @@ rm -rf "$LFS_SED" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.29 ""$LFS_SED""" >> build.log &&
echo "Finished 8.31 ""$LFS_SED""" >> build.log &&
echo "$LFS_SED" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.30 ""$LFS_PSMISC""" >> build.log
echo "Starting 8.32 ""$LFS_PSMISC""" >> build.log
tar xf "$LFS_PSMISC".tar.xz &&
cd "$LFS_PSMISC" &&
./configure --prefix=/usr &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../check-log_"$LFS_PSMISC".log;
fi
make install &&
cd .. &&
rm -rf "$LFS_PSMISC" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.30 ""$LFS_PSMISC""" >> build.log &&
echo "Finished 8.32 ""$LFS_PSMISC""" >> build.log &&
echo "$LFS_PSMISC" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.31 ""$LFS_GETTEXT""" >> build.log
echo "Starting 8.33 ""$LFS_GETTEXT""" >> build.log
tar xf "$LFS_GETTEXT".tar.xz &&
cd "$LFS_GETTEXT" &&
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/gettext-0.21.1 &&
--docdir=/usr/share/doc/gettext-0.22.5 &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
make check | tee ../check-log_"$LFS_GCC".log;
make check | tee ../check-log_"$LFS_GETTEXT".log;
fi
make install &&
chmod -v 0755 /usr/lib/preloadable_libintl.so &&
@ -831,12 +878,12 @@ rm -rf "$LFS_GETTEXT" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.31 ""$LFS_GETTEXT""" >> build.log &&
echo "Finished 8.33 ""$LFS_GETTEXT""" >> build.log &&
echo "$LFS_GETTEXT" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.32 ""$LFS_BISON""" >> build.log
echo "Starting 8.34 ""$LFS_BISON""" >> build.log
tar xf "$LFS_BISON".tar.xz &&
cd "$LFS_BISON" &&
@ -851,12 +898,12 @@ rm -rf "$LFS_BISON" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.32 ""$LFS_BISON""" >> build.log &&
echo "Finished 8.34 ""$LFS_BISON""" >> build.log &&
echo "$LFS_BISON" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.33 ""$LFS_GREP""" >> build.log
echo "Starting 8.35 ""$LFS_GREP""" >> build.log
tar xf "$LFS_GREP".tar.xz &&
cd "$LFS_GREP" &&
@ -872,19 +919,20 @@ rm -rf "$LFS_GREP" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.33 ""$LFS_GREP""" >> build.log &&
echo "Finished 8.35 ""$LFS_GREP""" >> build.log &&
echo "$LFS_GREP" >> /installed.txt
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Starting 8.34 ""$LFS_BASH""" >> build.log
echo "Starting 8.36 ""$LFS_BASH""" >> build.log
tar xf "$LFS_BASH".tar.gz &&
cd "$LFS_BASH" &&
./configure --prefix=/usr \
--without-bash-malloc \
--with-installed-readline \
--docdir=/usr/share/doc/bash-5.2.15 &&
bash_cv_strtold_broken=no \
--docdir=/usr/share/doc/bash-5.2.32 &&
make &&
if [ "$MAKECHECK" = TRUE ]; then
chown -Rv tester . &&
@ -902,7 +950,7 @@ rm -rf "$LFS_BASH" &&
CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T")
echo "$CURRENT_DATE_TIME" >> build.log
echo "Finished 8.34 ""$LFS_BASH""" >> build.log &&
echo "Finished 8.36 ""$LFS_BASH""" >> build.log &&
echo "$LFS_BASH" >> /installed.txt
echo "Executing new bash, continue with chapter 8 p2:"

File diff suppressed because it is too large Load Diff

@ -2,20 +2,20 @@
source vars.sh
chown -R root:root "$LFS"/{usr,lib,var,etc,bin,sbin,tools} &&
chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} &&
case $(uname -m) in
x86_64) chown -R root:root "$LFS"/lib64 ;;
x86_64) chown --from lfs -R root:root $LFS/lib64 ;;
esac &&
mkdir -pv "$LFS"/{dev,proc,sys,run} &&
mount -v --bind /dev "$LFS"/dev &&
mount -v --bind /dev/pts "$LFS"/dev/pts &&
mount -vt proc proc "$LFS"/proc &&
mount -vt sysfs sysfs "$LFS"/sys &&
mount -vt tmpfs tmpfs "$LFS"/run &&
if [ -h "$LFS"/dev/shm ]; then
mkdir -pv "$LFS"/"$(readlink "$LFS"/dev/shm)"
mkdir -pv $LFS/{dev,proc,sys,run} &&
mount -v --bind /dev $LFS/dev &&
mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts &&
mount -vt proc proc $LFS/proc &&
mount -vt sysfs sysfs $LFS/sys &&
mount -vt tmpfs tmpfs $LFS/run &&
if [ -h $LFS/dev/shm ]; then
install -v -d -m 1777 $LFS$(realpath /dev/shm)
else
mount -t tmpfs -o nosuid,nodev tmpfs "$LFS"/dev/shm
mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
fi
echo "Entering now the chroot environment, continue with chapter 7 p1:"
@ -26,4 +26,6 @@ chroot "$LFS" /usr/bin/env -i \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
MAKEFLAGS="-j$(nproc)" \
TESTSUITEFLAGS="-j$(nproc)" \
/bin/bash --login

@ -2,15 +2,15 @@
source vars.sh
mount -v --bind /dev "$LFS"/dev &&
mount -v --bind /dev/pts "$LFS"/dev/pts &&
mount -vt proc proc "$LFS"/proc &&
mount -vt sysfs sysfs "$LFS"/sys &&
mount -vt tmpfs tmpfs "$LFS"/run &&
if [ -h "$LFS"/dev/shm ]; then
mkdir -pv "$LFS"/"$(readlink "$LFS"/dev/shm)"
mount -v --bind /dev $LFS/dev&&
mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts &&
mount -vt proc proc $LFS/proc &&
mount -vt sysfs sysfs $LFS/sys &&
mount -vt tmpfs tmpfs $LFS/run &&
if [ -h $LFS/dev/shm ]; then
install -v -d -m 1777 $LFS$(realpath /dev/shm)
else
mount -t tmpfs -o nosuid,nodev tmpfs "$LFS"/dev/shm
mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
fi
echo "Entering now the chroot environment"
@ -20,4 +20,6 @@ chroot "$LFS" /usr/bin/env -i \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
MAKEFLAGS="-j$(nproc)" \
TESTSUITEFLAGS="-j$(nproc)" \
/bin/bash --login

129
vars.sh

@ -11,82 +11,87 @@ export KEYMAP="de-latin1" # default "en"
export LOCALE="en_US.utf8"
export TELNETD=TRUE
export MAKECHECK=FALSE
export TMPASTMPFS=TRUE
export LFS="/mnt/lfs"
export LFS_BINUTILS="binutils-2.40"
export LFS_GCC="gcc-12.2.0"
export LFS_LINUX="linux-6.1.11"
export LFS_BINUTILS="binutils-2.43.1"
export LFS_GCC="gcc-14.2.0"
export LFS_LINUX="linux-6.10.5"
export LFS_GLIBC="glibc-2.40"
export LFS_BASH="bash-5.2.32"
export LFS_M4="m4-1.4.19"
export LFS_GLIBC="glibc-2.37"
export LFS_BASH="bash-5.2.15"
export LFS_COREUTILS="coreutils-9.1"
export LFS_DIFFUTILS="diffutils-3.9"
export LFS_FILE="file-5.44"
export LFS_FINDUTILS="findutils-4.9.0"
export LFS_GAWK="gawk-5.2.1"
export LFS_GREP="grep-3.8"
export LFS_GZIP="gzip-1.12"
export LFS_MAKE="make-4.4"
export LFS_COREUTILS="coreutils-9.5"
export LFS_DIFFUTILS="diffutils-3.10"
export LFS_FILE="file-5.45"
export LFS_FINDUTILS="findutils-4.10.0"
export LFS_GAWK="gawk-5.3.0"
export LFS_GREP="grep-3.11"
export LFS_GZIP="gzip-1.13"
export LFS_MAKE="make-4.4.1"
export LFS_PATCH="patch-2.7.6"
export LFS_SED="sed-4.9"
export LFS_TAR="tar-1.34"
export LFS_XZ="xz-5.4.1"
export LFS_GETTEXT="gettext-0.21.1"
export LFS_TAR="tar-1.35"
export LFS_XZ="xz-5.6.2"
export LFS_GETTEXT="gettext-0.22.5"
export LFS_BISON="bison-3.8.2"
export LFS_PERL="perl-5.36.0"
export LFS_PYTHON="Python-3.11.2"
export LFS_TEXINFO="texinfo-7.0.2"
export LFS_UTILLINUX="util-linux-2.38.1"
export LFS_MANPAGES="man-pages-6.03"
export LFS_IANAETC="iana-etc-20230202"
export LFS_ZLIB="zlib-1.2.13"
export LFS_PERL="perl-5.40.0"
export LFS_PYTHON="Python-3.12.5"
export LFS_TEXINFO="texinfo-7.1"
export LFS_UTILLINUX="util-linux-2.40.2"
export LFS_MANPAGES="man-pages-6.9.1"
export LFS_IANAETC="iana-etc-20240806"
export LFS_ZLIB="zlib-1.3.1"
export LFS_LZ4="lz4-1.10.0"
export LFS_BZIP2="bzip2-1.0.8"
export LFS_ZSTD="zstd-1.5.4"
export LFS_READLINE="readline-8.2"
export LFS_BC="bc-6.2.4"
export LFS_ZSTD="zstd-1.5.6"
export LFS_READLINE="readline-8.2.13"
export LFS_BC="bc-6.7.6"
export LFS_FLEX="flex-2.6.4"
export LFS_TCL="tcl8.6.13"
export LFS_TCL="tcl8.6.14"
export LFS_EXPECT="expect5.45.4"
export LFS_DEJAGNU="dejagnu-1.6.3"
export LFS_MPFR="mpfr-4.2.0"
export LFS_GMP="gmp-6.2.1"
export LFS_PKGCONF="pkgconf-2.3.0"
export LFS_GMP="gmp-6.3.0"
export LFS_MPFR="mpfr-4.2.1"
export LFS_MPC="mpc-1.3.1"
export LFS_ATTR="attr-2.5.1"
export LFS_ACL="acl-2.3.1"
export LFS_LIBCAP="libcap-2.67"
export LFS_SHADOW="shadow-4.13"
export LFS_PKGCONFIG="pkg-config-0.29.2"
export LFS_NCURSES="ncurses-6.4"
export LFS_PSMISC="psmisc-23.6"
export LFS_ATTR="attr-2.5.2"
export LFS_ACL="acl-2.3.2"
export LFS_LIBCAP="libcap-2.70"
export LFS_LIBXCRYPT="libxcrypt-4.4.36"
export LFS_SHADOW="shadow-4.16.0"
export LFS_NCURSES="ncurses-6.5"
export LFS_PSMISC="psmisc-23.7"
export LFS_LIBTOOL="libtool-2.4.7"
export LFS_GDBM="gdbm-1.23"
export LFS_GDBM="gdbm-1.24"
export LFS_GPERF="gperf-3.1"
export LFS_EXPAT="expat-2.5.0"
export LFS_INETUTILS="inetutils-2.4"
export LFS_LESS="less-608"
export LFS_XMLPARSER="XML-Parser-2.46"
export LFS_EXPAT="expat-2.6.2"
export LFS_INETUTILS="inetutils-2.5"
export LFS_LESS="less-661"
export LFS_XMLPARSER="XML-Parser-2.47"
export LFS_INTLTOOL="intltool-0.51.0"
export LFS_AUTOCONF="autoconf-2.71"
export LFS_AUTOMAKE="automake-1.16.5"
export LFS_OPENSSL="openssl-3.0.8"
export LFS_KMOD="kmod-30"
export LFS_ELFUTILS="elfutils-0.188"
export LFS_LIBFFI="libffi-3.4.4"
export LFS_WHEEL="wheel-0.38.4"
export LFS_NINJA="ninja-1.11.1"
export LFS_MESON="meson-1.0.0"
export LFS_AUTOCONF="autoconf-2.72"
export LFS_AUTOMAKE="automake-1.17"
export LFS_OPENSSL="openssl-3.3.1"
export LFS_KMOD="kmod-33"
export LFS_ELFUTILS="elfutils-0.191"
export LFS_LIBFFI="libffi-3.4.6"
export LFS_FLITCORE="flit_core-3.9.0"
export LFS_WHEEL="wheel-0.44.0"
export LFS_SETUPTOOLS="setuptools-72.2.0"
export LFS_NINJA="ninja-1.12.1"
export LFS_MESON="meson-1.5.1"
export LFS_CHECK="check-0.15.2"
export LFS_GROFF="groff-1.22.4"
export LFS_GRUB="grub-2.06"
export LFS_IPROUTE2="iproute2-6.1.0"
export LFS_KBD="kbd-2.5.1"
export LFS_GROFF="groff-1.23.0"
export LFS_GRUB="grub-2.12"
export LFS_IPROUTE2="iproute2-6.10.0"
export LFS_KBD="kbd-2.6.4"
export LFS_LIBPIPELINE="libpipeline-1.5.7"
export LFS_VIM="vim-9.0.1273"
export LFS_MARKUPSAFE="MarkupSafe-2.1.2"
export LFS_JINJA2="Jinja2-3.1.2"
export LFS_SYSTEMD="systemd-252"
export LFS_DBUS="dbus-1.14.6"
export LFS_MANDB="man-db-2.11.2"
export LFS_PROCPSNG="procps-ng-4.0.2"
export LFS_E2FSPROGS="e2fsprogs-1.47.0"
export LFS_VIM="vim-9.1.0660"
export LFS_MARKUPSAFE="MarkupSafe-2.1.5"
export LFS_JINJA2="Jinja2-3.1.4"
export LFS_SYSTEMD="systemd-256.4"
export LFS_DBUS="dbus-1.14.10"
export LFS_MANDB="man-db-2.12.1"
export LFS_PROCPSNG="procps-ng-4.0.4"
export LFS_E2FSPROGS="e2fsprogs-1.47.1"

@ -1,53 +1,90 @@
#!/bin/bash
# Simple script to list version numbers of critical development tools
export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4
MYSH=$(readlink -f /bin/sh)
echo "/bin/sh -> $MYSH"
echo "$MYSH" | grep -q bash || echo "ERROR: /bin/sh does not point to bash"
unset MYSH
# A script to list version numbers of critical development tools
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1
# If you have tools installed in other directories, adjust PATH here AND
# in ~lfs/.bashrc (section 4.4) as well.
if [ -h /usr/bin/yacc ]; then
echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
elif [ -x /usr/bin/yacc ]; then
echo yacc is `/usr/bin/yacc --version | head -n1`
LC_ALL=C
PATH=/usr/bin:/bin
bail() { echo "FATAL: $1"; exit 1; }
grep --version > /dev/null 2> /dev/null || bail "grep does not work"
sed '' /dev/null || bail "sed does not work"
sort /dev/null || bail "sort does not work"
ver_check()
{
if ! type -p $2 &>/dev/null
then
echo "ERROR: Cannot find $2 ($1)"; return 1;
fi
v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
if printf '%s\n' $3 $v | sort --version-sort --check &>/dev/null
then
printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
else
printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
return 1;
fi
}
ver_kernel()
{
kver=$(uname -r | grep -E -o '^[0-9\.]+')
if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null
then
printf "OK: Linux Kernel $kver >= $1\n"; return 0;
else
printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver";
return 1;
fi
}
# Coreutils first because --version-sort needs Coreutils >= 7.0
ver_check Coreutils sort 8.1 || bail "Coreutils too old, stop"
ver_check Bash bash 3.2
ver_check Binutils ld 2.13.1
ver_check Bison bison 2.7
ver_check Diffutils diff 2.8.1
ver_check Findutils find 4.2.31
ver_check Gawk gawk 4.0.1
ver_check GCC gcc 5.2
ver_check "GCC (C++)" g++ 5.2
ver_check Grep grep 2.5.1a
ver_check Gzip gzip 1.3.12
ver_check M4 m4 1.4.10
ver_check Make make 4.0
ver_check Patch patch 2.5.4
ver_check Perl perl 5.8.8
ver_check Python python3 3.4
ver_check Sed sed 4.1.5
ver_check Tar tar 1.22
ver_check Texinfo texi2any 5.0
ver_check Xz xz 5.0.0
ver_kernel 4.19
if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ]
then echo "OK: Linux Kernel supports UNIX 98 PTY";
else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi
alias_check() {
if $1 --version 2>&1 | grep -qi $2
then printf "OK: %-4s is $2\n" "$1";
else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
}
echo "Aliases:"
alias_check awk GNU
alias_check yacc Bison
alias_check sh Bash
echo "Compiler check:"
if printf "int main(){}" | g++ -x c++ -
then echo "OK: g++ works";
else echo "ERROR: g++ does NOT work"; fi
rm -f a.out
if [ "$(nproc)" = "" ]; then
echo "ERROR: nproc is not available or it produces empty output"
else
echo "yacc not found"
fi
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
diff --version | head -n1
find --version | head -n1
gawk --version | head -n1
if [ -h /usr/bin/awk ]; then
echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
elif [ -x /usr/bin/awk ]; then
echo awk is `/usr/bin/awk --version | head -n1`
else
echo "awk not found"
fi
gcc --version | head -n1
g++ --version | head -n1
grep --version | head -n1
gzip --version | head -n1
cat /proc/version
m4 --version | head -n1
make --version | head -n1
patch --version | head -n1
echo Perl `perl -V:version`
python3 --version
sed --version | head -n1
tar --version | head -n1
makeinfo --version | head -n1 # texinfo version
xz --version | head -n1
echo 'int main(){}' > dummy.c && g++ -o dummy dummy.c
if [ -x dummy ]
then echo "g++ compilation OK";
else echo "g++ compilation failed"; fi
rm -f dummy.c dummy
echo "OK: nproc reports $(nproc) logical cores are available"
fi