glibc.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-tools-glibc" role="wrap">
  7. <title>Glibc-&glibc-version;</title>
  8. <?dbhtml filename="glibc.html"?>
  9. <indexterm zone="ch-tools-glibc">
  10. <primary sortas="a-Glibc">Glibc</primary>
  11. <secondary>tools</secondary></indexterm>
  12. <sect2 role="package"><title/>
  13. <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
  14. <segmentedlist>
  15. <segtitle>&buildtime;</segtitle>
  16. <segtitle>&diskspace;</segtitle>
  17. <seglistitem><seg>11.8 SBU</seg><seg>454 MB</seg></seglistitem>
  18. </segmentedlist>
  19. <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
  20. </sect2>
  21. <sect2 role="installation">
  22. <title>Installation of Glibc</title>
  23. <para>The Glibc documentation recommends building Glibc outside of the source
  24. directory in a dedicated build directory:</para>
  25. <screen><userinput>mkdir -v ../glibc-build
  26. cd ../glibc-build</userinput></screen>
  27. <para>Next, prepare Glibc for compilation:</para>
  28. <screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
  29. --disable-profile --enable-add-ons \
  30. --enable-kernel=2.6.0 --with-binutils=/tools/bin \
  31. --without-gd --with-headers=/tools/include \
  32. --without-selinux</userinput></screen>
  33. <para>The meaning of the configure options:</para>
  34. <variablelist>
  35. <varlistentry>
  36. <term><parameter>--disable-profile</parameter></term>
  37. <listitem><para>This builds the libraries without profiling
  38. information. Omit this option if profiling on the temporary tools is
  39. necessary.</para></listitem>
  40. </varlistentry>
  41. <varlistentry>
  42. <term><parameter>--enable-add-ons</parameter></term>
  43. <listitem><para>This tells Glibc to use the NPTL add-on as its threading
  44. library.</para></listitem>
  45. </varlistentry>
  46. <varlistentry>
  47. <term><parameter>--enable-kernel=2.6.0</parameter></term>
  48. <listitem><para>This tells Glibc to compile the library with support
  49. for 2.6.x Linux kernels.</para></listitem>
  50. </varlistentry>
  51. <varlistentry>
  52. <term><parameter>--with-binutils=/tools/bin</parameter></term>
  53. <listitem><para>While not required, this switch ensures that there are
  54. no errors pertaining to which Binutils programs get used during the
  55. Glibc build.</para></listitem>
  56. </varlistentry>
  57. <varlistentry>
  58. <term><parameter>--without-gd</parameter></term>
  59. <listitem><para>This prevents the build of the
  60. <command>memusagestat</command> program, which insists on linking
  61. against the host's libraries (libgd, libpng, libz,
  62. etc.).</para></listitem>
  63. </varlistentry>
  64. <varlistentry>
  65. <term><parameter>--with-headers=/tools/include</parameter></term>
  66. <listitem><para>This tells Glibc to compile itself against the headers recently
  67. installed to the tools directory, so that it knows exactly what features the
  68. kernel has and can optimize itself accordingly.</para></listitem>
  69. </varlistentry>
  70. <varlistentry>
  71. <term><parameter>--without-selinux</parameter></term>
  72. <listitem><para>When building from hosts that include SELinux functionality
  73. (e.g., Fedora Core 3), Glibc will build with support for SELinux. As the LFS
  74. tools environment does not contain support for SELinux, a Glibc compiled with
  75. such support will fail to operate correctly.</para></listitem>
  76. </varlistentry>
  77. </variablelist>
  78. <para>During this stage the following warning might appear:</para>
  79. <blockquote><screen><computeroutput>configure: WARNING:
  80. *** These auxiliary programs are missing or
  81. *** incompatible versions: msgfmt
  82. *** some features will be disabled.
  83. *** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
  84. <para>The missing or incompatible <command>msgfmt</command> program is
  85. generally harmless, but it can sometimes cause issues when running the
  86. test suite. This <command>msgfmt</command> program is part of the
  87. Gettext package which the host distribution should provide. If
  88. <command>msgfmt</command> is present but deemed incompatible, upgrade
  89. the host system's Gettext package or continue without it and see if
  90. the test suite runs without problems regardless.</para>
  91. <para>Compile the package:</para>
  92. <screen><userinput>make</userinput></screen>
  93. <para>Compilation is now complete. As mentioned earlier, running the
  94. test suites for the temporary tools installed in this chapter is not
  95. mandatory. To run the Glibc test suite (if desired), the following
  96. command will do so:</para>
  97. <screen><userinput>make check</userinput></screen>
  98. <para>For a discussion of test failures that are of particular
  99. importance, please see <xref linkend="ch-system-glibc" role="."/></para>
  100. <para>In this chapter, some tests can be adversely affected by
  101. existing tools or environmental issues on the host system. Glibc test
  102. suite failures in this chapter are typically not worrisome. The Glibc
  103. installed in <xref linkend="chapter-building-system"/> is the one that
  104. will ultimately end up being used, so that is the one that needs to pass
  105. most tests (even in <xref linkend="chapter-building-system"/>, some
  106. failures could still occur, for example, with the math tests).</para>
  107. <para>When experiencing a failure, make a note of it, then continue by
  108. reissuing the <command>make check</command> command. The test suite should pick up where it left
  109. off and continue. This stop-start sequence can be circumvented by
  110. issuing a <command>make -k check</command> command. If using this option, be sure to log the
  111. output so that the log file can be examined for failures later.</para>
  112. <para>The install stage of Glibc will issue a harmless warning at the
  113. end about the absence of <filename>/tools/etc/ld.so.conf</filename>.
  114. Prevent this warning with:</para>
  115. <screen><userinput>mkdir -v /tools/etc
  116. touch /tools/etc/ld.so.conf</userinput></screen>
  117. <para>Install the package:</para>
  118. <screen><userinput>make install</userinput></screen>
  119. <para>Different countries and cultures have varying conventions for
  120. how to communicate. These conventions range from the format for
  121. representing dates and times to more complex issues, such as the
  122. language spoken. The <quote>internationalization</quote> of GNU
  123. programs works by locale.</para>
  124. <note><para>If the test suites are not being run in this chapter (as
  125. per the recommendation), there is no need to install the locales now.
  126. The appropriate locales will be installed in the next
  127. chapter. To install the Glibc locales anyway, use instructions from
  128. <xref linkend="ch-system-glibc" role="."/>
  129. </para></note>
  130. </sect2>
  131. <sect2 role="content"><title/>
  132. <para>Details on this package are located in <xref
  133. linkend="contents-glibc" role="."/></para>
  134. </sect2>
  135. </sect1>