| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 | <sect2><title> </title><para> </para></sect2><sect2><title>Glibc installation</title><para>The Glibc build system is very well self-contained and will installperfectly, even though our compiler specs file and linker are still pointingat <filename>/tools</filename>. We cannot adjust the specs and linker beforethe Glibc install, because the Glibc autoconf tests would then give bogusresults and thus defeat our goal of achieving a clean build.</para><note><para>The test suite for Glibc in this section is considered<emphasis>critical</emphasis>. Our advice is to not skip it under anycircumstance.</para></note><para>Before starting to build Glibc, remember to unpack the Glibc-linuxthreadsagain inside the <filename>glibc-&glibc-version;</filename> directory, and tounset any environment variables that override the default optimizationflags.</para><para>Then apply the same patch we used previously:</para>                                                                                <para><screen><userinput>patch -Np1 -i ../glibc-&glibc-sscanf-patch-version;.patch</userinput></screen></para><para>The Glibc documentation recommends building Glibc outside of the sourcedirectory in a dedicated build directory:</para><para><screen><userinput>mkdir ../glibc-buildcd ../glibc-build</userinput></screen></para><para>Now prepare Glibc for compilation:</para><para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \    --disable-profile --enable-add-ons \    --libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen></para><para>The meaning of the new configure options:</para><itemizedlist><listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This willcause the <filename>pt_chown</filename> program to be installed in the<filename>/usr/bin</filename> directory.</para></listitem><listitem><para><userinput>--with-headers=/usr/include</userinput>: Thisensures that the kernel headers in <filename>/usr/include</filename> are usedfor this build. If you don't pass this switch then the headers from<filename>/tools/include</filename> are used which of course is not ideal(although they should be identical). Using this switch has the advantagethat you will be informed immediately should you have forgotten to install thekernel headers into <filename>/usr/include</filename>.</para></listitem></itemizedlist><para>Compile the package:</para><para><screen><userinput>make</userinput></screen></para><para>Test the results:</para><para><screen><userinput>make check</userinput></screen></para><para>The test suite notes from the "Installing Glibc" section in Chapter 5 arestill very much appropriate here. Be sure to refer back there should you haveany doubts.</para><para>And install the package:</para><para><screen><userinput>make install</userinput></screen></para><para>The locales that can make your system respond in a different languageweren't installed by the above command. Do it with this:</para><para><screen><userinput>make localedata/install-locales</userinput></screen></para><para>An alternative to running the previous command is to install only thoselocales which you need or want. This can be achieved using the<userinput>localedef</userinput> command. Information on this can be found inthe <filename>INSTALL</filename> file in the<filename>glibc-&glibc-version;</filename> tree. However,  there are a numberof locales that are essential for the tests of future packages to passcorrectly. The following instructions, in place of the install-localescommand above, will install the minimum set of locales necessary for thetests to run successfully:</para><para><screen><userinput>mkdir -p /usr/lib/localelocaledef -i de_DE -f ISO-8859-1 de_DElocaledef -i de_DE@euro -f ISO-8859-15 de_DE@eurolocaledef -i en_HK -f ISO-8859-1 en_HKlocaledef -i en_PH -f ISO-8859-1 en_PHlocaledef -i en_US -f ISO-8859-1 en_USlocaledef -i es_MX -f ISO-8859-1 es_MXlocaledef -i fr_FR -f ISO-8859-1 fr_FRlocaledef -i fr_FR@euro -f ISO-8859-15 fr_FR@eurolocaledef -i it_IT -f ISO-8859-1 it_ITlocaledef -i ja_JP -f EUC-JP ja_JP</userinput></screen></para><para>Finally, build the linuxthreads man pages:</para><para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man</userinput></screen></para><para>And install these pages:</para><para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man install</userinput></screen></para></sect2>
 |