glibc-inst.sgml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <sect2>
  2. <title>Installation of Glibc</title>
  3. <para>
  4. Unpack the glibc-crypt and glibc-linuxthreads in the glibc-2.1.3
  5. directory, not in $LFS/usr/src. Don't enter the created directories. Just
  6. unpack them and leave it with that.
  7. </para>
  8. <para>
  9. A few default parameters of Glibc need to be changed, such as the
  10. directory where the shared libraries are supposed to be installed in and
  11. the directory that contains the system configuration files. For this
  12. purpose you need to create the <filename class="directory">
  13. $LFS/usr/src/glibc-build</filename> directory and cd into that directory
  14. with:
  15. </para>
  16. <blockquote><literallayout>
  17. <userinput>mkdir $LFS/usr/src/glibc-build &amp;&amp;</userinput>
  18. <userinput>cd $LFS/usr/src/glibc-build</userinput>
  19. </literallayout></blockquote>
  20. <para>
  21. In that directory you create a new file <filename>configparms</filename>
  22. by running the following:
  23. </para>
  24. <literallayout>
  25. <userinput>cat &gt; configparms &lt;&lt; "EOF"</userinput>
  26. # Begin configparms
  27. slibdir=/lib
  28. sysconfdir=/etc
  29. # End configparms
  30. <userinput>EOF</userinput>
  31. </literallayout>
  32. <para>
  33. Before we actually install Glibc you need to unpack the Glibc patch
  34. file.
  35. </para>
  36. <para>
  37. Please note that the configure script of Glibc may complain about
  38. certain files in the /usr/include directory being too old and will be
  39. replaced, or that some symlink is not supposed to be there anymore (like
  40. the /usr/include/scsi symlink that's present on older Linux systems). If
  41. it asks you to move a symlink like scsi out of the way, please do so. If
  42. it says it will replace old files by the newer Glibc files you can
  43. ignore that. Glibc does not know that it will end up on $LFS when the
  44. configure script is run.
  45. </para>
  46. <para>
  47. If your system had already a suitable GCC version installed, change to the
  48. <filename class="directory">$LFS/usr/src/glibc-build</filename>
  49. directory and install Glibc by running the following
  50. commands:
  51. </para>
  52. <blockquote><literallayout>
  53. <userinput>cd ../glibc-2.1.3 &amp;&amp;</userinput>
  54. <userinput>patch -Np1 -i ../glibc-2.1.3.patch &amp;&amp;</userinput>
  55. <userinput>cd $LFS/usr/src/glibc-build &amp;&amp;</userinput>
  56. <userinput>../glibc-2.1.3/configure \</userinput>
  57. <userinput>&nbsp;&nbsp;&nbsp;--prefix=/usr --enable-add-ons
  58. \</userinput>
  59. <userinput>&nbsp;&nbsp;&nbsp;--with-headers=$LFS/usr/include
  60. \</userinput>
  61. <userinput>&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin &amp;&amp;
  62. </userinput>
  63. <userinput>make &amp;&amp;</userinput>
  64. <userinput>make install_root=$LFS install &amp;&amp;</userinput>
  65. <userinput>make install_root=$LFS localedata/install-locales</userinput>
  66. </literallayout></blockquote>
  67. <para>
  68. If your system didn't have a suitable GCC version installed, change to the
  69. <filename class="directory">$LFS/usr/src/glibc-build</filename>
  70. directory and install Glibc using the gcc-2.95.2.1 you just installed by
  71. running the following commands:
  72. </para>
  73. <blockquote><literallayout>
  74. <userinput>cd ../glibc-2.1.3 &amp;&amp;</userinput>
  75. <userinput>patch -Np1 -i ../glibc-2.1.3.patch &amp;&amp;</userinput>
  76. <userinput>cd $LFS/usr/src/glibc-build &amp;&amp;</userinput>
  77. <userinput>CC=/usr/local/gcc2952/bin/gcc \</userinput>
  78. <userinput>&nbsp;&nbsp;&nbsp;../glibc-2.1.3/configure --prefix=/usr
  79. --enable-add-ons \</userinput>
  80. <userinput>&nbsp;&nbsp;&nbsp;--with-headers=$LFS/usr/include \
  81. </userinput>
  82. <userinput>&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin &amp;&amp;
  83. </userinput>
  84. <userinput>make &amp;&amp;</userinput>
  85. <userinput>make install_root=$LFS install &amp;&amp;</userinput>
  86. <userinput>make install_root=$LFS localedata/install-locales</userinput>
  87. </literallayout></blockquote>
  88. </sect2>