| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | <sect2><title>Installation of Glibc</title><para>This package requires its patch to be applied before you caninstall it.</para><para>Before starting to install glibc, you must cd into theglibc-&glibc-version; directory and unpack glibc-linuxthreads insidethe glibc-&glibc-version; directory, not in /usr/src as you normallywould do.</para><para>This package is known to behave badly when you have changed itsdefault optimization flags (including the -march and -mcpu options). Glibcis best left alone. Therefore, if you have defined any environment variablesthat override default optimizations, such as CFLAGS and CXXFLAGS, werecommend unsetting or modifying them when building Glibc. You havebeen warned.</para><para>Basically, compiling Glibc in any other way than the book suggestsis putting your system at very high risk.</para><para>Install Glibc by running the following commands:</para><para><screen><userinput>patch -Np1 -i ../glibc-&glibc-patch-version;.patch &&touch /etc/ld.so.conf &&mkdir ../glibc-build &&cd ../glibc-build &&../glibc-&glibc-version;/configure --prefix=/usr --disable-profile \    --enable-add-ons --libexecdir=/usr/bin &&echo "cross-compiling = no" > configparms &&make &&make install &&make localedata/install-locales &&exec /static/bin/bash --login</userinput></screen></para><para>An alternative to running <userinput>makelocaledata/install-locales</userinput> is to only install those localeswhich you need or want. This can be achieved using the localedefcommand. Information on this can be found in the INSTALLfile in the glibc-&glibc-version; tree. One thing to note is that the<userinput>localedef</userinput> program assumes that the <filenameclass="directory">/usr/lib/locale</filename> directory exists, so you needto create it first.</para><para>The Linux Threads man pages are not going to be installed at thispoint because it requires a working Perl installation. We'll install Perllater on in this chapter, so we'll come back to the Linux Threads man pageinstallation after that.</para><para>During the configure stage you will see the following warning:</para><blockquote><screen>configure: warning:*** These auxiliary programs are missing or too old: msgfmt*** some features will be disabled.*** Check the INSTALL file for required versions.</screen></blockquote><para>The missing msgfmt (from the gettext package which we will installlater in this chapter) won't cause any problems. msgfmt is used to generatethe binary translation files that are used to make your system talk in adifferent language. Because these translation files have already beengenerated for you, there is no need for msgfmt. You'd only need msgfmt ifyou change the translation source files (the <filename>*.po</filename>files in the <filename class="directory">po</filename> subdirectory) whichwould require you to re-generate the binary files.</para></sect2>
 |