1 | <sect2><title> </title><para> </para></sect2>
|
---|
2 |
|
---|
3 | <sect2>
|
---|
4 | <title>Installation of Bash</title>
|
---|
5 |
|
---|
6 | <para>Before you attempt to install Bash, you have to check to make sure
|
---|
7 | your distribution has the <filename>/usr/lib/libcurses.a</filename> and
|
---|
8 | <filename>/usr/lib/libncurses.a</filename> files. If your host
|
---|
9 | distribution is an LFS system, all files will be present if you followed
|
---|
10 | the instructions of the book version you read exactly.</para>
|
---|
11 |
|
---|
12 | <para>If both of the files are missing, you have to install the Ncurses
|
---|
13 | development package. This package is often called something like
|
---|
14 | <emphasis>ncurses-dev</emphasis> or <emphasis>ncurses-static</emphasis>. If
|
---|
15 | this package is already installed, or you just installed it, check for the
|
---|
16 | two files again. Often the <filename>libcurses.a</filename> file is (still)
|
---|
17 | missing. If so, create <filename>libcurses.a</filename> as a symlink
|
---|
18 | by running the following command as user <emphasis>root:</emphasis></para>
|
---|
19 |
|
---|
20 | <para><screen><userinput>ln -s libncurses.a /usr/lib/libcurses.a</userinput></screen></para>
|
---|
21 |
|
---|
22 | <para>Now we can really start. Prepare Bash to be compiled by running the
|
---|
23 | following command:</para>
|
---|
24 |
|
---|
25 |
|
---|
26 | <para><screen><userinput>./configure --enable-static-link \
|
---|
27 | --prefix=$LFS/static --with-curses</userinput></screen></para>
|
---|
28 |
|
---|
29 | <para>The meaning of the configure options are:</para>
|
---|
30 |
|
---|
31 | <itemizedlist>
|
---|
32 | <listitem><para><userinput>--enable-static-link</userinput>: This option
|
---|
33 | causes the <userinput>bash</userinput> program to be statically
|
---|
34 | linked.</para></listitem>
|
---|
35 |
|
---|
36 | <listitem><para><userinput>--prefix=$LFS/static</userinput>: This option
|
---|
37 | installs all of Bash's files under the
|
---|
38 | <filename class="directory">$LFS/static</filename> directory, which becomes
|
---|
39 | the <filename class="directory">/static</filename> directory when chroot'ed
|
---|
40 | or reboot'ed into LFS.</para></listitem>
|
---|
41 |
|
---|
42 | <listitem><para><userinput>--with-curses</userinput>: This option causes
|
---|
43 | <filename>bash</filename> to be linked against the curses library instead
|
---|
44 | of the default termcap library which has become obsolete. Note, on most
|
---|
45 | all Linux systems, the curses library is provided by the Ncurses
|
---|
46 | package (so in truth we link against the ncurses library).</para>
|
---|
47 |
|
---|
48 | <para>It is not strictly necessary for the static bash to be linked
|
---|
49 | against libncurses (it can link against a static termcap for the time
|
---|
50 | being just fine because we will reinstall Bash in Chapter 6 anyway,
|
---|
51 | where we will use libncurses), but it's a good test to make sure that
|
---|
52 | the Ncurses package has been installed properly. If not, you will get in
|
---|
53 | trouble later on in this chapter when you install the Texinfo package.
|
---|
54 | That package requires ncurses, and termcap can't be used
|
---|
55 | there.</para></listitem>
|
---|
56 | </itemizedlist>
|
---|
57 |
|
---|
58 | <para>Now we can continue with compiling Bash:</para>
|
---|
59 |
|
---|
60 | <para><screen><userinput>make</userinput></screen></para>
|
---|
61 |
|
---|
62 | <para>And finish off the installation by installing Bash:</para>
|
---|
63 |
|
---|
64 | <para><screen><userinput>make install</userinput></screen></para>
|
---|
65 |
|
---|
66 | <para>If the <userinput>make install</userinput> phase ends with something
|
---|
67 | along the lines of the following:</para>
|
---|
68 |
|
---|
69 | <blockquote><screen>install-info: unknown option `--dir-file=/mnt/lfs/usr/info/dir'
|
---|
70 | usage: install-info [--version] [--help] [--debug] [--maxwidth=nnn]
|
---|
71 | [--section regexp title] [--infodir=xxx] [--align=nnn]
|
---|
72 | [--calign=nnn] [--quiet] [--menuentry=xxx]
|
---|
73 | [--info-dir=xxx]
|
---|
74 | [--keep-old] [--description=xxx] [--test]
|
---|
75 | [--remove] [--] filename
|
---|
76 | make[1]: *** [install] Error 1
|
---|
77 | make[1]: Leaving directory `/mnt/lfs/usr/src/bash-&bash-version;/doc'
|
---|
78 | make: [install] Error 2 (ignored)</screen></blockquote>
|
---|
79 |
|
---|
80 | <para>then that means that you are probably using Debian-2.2 (potato), and
|
---|
81 | that you have an old version of the texinfo package and the info pages
|
---|
82 | can't be installed at this time. This error is not a problem as the info
|
---|
83 | pages will be installed when we recompile bash dynamically in Chapter 6, so
|
---|
84 | you can ignore it. It is reported that the current release of Debian
|
---|
85 | (3.0; also known as Woody) doesn't have this problem.</para>
|
---|
86 |
|
---|
87 | </sect2>
|
---|
88 |
|
---|