1 | <sect2>
|
---|
2 | <title>Installation of Glibc</title>
|
---|
3 |
|
---|
4 | <para>Before starting to install glibc, unpack the glibc-2.2.3-nss.diff
|
---|
5 | file in the $LFS/usr/src tree. Then, once glibc has been unpacked as usual
|
---|
6 | and you have cd'ed into the
|
---|
7 | glibc-&glibc-version; directory, unpack glibc-linuxthreads inside
|
---|
8 | the glibc-&glibc-version; directory, not in /usr/src as you normally
|
---|
9 | would do.</para>
|
---|
10 |
|
---|
11 | <para>Install Glibc by running the following commands:</para>
|
---|
12 |
|
---|
13 | <para><screen><userinput>patch -Np0 -i ../glibc-2.2.3-nss.diff &&</userinput>
|
---|
14 | <userinput>mknod -m 0666 /dev/null c 1 3 &&</userinput>
|
---|
15 | <userinput>touch /etc/ld.so.conf &&</userinput>
|
---|
16 | <userinput>mkdir ../glibc-build &&</userinput>
|
---|
17 | <userinput>cd ../glibc-build &&</userinput>
|
---|
18 | <userinput>sed 's|$(PERL)|/usr/bin/perl|' \</userinput>
|
---|
19 | <userinput> ../glibc-&glibc-version;/malloc/Makefile > tmp~ &&</userinput>
|
---|
20 | <userinput>mv tmp~ ../glibc-&glibc-version;/malloc/Makefile &&</userinput>
|
---|
21 | <userinput>sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile > tmp~ &&</userinput>
|
---|
22 | <userinput>mv tmp~ ../glibc-&glibc-version;/login/Makefile &&</userinput>
|
---|
23 | <userinput>../glibc-&glibc-version;/configure \</userinput>
|
---|
24 | <userinput> --prefix=/usr --enable-add-ons \</userinput>
|
---|
25 | <userinput> --libexecdir=/usr/bin &&</userinput>
|
---|
26 | <userinput>sed 's/cross-compiling = yes/cross-compiling = no/' \</userinput>
|
---|
27 | <userinput> config.make > config.make~ &&</userinput>
|
---|
28 | <userinput>mv config.make~ config.make &&</userinput>
|
---|
29 | <userinput>make &&</userinput>
|
---|
30 | <userinput>make install &&</userinput>
|
---|
31 | <userinput>make localedata/install-locales &&</userinput>
|
---|
32 | <userinput>logout</userinput>
|
---|
33 | &c6-chrootcmd;</screen></para>
|
---|
34 |
|
---|
35 | <para>During the configure stage you will see the following warning:</para>
|
---|
36 |
|
---|
37 | <blockquote><screen>configure: warning:
|
---|
38 | *** An auxiliary program is missing or too old;
|
---|
39 | *** some features will be disabled.
|
---|
40 | *** Check the INSTALL file for required versions.</screen></blockquote>
|
---|
41 |
|
---|
42 | <para> This warning refers to the missing msgfmt program from the
|
---|
43 | gettext package, but it can safely be ignored in our case. The glibc
|
---|
44 | installation will not be affected.</para>
|
---|
45 |
|
---|
46 | <para>The last two commands make you exit and re-enter the chroot'ed
|
---|
47 | environment. This is done to get rid of the "I have
|
---|
48 | no name!" message in the command prompt, which was caused by bash's
|
---|
49 | inability to resolve a userid to a username (which in turn was caused by
|
---|
50 | the missing Glibc installation).</para>
|
---|
51 |
|
---|
52 | </sect2>
|
---|
53 |
|
---|