1 | <sect2>
|
---|
2 | <title>Installation of Glibc</title>
|
---|
3 |
|
---|
4 | <para>Before starting to install glibc, you must cd into the
|
---|
5 | glibc-&glibc-version; directory and unpack glibc-linuxthreads inside
|
---|
6 | the glibc-&glibc-version; directory, not in /usr/src as you normally
|
---|
7 | would do.</para>
|
---|
8 |
|
---|
9 | <para>This package is known to behave badly when you have changed its default
|
---|
10 | optimization flags (including the -march and -mcpu options). Glibc is
|
---|
11 | best left alone, so we recommend you unsetting CFLAGS, CXXFLAGS and other
|
---|
12 | such variables/settings that would change the default optimization that
|
---|
13 | it comes with. Also, don't pass the --enable-kernel option to the configure
|
---|
14 | script. It's known to cause segmentation faults when other packages like
|
---|
15 | fileutils, make and tar are linked against it.</para>
|
---|
16 |
|
---|
17 | <para>Basically, compiling Glibc in any other way than the book suggests
|
---|
18 | is putting your system at very high risk.</para>
|
---|
19 |
|
---|
20 | <para>Install Glibc by running the following commands:</para>
|
---|
21 |
|
---|
22 | <para><screen><userinput>mknod -m 0666 /dev/null c 1 3 &&
|
---|
23 | touch /etc/ld.so.conf &&
|
---|
24 | cp malloc/Makefile malloc/Makefile.backup &&
|
---|
25 | sed 's%\$(PERL)%/usr/bin/perl%' malloc/Makefile.backup > malloc/Makefile &&
|
---|
26 | cp login/Makefile login/Makefile.backup &&
|
---|
27 | sed 's/root/0/' login/Makefile.backup > login/Makefile &&
|
---|
28 | mkdir ../glibc-build &&
|
---|
29 | cd ../glibc-build &&
|
---|
30 | ../glibc-&glibc-version;/configure --prefix=/usr \
|
---|
31 | --enable-add-ons --libexecdir=/usr/bin &&
|
---|
32 | echo "cross-compiling = no" > configparms &&
|
---|
33 | make &&
|
---|
34 | make install &&
|
---|
35 | make localedata/install-locales &&
|
---|
36 | exec /bin/bash --login</userinput></screen></para>
|
---|
37 |
|
---|
38 | <para>An alternative to running <userinput>make
|
---|
39 | localedata/install-locales</userinput> is to only install those locales
|
---|
40 | which you need or want. This can be achieved using the localedef
|
---|
41 | command. Information on this can be found in the INSTALL
|
---|
42 | file in the glibc-&glibc-version; tree.</para>
|
---|
43 |
|
---|
44 | <para>During the configure stage you will see the following warning:</para>
|
---|
45 |
|
---|
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 |
|
---|
51 | <para>The missing msgfmt (from the gettext package which we will install
|
---|
52 | later in this chapter) won't cause any problems. msgfmt is used to generate
|
---|
53 | the binary translation files that are used to make your system talk in a
|
---|
54 | different language. Because these translation files have already been
|
---|
55 | generated for you, there is no need for msgfmt. You'd only need msgfmt if
|
---|
56 | you change the translation source files (the <filename>*.po</filename>
|
---|
57 | files in the <filename class="directory">po</filename> subdirectory) which\
|
---|
58 | would require you to re-generate the binary files.</para>
|
---|
59 |
|
---|
60 | </sect2>
|
---|
61 |
|
---|