glibc-inst.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <sect2>
  2. <title>Installation of Glibc</title>
  3. <para>Before starting to install glibc, unpack the glibc-2.2.3-nss.diff
  4. file in the $LFS/usr/src tree. Then, once glibc has been unpacked as usual
  5. and you have cd'ed into the
  6. glibc-&glibc-version; directory, unpack glibc-linuxthreads inside
  7. the glibc-&glibc-version; directory, not in /usr/src as you normally
  8. would do.</para>
  9. <para>Install Glibc by running the following commands:</para>
  10. <para><screen><userinput>patch -Np0 -i ../glibc-2.2.3-nss.diff &amp;&amp;</userinput>
  11. <userinput>mknod -m 0666 /dev/null c 1 3 &amp;&amp;</userinput>
  12. <userinput>touch /etc/ld.so.conf &amp;&amp;</userinput>
  13. <userinput>mkdir ../glibc-build &amp;&amp;</userinput>
  14. <userinput>cd ../glibc-build &amp;&amp;</userinput>
  15. <userinput>sed s/"\$(PERL)"/"\/usr\/bin\/perl"/ \</userinput>
  16. <userinput>&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/malloc/Makefile &gt; tmp~ &amp;&amp;</userinput>
  17. <userinput>mv tmp~ ../glibc-&glibc-version;/malloc/Makefile &amp;&amp;</userinput>
  18. <userinput>sed "s/root/0/" ../glibc-&glibc-version;/login/Makefile &gt; tmp~ &amp;&amp;</userinput>
  19. <userinput>mv tmp~ ../glibc-&glibc-version;/login/Makefile &amp;&amp;</userinput>
  20. <userinput>../glibc-&glibc-version;/configure \</userinput>
  21. <userinput>&nbsp;&nbsp;&nbsp;--prefix=/usr --enable-add-ons \</userinput>
  22. <userinput>&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin &amp;&amp;</userinput>
  23. <userinput>sed s/"cross-compiling = yes"/"cross-compiling = no"/ \</userinput>
  24. <userinput>&nbsp;&nbsp;&nbsp;config.make &gt; config.make~ &amp;&amp;</userinput>
  25. <userinput>mv config.make~ config.make &amp;&amp;</userinput>
  26. <userinput>make &amp;&amp;</userinput>
  27. <userinput>make install &amp;&amp;</userinput>
  28. <userinput>make localedata/install-locales &amp;&amp;</userinput>
  29. <userinput>logout</userinput>
  30. &c6-chrootcmd;</screen></para>
  31. <para>During the configure stage you will see the following warning:</para>
  32. <blockquote><screen>configure: warning:
  33. *** An auxiliary program is missing or too old;
  34. *** some features will be disabled.
  35. *** Check the INSTALL file for required versions.</screen></blockquote>
  36. <para> This warning refers to the missing msgfmt program from the
  37. gettext package, but it can safely be ignored in our case. The glibc
  38. installation will not be affected.</para>
  39. <para>The last two commands make you exit and re-enter the chroot'ed
  40. environment. This is done to get rid of the "I have
  41. no name!" message in the command prompt, which was caused by bash's
  42. inability to resolve a userid to a username (which in turn was caused by
  43. the missing Glibc installation).</para>
  44. </sect2>