From glibc-2.2.x to glibc-2.3.x

Chris Lingard chris at stockwith.co.uk
Fri Oct 25 08:58:21 PDT 2002


Original idea by Alfred Zastrow

As mentioned in previous postings there are dificulties building
an LFS system using the above libraries as base and target.

This method has built LFS successfully.  I have changed the install
commands for glibc as follows:

touch /etc/ld.so.conf &&
cat > /etc/nsswitch.conf  << "EOF"
passwd:   gerard
group:    gerard
EOF
cd  /usr/src/glibc-2.3.1

This allows chroot to work

The following packages must be installed as soon as possible to
link them with the new glibc:
bash, fileutils, tar

Once this is done then nsswitch.conf must be corrected because
quite a few packages fail to install with the above nss file.
(kdb, sysklog, sysvinit, netkit-base, sh-utils, lfs-bootscrips)

The the build sequence has been modified; this is the order
once glibc is installed:

man-pages zlib bison gcc findutils gawk ncurses vim bison less groff 
textutils sed flex binutils fileutils gettext net-tools perl m4 texinfo 
autoconf automake tar bash configure-glibc sh-utils file libtool bin86 
bzip2 ed kbd diffutils e2fsprogs grep gzip lilo make modutils netkit-base 
patch procinfo procps psmisc shadow sysklogd sysvinit  man util-linux
lfs-bootscripts

zlib is out of place because I like to build Java, so ignore

bison is needed by the cvs gcc; once there is a standard release
that builds, then this will probably not be needed

tar is before bash

Following bash the nsswitch.conf is restored by configure-glibc
It is also necessary to overwrite the static bash with the new dynamic
bash, otherwise we could not chroot in.
We could chroot in using /bin/bash

sh-utils is built after this script

This script has to be run outside the chroot environment, since
you cannot overwrite a running bash.  The script is

cp  $LFS/bin/bash  $LFS/static/bin/bash
cat > $LFS/etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf

passwd: files

and the rest of the parameters from "Configuring essential software"

EOF

When building bash I have tried things like

make install
exec /bin/bash --login
cp  /bin/bash  /static/bin/bash

but it complains "text file busy", or silently fails

Could that configure-glibc be written in perl, such that the chroot
script could start with #!/bin/perl;  in which case it could be run
in the chroot environment?  Any suggestions

Chris

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list