Installation of Glibc
Before starting to install glibc, unpack the glibc-2.2.3-nss.diff
file in the $LFS/usr/src tree. Then, once glibc has been unpacked as usual
and you have cd'ed into the
glibc-&glibc-version; directory, unpack glibc-linuxthreads inside
the glibc-&glibc-version; directory, not in /usr/src as you normally
would do.
Install Glibc by running the following commands:
patch -Np0 -i ../glibc-2.2.3-nss.diff &&
mknod -m 0666 /dev/null c 1 3 &&
touch /etc/ld.so.conf &&
mkdir ../glibc-build &&
cd ../glibc-build &&
sed s/"\$(PERL)"/"\/usr\/bin\/perl"/ \
../glibc-&glibc-version;/malloc/Makefile > tmp~ &&
mv tmp~ ../glibc-&glibc-version;/malloc/Makefile &&
sed "s/root/0/" ../glibc-&glibc-version;/login/Makefile > tmp~ &&
mv tmp~ ../glibc-&glibc-version;/login/Makefile &&
../glibc-&glibc-version;/configure \
--prefix=/usr --enable-add-ons \
--libexecdir=/usr/bin &&
sed s/"cross-compiling = yes"/"cross-compiling = no"/ \
config.make > config.make~ &&
mv config.make~ config.make &&
make &&
make install &&
make localedata/install-locales &&
logout
&c6-chrootcmd;
During the configure stage you will see the following warning:
configure: warning:
*** An auxiliary program is missing or too old;
*** some features will be disabled.
*** Check the INSTALL file for required versions.
This warning refers to the missing msgfmt program from the
gettext package, but it can safely be ignored in our case. The glibc
installation will not be affected.
The last two commands make you exit and re-enter the chroot'ed
environment. This is done to get rid of the "I have
no name!" message in the command prompt, which was caused by bash's
inability to resolve a userid to a username (which in turn was caused by
the missing Glibc installation).