1 | <sect2>
|
---|
2 | <title>Installation of Glibc</title>
|
---|
3 |
|
---|
4 | <para>
|
---|
5 | Unpack the glibc-crypt and glibc-linuxthreads in the glibc-2.1.3
|
---|
6 | directory, not in $LFS/usr/src. Don't enter the created directories. Just
|
---|
7 | unpack them and leave it with that.
|
---|
8 | </para>
|
---|
9 |
|
---|
10 | <para>
|
---|
11 | A few default parameters of Glibc need to be changed, such as the
|
---|
12 | directory where the shared libraries are supposed to be installed in and
|
---|
13 | the directory that contains the system configuration files. For this
|
---|
14 | purpose you need to create the <filename class="directory">
|
---|
15 | $LFS/usr/src/glibc-build</filename> directory and cd into that directory
|
---|
16 | with:
|
---|
17 | </para>
|
---|
18 |
|
---|
19 | <blockquote><literallayout>
|
---|
20 |
|
---|
21 | <userinput>mkdir $LFS/usr/src/glibc-build &&</userinput>
|
---|
22 | <userinput>cd $LFS/usr/src/glibc-build</userinput>
|
---|
23 |
|
---|
24 | </literallayout></blockquote>
|
---|
25 |
|
---|
26 | <para>
|
---|
27 | In that directory you create a new file <filename>configparms</filename>
|
---|
28 | by running the following:
|
---|
29 | </para>
|
---|
30 |
|
---|
31 | <literallayout>
|
---|
32 |
|
---|
33 | <userinput>cat > configparms << "EOF"</userinput>
|
---|
34 | # Begin configparms
|
---|
35 |
|
---|
36 | slibdir=/lib
|
---|
37 | sysconfdir=/etc
|
---|
38 |
|
---|
39 | # End configparms
|
---|
40 | <userinput>EOF</userinput>
|
---|
41 |
|
---|
42 | </literallayout>
|
---|
43 |
|
---|
44 | <para>
|
---|
45 | Before we actually install Glibc you need to unpack the Glibc patch
|
---|
46 | file.
|
---|
47 | </para>
|
---|
48 |
|
---|
49 | <para>
|
---|
50 | Please note that the configure script of Glibc may complain about
|
---|
51 | certain files in the /usr/include directory being too old and will be
|
---|
52 | replaced, or that some symlink is not supposed to be there anymore (like
|
---|
53 | the /usr/include/scsi symlink that's present on older Linux systems). If
|
---|
54 | it asks you to move a symlink like scsi out of the way, please do so. If
|
---|
55 | it says it will replace old files by the newer Glibc files you can
|
---|
56 | ignore that. Glibc does not know that it will end up on $LFS when the
|
---|
57 | configure script is run.
|
---|
58 | </para>
|
---|
59 |
|
---|
60 | <para>
|
---|
61 | If your system had already a suitable GCC version installed, change to the
|
---|
62 | <filename class="directory">$LFS/usr/src/glibc-build</filename>
|
---|
63 | directory and install Glibc by running the following
|
---|
64 | commands:
|
---|
65 | </para>
|
---|
66 |
|
---|
67 | <blockquote><literallayout>
|
---|
68 |
|
---|
69 | <userinput>cd ../glibc-2.1.3 &&</userinput>
|
---|
70 | <userinput>patch -Np1 -i ../glibc-2.1.3.patch &&</userinput>
|
---|
71 | <userinput>cd $LFS/usr/src/glibc-build &&</userinput>
|
---|
72 | <userinput>../glibc-2.1.3/configure \</userinput>
|
---|
73 | <userinput> --prefix=/usr --enable-add-ons
|
---|
74 | \</userinput>
|
---|
75 | <userinput> --with-headers=$LFS/usr/include
|
---|
76 | \</userinput>
|
---|
77 | <userinput> --libexecdir=/usr/bin &&
|
---|
78 | </userinput>
|
---|
79 | <userinput>make &&</userinput>
|
---|
80 | <userinput>make install_root=$LFS install &&</userinput>
|
---|
81 | <userinput>make install_root=$LFS localedata/install-locales</userinput>
|
---|
82 |
|
---|
83 | </literallayout></blockquote>
|
---|
84 |
|
---|
85 | <para>
|
---|
86 | If your system didn't have a suitable GCC version installed, change to the
|
---|
87 | <filename class="directory">$LFS/usr/src/glibc-build</filename>
|
---|
88 | directory and install Glibc using the gcc-2.95.2 you just installed by
|
---|
89 | running the following commands:
|
---|
90 | </para>
|
---|
91 |
|
---|
92 | <blockquote><literallayout>
|
---|
93 |
|
---|
94 | <userinput>cd ../glibc-2.1.3 &&</userinput>
|
---|
95 | <userinput>patch -Np1 -i ../glibc-2.1.3.patch &&</userinput>
|
---|
96 | <userinput>cd $LFS/usr/src/glibc-build &&</userinput>
|
---|
97 | <userinput>CC=/usr/local/gcc2952/bin/gcc \</userinput>
|
---|
98 | <userinput> ../glibc-2.1.3/configure --prefix=/usr
|
---|
99 | --enable-add-ons \</userinput>
|
---|
100 | <userinput> --with-headers=$LFS/usr/include \
|
---|
101 | </userinput>
|
---|
102 | <userinput> --libexecdir=/usr/bin &&
|
---|
103 | </userinput>
|
---|
104 | <userinput>make &&</userinput>
|
---|
105 | <userinput>make install_root=$LFS install &&</userinput>
|
---|
106 | <userinput>make install_root=$LFS localedata/install-locales</userinput>
|
---|
107 |
|
---|
108 | </literallayout></blockquote>
|
---|
109 |
|
---|
110 | </sect2>
|
---|
111 |
|
---|