glibc-inst.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Glibc installation</title>
  4. <para>The Glibc build system is very well self-contained and will install
  5. perfectly, even though our compiler specs file and linker scripts are still
  6. pointing at <filename>/stage1</filename>. We cannot adjust the specs and
  7. ldscripts before the Glibc install, because the Glibc autoconf tests would then
  8. give bogus results and thus defeat our goal of achieving a clean build.</para>
  9. <para>Apply the same patch as we used previously:</para>
  10. <para><screen><userinput>patch -Np1 -i ../glibc-2.3.2-sscanf-1.patch
  11. </userinput></screen></para>
  12. <para>The documentation that comes with Glibc recommends to build the package
  13. not in the source directory but in a separate, dedicated directory:</para>
  14. <para><screen><userinput>mkdir ../glibc-build
  15. cd ../glibc-build</userinput></screen></para>
  16. <para>Now prepare Glibc for compilation:</para>
  17. <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
  18. &nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
  19. &nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen></para>
  20. <para>The meaning of the configure options:</para>
  21. <itemizedlist>
  22. <listitem><para><userinput>--disable-profile</userinput>: This disables the
  23. building of the libraries with profiling information. Omit this option if you
  24. plan to do profiling.</para></listitem>
  25. <listitem><para><userinput>--enable-add-ons</userinput>: This enables any
  26. add-ons that we installed with Glibc, in our case Linuxthreads.</para></listitem>
  27. <listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will
  28. cause the <filename>pt_chown</filename> program to be installed in the
  29. <filename>/usr/bin</filename> directory.</para></listitem>
  30. <listitem><para><userinput>--with-headers=/usr/include</userinput>: This
  31. ensures that the kernel headers in <filename>/usr/include</filename> are used
  32. for this build. If you don't pass this switch then the headers from
  33. <filename>/stage1/include</filename> are used which of course is not ideal
  34. (although they should be identical). Using the switch has the advantage
  35. that you will be informed immediately should you have forgotten to install the
  36. kernel headers into <filename>/usr/include</filename>.</para></listitem>
  37. </itemizedlist>
  38. <para>Compile the package:</para>
  39. <para><screen><userinput>make</userinput></screen></para>
  40. <para>Test the results:</para>
  41. <para><screen><userinput>make check</userinput></screen></para>
  42. <para>And install the package:</para>
  43. <para><screen><userinput>make install</userinput></screen></para>
  44. <para>The locales that can make your system respond in a different language
  45. weren't installed by the above command. Do it with this:</para>
  46. <para><screen><userinput>make localedata/install-locales</userinput></screen></para>
  47. <para>An alternative to running the previous command is to install only those
  48. locales which you need or want. This can be achieved using the
  49. <userinput>localedef</userinput> command. Information on this can be found in
  50. the <filename>INSTALL</filename> file in the
  51. <filename>glibc-&glibc-version;</filename> tree.</para>
  52. <para>Finally, build the linuxthreads man pages:</para>
  53. <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man</userinput></screen></para>
  54. <para>And install these pages:</para>
  55. <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man install</userinput></screen></para>
  56. </sect2>