From 96e0ac7d03930da807c04c30469c004c830c4a84 Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Wed, 27 Aug 2003 21:29:30 +0000 Subject: Updated chapter 6 Glibc installation from pure-lfs hint. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2684 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/glibc-inst.xml | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index a55ad8e94..402013b12 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -3,19 +3,25 @@ Glibc installation +The Glibc build system is very well self-contained and will install +perfectly, even though our compiler specs file and linker scripts are still +pointing at /stage1. We cannot adjust the specs and +ldscripts before the Glibc install, because the Glibc autoconf tests would then +give bogus results and thus defeat our goal of achieving a clean build. + The documentation that comes with Glibc recommends to build the package not in the source directory but in a separate, dedicated directory: mkdir ../glibc-build cd ../glibc-build -Next, prepare Glibc to be compiled: +Now prepare Glibc for compilation: ../glibc-&glibc-version;/configure --prefix=/usr \     --disable-profile --enable-add-ons \     --libexecdir=/usr/bin --with-headers=/usr/include -The meaning of the configure options are: +The meaning of the configure options: --disable-profile: This disables the @@ -28,38 +34,44 @@ add-ons that we installed with Glibc, in our case Linuxthreads.--libexecdir=/usr/bin: This will cause the pt_chown program to be installed in the /usr/bin directory. + +--with-headers=/usr/include: This +ensures that the kernel headers in /usr/include are used +for this build. If you don't pass this switch then the headers from +/stage1/include are used which of course is not ideal +(although they should be identical). Using the switch has the advantage +that you will be informed immediately should you have forgotten to install the +kernel headers into /usr/include. -Continue with compiling the package: +Compile the package: make -We'll continue with installing the package. The Linuxthreads man -pages are not going to be installed at this point because it requires a -working Perl installation. We'll install Perl later on in this chapter, -and the man pages will be installed when Glibc is installed for the second -time at the end of this chapter. +Check the results: make check +And install the package: + make install -The locales (used by Glibc to make your Linux system talk in a different -language) weren't installed when you ran the previous command, so we have to -do that ourselves now: +The locales that can make your system respond in a different language +weren't installed by the above command. Do it with this: make localedata/install-locales An alternative to running the previous command is to install only those -locales which you need or want. This can be achieved using the localedef -command. Information on this can be found in the INSTALL -file in the glibc-&glibc-version; tree. +locales which you need or want. This can be achieved using the +localedef command. Information on this can be found in +the INSTALL file in the +glibc-&glibc-version; tree. -Build the linuxthreads man pages: +Finally, build the linuxthreads man pages: make -C ../glibc-2.3.2/linuxthreads/man -Install the man pages: +And install these pages: make -C ../glibc-2.3.2/linuxthreads/man install -- cgit v1.2.3-54-g00ecf