glibc-inst.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <sect2>
  2. <title>Installation of Glibc</title>
  3. <para>This package requires its patch to be applied before you can
  4. install it. Make sure it's unpacked before running the installation
  5. commands.</para>
  6. <para>Before starting to install glibc, you must cd into the
  7. glibc-&glibc-version; directory and unpack glibc-linuxthreads inside
  8. the glibc-&glibc-version; directory, not in /usr/src as you normally
  9. would do.</para>
  10. <para>This package is known to behave badly when you have changed its
  11. default optimization flags (including the -march and -mcpu options). Glibc
  12. is best left alone. Therefore, if you have defined any environment variables
  13. that override default optimizations, such as CFLAGS and CXXFLAGS, we
  14. recommend unsetting or modifying them when building Glibc. You have
  15. been warned.</para>
  16. <para>Also, don't pass the --enable-kernel option to the configure
  17. script. It's known to cause segmentation faults when other packages like
  18. fileutils, make and tar are linked against it.</para>
  19. <para>Basically, compiling Glibc in any other way than the book suggests
  20. is putting your system at very high risk.</para>
  21. <para>Install Glibc by running the following commands:</para>
  22. <para><screen><userinput>patch -Np1 -i ../glibc-&glibc-patch-version;.patch &amp;&amp;
  23. touch /etc/ld.so.conf &amp;&amp;
  24. mkdir ../glibc-build &amp;&amp;
  25. cd ../glibc-build &amp;&amp;
  26. ../glibc-&glibc-version;/configure --prefix=/usr --disable-profile \
  27. &nbsp;&nbsp;&nbsp;&nbsp;--enable-add-ons --libexecdir=/usr/bin &amp;&amp;
  28. echo "cross-compiling = no" &gt; configparms &amp;&amp;
  29. make &amp;&amp;
  30. make install &amp;&amp;
  31. make localedata/install-locales &amp;&amp;
  32. exec /static/bin/bash --login</userinput></screen></para>
  33. <para>An alternative to running <userinput>make
  34. localedata/install-locales</userinput> is to only install those locales
  35. which you need or want. This can be achieved using the localedef
  36. command. Information on this can be found in the INSTALL
  37. file in the glibc-&glibc-version; tree. One thing to note is that the
  38. <userinput>localedef</userinput> program assumes that the <filename
  39. class="directory">/usr/lib/locale</filename> directory exists, so you need
  40. to create it first.</para>
  41. <para>The Linux Threads man pages are not going to be installed at this
  42. point because it requires a working Perl installation. We'll install Perl
  43. later on in this chapter, so we'll come back to the Linux Threads man page
  44. installation after that.</para>
  45. <para>During the configure stage you will see the following warning:</para>
  46. <blockquote><screen>configure: warning:
  47. *** These auxiliary programs are missing or too old: msgfmt
  48. *** some features will be disabled.
  49. *** Check the INSTALL file for required versions.</screen></blockquote>
  50. <para>The missing msgfmt (from the gettext package which we will install
  51. later in this chapter) won't cause any problems. msgfmt is used to generate
  52. the binary translation files that are used to make your system talk in a
  53. different language. Because these translation files have already been
  54. generated for you, there is no need for msgfmt. You'd only need msgfmt if
  55. you change the translation source files (the <filename>*.po</filename>
  56. files in the <filename class="directory">po</filename> subdirectory) which
  57. would require you to re-generate the binary files.</para>
  58. </sect2>