source: chapter06/glibc-pass2-inst.xml@ da849d1

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 12.2 12.2-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk v4_1 v5_0 v5_1 v5_1_1 xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/loongarch-12.2 xry111/mips64el xry111/multilib xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since da849d1 was 86bea76, checked in by Timothy Bauscher <timothy@…>, 22 years ago

Last package conversion - second Glibc.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2387 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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