1302 lines
19 KiB
HTML
1302 lines
19 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Special things you need to do</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Glibc Installation HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="Preparations"
|
|
HREF="preparations.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Stuff you will need"
|
|
HREF="stuff-you-will-need.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="The installation of glibc itself"
|
|
HREF="the-install-of-glibc-itself.html"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Glibc Installation HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="stuff-you-will-need.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 3. Preparations</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="the-install-of-glibc-itself.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="special-things-you-need-to-do"
|
|
></A
|
|
>3.2. Special things you need to do</H1
|
|
><P
|
|
>Since you are going to substitute the basic library many programs
|
|
rely on, you can imagine the problems that may occur.</P
|
|
><P
|
|
>For me, it so happened that everything went fine until I typed in
|
|
<B
|
|
CLASS="command"
|
|
>make install</B
|
|
>. At about halfway through the installation
|
|
process I got an error telling me that <B
|
|
CLASS="command"
|
|
>rm</B
|
|
> was not able to
|
|
run, and I found out that even all the common commands like
|
|
<B
|
|
CLASS="command"
|
|
>cp</B
|
|
>, <B
|
|
CLASS="command"
|
|
>ls</B
|
|
>, <B
|
|
CLASS="command"
|
|
>mv</B
|
|
>,
|
|
<B
|
|
CLASS="command"
|
|
>ln</B
|
|
>, <B
|
|
CLASS="command"
|
|
>tar</B
|
|
>, etc., did not work; all told me
|
|
that they were not able to find parts of the library they needed.</P
|
|
><P
|
|
>But there is help available. You can force the compilation of
|
|
programs with the libraries compiled into them, so the programs do not need
|
|
to look them up from the library.</P
|
|
><P
|
|
>For that reason, in this chapter, we will compile all the
|
|
utilities we need for the install into a static version.</P
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="things-you-will-definitely-need"
|
|
></A
|
|
>3.2.1. Things you will definitely need</H2
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="the-gnu-binutils"
|
|
></A
|
|
>3.2.1.1. The GNU-Binutils</H3
|
|
><P
|
|
> <P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Get the newest version from: <A
|
|
HREF="ftp.gnu.org/gnu/binutils"
|
|
TARGET="_top"
|
|
>ftp.gnu.org/gnu/binutils</A
|
|
>; at the time of writing, this was version 2.14</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Open the package: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xIvf binutils-2.14.tar.bz2</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Change to the directory: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cd binutils-2.14</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Configure the Makefiles: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Compile the sources: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Install them with: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make install</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
></OL
|
|
>
|
|
</P
|
|
><P
|
|
> If you run into trouble with the compilation of the binutils,
|
|
referring to problems with gettext (indicated by errors like:
|
|
<SPAN
|
|
CLASS="QUOTE"
|
|
>"undeclared reference to lib_intl"</SPAN
|
|
> or similar) please install the
|
|
newest version, available from <A
|
|
HREF="ftp.gnu.org/gnu/gettext"
|
|
TARGET="_top"
|
|
>ftp.gnu.org/gnu/gettext</A
|
|
>.</P
|
|
><P
|
|
>If this does not help, try disabling the native-language support by using: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure --no-nls</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>You don't need to build a static version of the binutils, though it
|
|
would not hurt, but I encountered many systems running with very
|
|
old versions and ran into errors almost every time, so I think it
|
|
is a good idea to mention them here.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="gnu-make"
|
|
></A
|
|
>3.2.1.2. GNU make</H3
|
|
><P
|
|
>The <B
|
|
CLASS="command"
|
|
>make</B
|
|
> command is responsible for the compiling of the sources, calling gcc and all the other programs needed for a compile.
|
|
Since you may need to compile something if a problem occurs with the new glibc, it is a good idea to have it
|
|
static, otherwise it might not work after an error appears.</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Download the source from <A
|
|
HREF="ftp.gnu.org/gnu/make/"
|
|
TARGET="_top"
|
|
>ftp.gnu.org/gnu/make/</A
|
|
>; at the time of writing the current version was 3.80</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Unpack the source, eg.: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xIvf make-3.80.tar.bz2</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Change to the created directory: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cd make-3.80</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Take care that the binaries are built static: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>export CFLAGS="-static -O2 -g"</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Run the configure script: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Compile the stuff: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Install the binaries: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make install</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Make a check:<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make -v</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> You should now see the new version installed. If not, check for older binary files and replace them by smlinks to the new version.</P
|
|
></LI
|
|
></OL
|
|
>
|
|
</P
|
|
><P
|
|
> Congratulations! You have compiled another static-linked program.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="gnu-core-utils"
|
|
></A
|
|
>3.2.1.3. the GNU core-utils</H3
|
|
><P
|
|
>The core-utils are commands like: <B
|
|
CLASS="command"
|
|
>cp</B
|
|
>, <B
|
|
CLASS="command"
|
|
>rm</B
|
|
>, <B
|
|
CLASS="command"
|
|
>ln</B
|
|
>, <B
|
|
CLASS="command"
|
|
>mv</B
|
|
>, etc. In case of an
|
|
error in the installation, these are an absolute requirement to
|
|
help bring your system up again, so static binaries are really necessary
|
|
here.</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Again, download the source tarball from: <A
|
|
HREF="ftp.gnu.org/gnu/coreutils/"
|
|
TARGET="_top"
|
|
>ftp.gnu.org/gnu/coreutils/</A
|
|
>; at the time of writing, version 5.0 was current.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Unpack it: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xIvf coreutils-5.0.tar.bz2</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Change to the directory: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cd coreutils-5.0</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Take care that the binaries are built static:<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>export CFLAGS="-static -O2 -g"</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Configure the package: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Compile the binaries: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>And install them: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make install</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Verify that the right core-utils are used: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cp --version</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>. You should see the correct version, otherwise remove any old binaries and replace them with symlinks to the new version.</P
|
|
></LI
|
|
></OL
|
|
>
|
|
</P
|
|
><P
|
|
> Now that the binaries of these very elementary tools are static,
|
|
you can be sure they will work every time you need them.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="gnu-tar"
|
|
></A
|
|
>3.2.1.4. GNU tar</H3
|
|
><P
|
|
>You have already used GNU tar to unpack all the programs compiled
|
|
and installed so far. But maybe you need to compile another
|
|
program which is needed by glibc after you had a crash, and in
|
|
this situation (I experienced this myself!) it is very useful to
|
|
have a working <B
|
|
CLASS="command"
|
|
>tar</B
|
|
> ready to unpack the missing programs.
|
|
With tar, we also need to take care of the
|
|
bz2 compression algorithm, which is not included in the normal
|
|
source distribution of tar.</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Get the source of GNU tar from <A
|
|
HREF="ftp.gnu.org/gnu/tar"
|
|
TARGET="_top"
|
|
>ftp.gnu.org/gnu/tar</A
|
|
>; at the time of writing, version 1.13 was up-to-date.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>As many source tarballs are compressed with bzip2, we would like to have the support built in, rather than working with pipes, so get the patch from:
|
|
<A
|
|
HREF="ftp://infogroep.be/pub/linux/lfs/lfs-packages/4.1/tar-1.13.patch"
|
|
TARGET="_top"
|
|
>ftp://infogroep.be/pub/linux/lfs/lfs-packages/4.1/tar-1.13.patch</A
|
|
>.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Unpack the source by invoking: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xzvf tar-1.13.tar.gz</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Copy the patch to the source directory of tar: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cp tar-1.13.patch tar-1.13/</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Apply the patch: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>patch -Np1 -i tar-1.13.patch</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Set the compiler flags to make a static binary: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>export CFLAGS="-static -O2 -g"</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Now we are ready to configure: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Compile with: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>And as the next step, install the package:<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make install</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Do a quick check to ensure the new version is being used from now on: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar --version</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> The version you just installed should display, otherwise
|
|
check for old binaries and replace them with symlinks to the new location.</P
|
|
></LI
|
|
></OL
|
|
></P
|
|
><P
|
|
>If you experience problems with the execution of <B
|
|
CLASS="command"
|
|
>make</B
|
|
>, try to turn
|
|
off native-language support (nls). You may achieve this by
|
|
invoking configure with the option: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>--disable-nls</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
><EM
|
|
>Note:</EM
|
|
> In this new version of tar, you must use the <TT
|
|
CLASS="option"
|
|
>-j</TT
|
|
> switch to
|
|
decompress .bzip2 files, so instead of <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xIvf anyfile.tar.bz2</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> you now have to use <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xjvf anyfile.tar.bz2</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> I
|
|
do not know why this was changed, but it works fine.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="the-bash"
|
|
></A
|
|
>3.2.1.5. The Bash shell</H3
|
|
><P
|
|
> I prefer Bash as my shell; if you use a different one, please be sure you have installed a static version of it before you install glibc.</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Get Bash from: <A
|
|
HREF="ftp.gnu.org/gnu/bash/"
|
|
TARGET="_top"
|
|
>ftp.gnu.org/gnu/bash/</A
|
|
>. Download the newest
|
|
version you can find; at the time of writing this was version 2.05b.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Unpack the source tree: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xzvf bash-2.05b.tar.gz</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> which
|
|
will create a directory called <TT
|
|
CLASS="filename"
|
|
>bash-2.05b</TT
|
|
> with all the unpacked sources in it.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Go to the directory: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cd bash-2.05a</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Set everything up for building a static version: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>export CFLAGS="-static -O2 -g"</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Configure the makefiles: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> If you would like something special in your Bash, see <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure --help</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
for a list of options.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Compile everything: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Install the compiled binaries: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make install</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> This will install the binaries to <TT
|
|
CLASS="filename"
|
|
>/usr/local/bin/</TT
|
|
>.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Make sure there is not another version laying around (like in my Suse-Linux: <TT
|
|
CLASS="filename"
|
|
>/bin/</TT
|
|
>), by copying the file:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cp /usr/local/bin/bash /bin/</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> We don't use a symlink here because both at boot-time and when starting Bash there might be trouble with symlinks.
|
|
</P
|
|
></LI
|
|
></OL
|
|
>
|
|
</P
|
|
><P
|
|
>You now have installed a static version of Bash. For that reason,
|
|
the binary is much bigger than usual, but it will run under all
|
|
circumstances.</P
|
|
><P
|
|
> If you prefer to use another shell, you are free to do so, but make
|
|
sure it is a statically-linked version. Feel free to email me a method to
|
|
build the shell of your choice in a static version, and chances are good
|
|
that it will be implemented in the next revision of this document.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="software-that-may-come-in-handy"
|
|
></A
|
|
>3.2.2. Software that may come in handy</H2
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="midnight-commander"
|
|
></A
|
|
>3.2.2.1. Midnight Commander</H3
|
|
><P
|
|
> Midnight Commander is a very useful file manager, supporting
|
|
many nice features like transparent decompression of packed files,
|
|
built-in copy, move and other common commands, as well as an
|
|
integrated editor.</P
|
|
><P
|
|
>To compile this piece of software, you will need to have glib
|
|
installed; in some distributions this is already the case. If you
|
|
get an error in the <B
|
|
CLASS="command"
|
|
>make</B
|
|
> command saying that ld could not
|
|
find glib, you will need to install this library first. You can get the sources from:
|
|
<A
|
|
HREF="ftp.gnome.org/pub/gnome/sources/glib/2.2/"
|
|
TARGET="_top"
|
|
>ftp.gnome.org/pub/gnome/sources/glib/2.2/</A
|
|
>, and the installation is straight-forward.</P
|
|
><P
|
|
>Here are the steps to build Midnight Commander:</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Get the source from
|
|
<A
|
|
HREF="http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/"
|
|
TARGET="_top"
|
|
>http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/"</A
|
|
>;
|
|
at the time of writing, the newest version was 4.6.0.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Unpack the sources: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>tar xzvf mc-4.6.0.tar.gz</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Change to the directory you just created: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>cd mc-4.6.0</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Set up the configuration-files: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>./configure</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Start compiling: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Install everything: <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>make install</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></LI
|
|
></OL
|
|
>
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="stuff-you-will-need.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="the-install-of-glibc-itself.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Stuff you will need</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="preparations.html"
|
|
ACCESSKEY="U"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>The installation of glibc itself</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |