source: chapter06/glibc-pass2-inst.xml@ 2b114b25

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 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/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 2b114b25 was 2b114b25, checked in by Gerard Beekmans <gerard@…>, 21 years ago

textual changes

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

  • Property mode set to 100644
File size: 3.0 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. Now that everything needed to install the Glibc
23linuxthreads man pages is present as well, we will install those too.</para>
24
25<para>Before starting to install Glibc, you must cd into the
26glibc-&glibc-version; directory and unpack glibc-linuxthreads inside
27the glibc-&glibc-version; directory, not in /usr/src as you normally
28would do.</para>
29
30<para>This package is known to behave badly when you have changed its
31default optimization flags (including the -march and -mcpu options).
32Therefore, if you have defined any environment variables that override
33default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
34or modifying them when building Glibc. You have been warned.</para>
35
36<para>Basically, compiling Glibc in any other way than the book suggests
37is putting your system at very high risk.</para>
38
39<para>It is recommended by the Glibc installation documentation to build
40Glibc outside of the source tree. Create the build directory:</para>
41
42<para><screen><userinput>mkdir ../glibc-build &amp;&amp;
43cd ../glibc-build</userinput></screen></para>
44
45<para>Next, prepare Glibc to be compiled:</para>
46
47<para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr --disable-profile \
48&nbsp;&nbsp;&nbsp;&nbsp;--enable-add-ons --libexecdir=/usr/bin</userinput></screen></para>
49
50<para>Continue with compiling the package:</para>
51
52<para><screen><userinput>make</userinput></screen></para>
53
54<para>Begin package installation:</para>
55
56<para><screen><userinput>make install</userinput></screen></para>
57
58<para>Build the linuxthreads man pages:</para>
59
60<para><screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man</userinput></screen></para>
61
62<para>Install the man pages:</para>
63
64<para><screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man install</userinput></screen></para>
65
66<para>Complete package installation by relaunching bash:</para>
67
68<para><screen><userinput>exec /bin/bash --login</userinput></screen></para>
69
70</sect2>
71
Note: See TracBrowser for help on using the repository browser.