glibc-inst.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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>The documentation that comes with Glibc recommends to build the package
  10. not in the source directory but in a separate, dedicated directory:</para>
  11. <para><screen><userinput>mkdir ../glibc-build
  12. cd ../glibc-build</userinput></screen></para>
  13. <para>Now prepare Glibc for compilation:</para>
  14. <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
  15. &nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
  16. &nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen></para>
  17. <para>The meaning of the configure options:</para>
  18. <itemizedlist>
  19. <listitem><para><userinput>--disable-profile</userinput>: This disables the
  20. building of the libraries with profiling information. Omit this option if you
  21. plan to do profiling.</para></listitem>
  22. <listitem><para><userinput>--enable-add-ons</userinput>: This enables any
  23. add-ons that we installed with Glibc, in our case Linuxthreads.</para></listitem>
  24. <listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will
  25. cause the <filename>pt_chown</filename> program to be installed in the
  26. <filename>/usr/bin</filename> directory.</para></listitem>
  27. <listitem><para><userinput>--with-headers=/usr/include</userinput>: This
  28. ensures that the kernel headers in <filename>/usr/include</filename> are used
  29. for this build. If you don't pass this switch then the headers from
  30. <filename>/stage1/include</filename> are used which of course is not ideal
  31. (although they should be identical). Using the switch has the advantage
  32. that you will be informed immediately should you have forgotten to install the
  33. kernel headers into <filename>/usr/include</filename>.</para></listitem>
  34. </itemizedlist>
  35. <para>Compile the package:</para>
  36. <para><screen><userinput>make</userinput></screen></para>
  37. <para>Test the results:</para>
  38. <para><screen><userinput>make check</userinput></screen></para>
  39. <para>And install the package:</para>
  40. <para><screen><userinput>make install</userinput></screen></para>
  41. <para>The locales that can make your system respond in a different language
  42. weren't installed by the above command. Do it with this:</para>
  43. <para><screen><userinput>make localedata/install-locales</userinput></screen></para>
  44. <para>An alternative to running the previous command is to install only those
  45. locales which you need or want. This can be achieved using the
  46. <userinput>localedef</userinput> command. Information on this can be found in
  47. the <filename>INSTALL</filename> file in the
  48. <filename>glibc-&glibc-version;</filename> tree.</para>
  49. <para>Finally, build the linuxthreads man pages:</para>
  50. <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man</userinput></screen></para>
  51. <para>And install these pages:</para>
  52. <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man install</userinput></screen></para>
  53. </sect2>