glibc-pass2-inst.xml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <sect2>
  2. <title>Installation of Glibc</title>
  3. <para>At the beginning of this chapter you installed Glibc and applied a
  4. patch to it. Part of this patch was undoing some changes to make static
  5. binaries compiled against Glibc-2.2 work. However, this is not what the
  6. Glibc developers intended and we don't need to keep this modified Glibc
  7. around. So we reinstall Glibc here to remove this patch.</para>
  8. <para>A second reason to install Glibc again is because it's considered
  9. cleaner. The first Glibc was installed using programs compiled on your host
  10. distribution which sometimes has the effect of tainting Glibc. While this
  11. isn't a problem with the other packages compiled early in this chapter, for
  12. Glibc we want to be sure it's 100% OK (although feel free to reinstall
  13. other packages at this point so you can say you compiled an LFS system with
  14. LFS. Much like GCC's bootstrap installation method).</para>
  15. <para>We'll also install the linuxthreads man pages here. As you may
  16. recall, during the first installation of Glibc this wasn't possible because
  17. Perl wasn't installed yet. Everything we need to install the Glibc
  18. linuxthread man pages is present now, so we'll take care of this too
  19. now.</para>
  20. <para>Before starting to install glibc, you must cd into the
  21. glibc-&glibc-version; directory and unpack glibc-linuxthreads inside
  22. the glibc-&glibc-version; directory, not in /usr/src as you normally
  23. would do.</para>
  24. <para>This package is known to behave badly when you have changed its
  25. default optimization flags (including the -march and -mcpu options). Glibc
  26. is best left alone. Therefore, if you have defined any environment variables
  27. that override default optimizations, such as CFLAGS and CXXFLAGS, we
  28. recommend unsetting or modifying them when building Glibc. You have
  29. been warned.</para>
  30. <para>Basically, compiling Glibc in any other way than the book suggests
  31. is putting your system at very high risk.</para>
  32. <para>Install Glibc by running the following commands:</para>
  33. <para><screen><userinput>mkdir ../glibc-build &amp;&amp;
  34. cd ../glibc-build &amp;&amp;
  35. ../glibc-&glibc-version;/configure --prefix=/usr --disable-profile \
  36. &nbsp;&nbsp;&nbsp;&nbsp;--enable-add-ons --libexecdir=/usr/bin &amp;&amp;
  37. make &amp;&amp;
  38. make install &amp;&amp;
  39. make -C ../glibc-&glibc-version;/linuxthreads/man &amp;&amp;
  40. make -C ../glibc-&glibc-version;/linuxthreads/man install &amp;&amp;
  41. exec /bin/bash --login</userinput></screen></para>
  42. </sect2>