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