<HTML
><HEAD
><TITLE
>Preparing the LFS system for installing basic system software</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.54"><LINK
REL="HOME"
TITLE="Linux From Scratch"
HREF="index.html"><LINK
REL="UP"
TITLE="Installing basic system software"
HREF="c506.html"><LINK
REL="PREVIOUS"
TITLE="About debugging symbols"
HREF="x514.html"><LINK
REL="NEXT"
TITLE="Installing basic system software"
HREF="x869.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux From Scratch</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x514.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 5. Installing basic system software</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x869.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN534"
>Preparing the LFS system for installing basic system software</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN536"
>Installing Bash</A
></H2
><P
>Install <A
HREF="bash-desc.html"
>Bash</A
> by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:bash-2.04# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --enable-static-link</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bash-2.04# </TT
><TT
CLASS="USERINPUT"
><B
>    make</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bash-2.04# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bash-2.04# </TT
><TT
CLASS="USERINPUT"
><B
>    mv $LFS/usr/bin/bash $LFS/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bash-2.04# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bin# </TT
><TT
CLASS="USERINPUT"
><B
>    ln -s bash sh</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN554"
>Installing Binutils</A
></H2
><P
>Install <A
HREF="binutils-desc.html"
>Binutils</A
> by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:binutils-2.9.5.0.37# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:binutils-2.9.5.0.37# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-all-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:binutils-2.9.5.0.37a</TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN566"
>Installing Bzip2</A
></H2
><P
>Before we can install Bzip2 we need to modify the
<TT
CLASS="FILENAME"
>Makefile</TT
> file. Open the
<TT
CLASS="FILENAME"
>Makefile</TT
> file in a text editor and find the lines
that
start with <I
CLASS="EMPHASIS"
>$(CC) $(CFLAGS) -o</I
></P
><P
>Replace those parts with:
<I
CLASS="EMPHASIS"
>$(CC) $(CFLAGS) $(LDFLAGS) -o</I
></P
><P
>Now install Bzip2 by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><TT
CLASS="PROMPT"
>root:bzip2-0.9.5d# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bzip2-0.9.5d# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e PREFIX=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bzip2-0.9.5d# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bin# </TT
><TT
CLASS="USERINPUT"
><B
>    mv bunzip2 bzip2 $LFS/bin</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN585"
>Installing Diffutils</A
></H2
><P
>Install Diffutils by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:diffutils-2.7# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:diffutils-2.7# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:diffutils-2.7# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br> </P
></BLOCKQUOTE
><P
>This package is known to cause static link problems on certain
platforms. If you're having trouble compiling this package as well, you
can download a patch from
<A
HREF="http://www.linuxfromscratch.org/download/diffutils-2.7.patch.gz"
TARGET="_top"
>http://www.linuxfromscratch.org/download/diffutils-2.7.patch.gz</A
></P
><P
>Install this patch by running the following command:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:diffutils-2.7# </TT
><TT
CLASS="USERINPUT"
><B
>    patch -Np1 -i ../diffutils-2.7.patch</B
></TT
><br> </P
></BLOCKQUOTE
><P
>Now recompile the package using the same commands as above.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN604"
>Installing Fileutils</A
></H2
><P
>Install Fileutils by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:fileutils-4.0# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --disable-nls --prefix=/usr</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:fileutils-4.0# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:fileutils-4.0# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:fileutils-4.0# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bin# </TT
><TT
CLASS="USERINPUT"
><B
>    mv chgrp chmod chown cp dd df ln $LFS/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bin# </TT
><TT
CLASS="USERINPUT"
><B
>    mv ls mkdir mknod mv rm rmdir sync $LFS/bin</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN621"
>Installing GCC on the normal system if necessary</A
></H2
><P
>In order to compile Glibc-2.1.3 later on you need to have gcc-2.95.2
installed. Although any GCC version above 2.8 would do, 2.95.2 is the
highly
recommended version to use. Many glibc-2.0 based systems have
gcc-2.7.2.3 installed and you can't compile glibc-2.1.3 with that
compiler. Many glibc-2.1 based systems have egcs-2.95.x installed and
that version doesn't work too well either (sometimes it works fine,
sometimes it doesn't depending on various circumstances).</P
><P
>To find out whether your system uses gcc-2.95.2 or not, run the
following command:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:~# </TT
><TT
CLASS="USERINPUT"
><B
>    gcc --version</B
></TT
><br> </P
></BLOCKQUOTE
><P
>If you normal Linux system does not have gcc-2.95.2 installed you need
to install it now. We won't replace the current compiler on your system,
but instead we will install gcc in a separate directory
(/usr/local/gcc2952). This way no binaries or header files will be
replaced.</P
><P
>After you unpacked the gcc-2.95.2 archive don't enter the newly created
gcc-2.95.2 directory but stay in the $LFS/usr/src directory. Install GCC by 
running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:src# </TT
><TT
CLASS="USERINPUT"
><B
>    mkdir $LFS/usr/src/gcc-build</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:src# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/src/gcc-build</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gcc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    ../gcc-2.95.2/configure --prefix=/usr/local/gcc2952 \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> --with-local-prefix=/usr/local/gcc2952 
                \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> --with-gxx-include-dir=/usr/local/gcc2952/include/g++
                \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> --enable-shared --enable-languages=c,c++</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gcc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make bootstrap</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gcc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make install</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN646"
>Installing GCC on the LFS system</A
></H2
><P
>After you unpacked the gcc-2.95.2 archive don't enter the newly created
gcc-2.95.2 directory but stay in the $LFS/usr/src directory. Install GCC by 
running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:src# </TT
><TT
CLASS="USERINPUT"
><B
>    mkdir $LFS/usr/src/gcc-build</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:src# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/src/gcc-build</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gcc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    ../gcc-2.95.2/configure \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> --prefix=/usr --with-local-prefix=/usr \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> --with-gxx-include-dir=/usr/include/g++ \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> --enable-languages=c,c++ --disable-nls</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gcc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static bootstrap</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gcc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr local_prefix=$LFS/usr \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>gxx_include_dir=$LFS/usr/include/g++ \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> install</B
></TT
><br> </P
></BLOCKQUOTE
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN666"
>Creating necessary symlinks</A
></H3
><P
>The system needs a few symlinks to ensure every program is able to find
the compiler and the pre-processor. Some programs run the cc program,
others run the gcc program. Some programs expect the cpp program in /lib
and others expect to find it in /usr/bin. Create those symlinks by
running:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:~# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/lib</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:lib# </TT
><TT
CLASS="USERINPUT"
><B
>    ln -s ../usr/lib/gcc-lib/<host>/2.95.2/cpp cpp</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:lib# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/lib</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:lib# </TT
><TT
CLASS="USERINPUT"
><B
>    ln -s gcc-lib/<host>/2.95.2/cpp cpp</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:lib# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bin# </TT
><TT
CLASS="USERINPUT"
><B
>    ln -s gcc cc</B
></TT
><br> </P
></BLOCKQUOTE
><P
>Replace <host> with the directory where the gcc-2.95.2 files are
installed (which is i686-unknown-linux in my case).</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN684"
>Installing Glibc</A
></H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN686"
>A note on the glibc-crypt package</A
></H3
><P
>An excerpt from the README file that is distributed with the glibc-crypt
package:</P
><P
>The add-on is not included in the main distribution of the GNU C
library because some governments, most notably those of France,
Russia, and the US, have very restrictive rules governing the
distribution and use of encryption software.  Please read the node
"Legal Problems" in the manual for more details.</P
><P
>In particular, the US does not allow export of this software without a
licence, including via the Internet.  So please do not download it
from the main FSF FTP site at ftp.gnu.org if you are outside
the US.  This software was completely developed outside the US.</P
><P
><SPAN
CLASS="QUOTE"
>"This software"</SPAN
> refers to the glibc-crypt package at
ftp://ftp.gwdg.de/pub/linux/glibc/. This law only affects people who
don't live in the US. It's not prohibited to import DES software, so if
you live in the US you can import the file safely from Germany without
breaking cryptographic laws. This law is changing lately and I don't
know what the status of it is at the moment. Better be safe than sory.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN693"
>Installing Glibc</A
></H3
><P
>Copy the Glibc-crypt and Glibc-linuxthreads archives into the unpacked
glibc directory</P
><P
>Unpack the glibc-crypt and glibc-linuxthreads archives there, but don't
enter
the created directories. Just unpack and leave it with that.</P
><P
>A few default parameters of Glibc need to be changed, such as the
directory where the shared libraries are supposed to be installed in and
the directory that contains the system configuration files. For this
purpose you need to create the <TT
CLASS="FILENAME"
>$LFS/usr/src/glibc-build</TT
> directory and in that directory you
create
a new file <TT
CLASS="FILENAME"
>configparms</TT
> containing:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
# Begin configparms<br>
<br>
slibdir=/lib<br>
sysconfdir=/etc<br>
<br>
# End configparms<br> </P
></BLOCKQUOTE
><P
>Change to the
<TT
CLASS="FILENAME"
>$LFS/usr/src/glibc-build</TT
>
directory and install <A
HREF="glibc-desc.html"
>Glibc</A
> by running the following 
commands if your
system already had a suitable GCC version installed:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:glibc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    ../glibc-2.1.3/configure --prefix=/usr --enable-add-ons</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:libc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:glibc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make install_root=$LFS install</B
></TT
><br> </P
></BLOCKQUOTE
><P
>Change to the
<TT
CLASS="FILENAME"
>$LFS/usr/src/glibc-build</TT
>
directory and install Glibc by running the following command if your
system
did not already have a suitable GCC version installed and you just
installed
GCC-2.95.2 on your normal Linux system a little while ago:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:glibc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    CC=/usr/local/gcc2952/bin/gcc \</B
></TT
><br>
        <TT
CLASS="USERINPUT"
><B
>> ../glibc-2.1.3/configure --prefix=/usr
                --enable-add-ons</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:glibc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:glibc-build# </TT
><TT
CLASS="USERINPUT"
><B
>    make install_root=$LFS install</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN724"
>Copying old NSS library files</A
></H3
><P
>If your normal Linux system runs glibc-2.0, you need to copy the NSS
library files to the LFS partition. Certain statically linked programs
still depend on the NSS library, especially programs that need to lookup
usernames,userid's and groupid's. You can check which C library version
your normal Linux system uses by running:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:~# </TT
><TT
CLASS="USERINPUT"
><B
>ls /lib/libc*</B
></TT
><br> </P
></BLOCKQUOTE
><P
>Your system uses glib-2.0 if there is a file that looks like
<I
CLASS="EMPHASIS"
>libc-2.0.7.so</I
></P
><P
>Your system uses glibc-2.1 if there is a file that looks like
<I
CLASS="EMPHASIS"
>libc-2.1.3.so</I
></P
><P
>Of course, the micro version number can be different (you could have
libc-2.1.2 or libc-2.1.1 for example).</P
><P
>If you have a libc-2.0.x file copy the NSS library files by running:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:~# </TT
><TT
CLASS="USERINPUT"
><B
>cp -av /lib/libnss*
        $LFS/lib</B
></TT
><br> </P
></BLOCKQUOTE
><P
>There are a few distributions that don't have files from which you can
see
which version of the C Library it is. If that's the case, it will be
hard to
determine which C library version you exactly have. Try to obtain this
information using your distribution's installation tool. It often says
which
version it has available. If you can't figure out at all which C Library
version is used, then copy the NSS files anyway and hope for the best.
That's
the best advise I can give I'm afraid.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN742"
>Installing Grep</A
></H2
><P
>Install Grep by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:grep-2.4.2# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr --disable-nls</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:grep-2.4.2# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:grep-2.4.2# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br> </P
></BLOCKQUOTE
><P
>This package is known to cause static linking problems on certain
platforms. If you're having trouble compiling this package as well, you
can download a patch from
<A
HREF="http://www.linuxfromscratch.org/download/grep-2.4.2.patch.gz"
TARGET="_top"
>http://www.linuxfromscratch.org/download/grep-2.4.2.patch.gz</A
></P
><P
>Install this patch by running the following command:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:grep-2.4.2# </TT
><TT
CLASS="USERINPUT"
><B
>    patch -Np1 -i ../grep-2.4.2.patch</B
></TT
><br> </P
></BLOCKQUOTE
><P
>Now recompile the package using the same commands as above.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN761"
>Installing Gzip</A
></H2
><P
>Install Gzip by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:gzip-1.2.4a# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gzip-1.2.4a# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gzip-1.2.4a# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:gzip-1.2.4a# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bin# </TT
><TT
CLASS="USERINPUT"
><B
>    mv gunzip gzip $LFS/bin</B
></TT
><br> </P
></BLOCKQUOTE
><P
>This package is known to cause compilation problems on certain
platforms. If you're having trouble compiling this package as well, you
can download a fixed package from
<A
HREF="http://www.linuxfromscratch.org/download/gzip-1.2.4a.patch.gz"
TARGET="_top"
>http://www.linuxfromscratch.org/download/gzip-1.2.4a.patch.gz</A
></P
><P
>Install this patch by running the following command:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:gzip-1.2.4a# </TT
><TT
CLASS="USERINPUT"
><B
>    patch -Np1 -i ../gzip-1.2.4a.patch.gz</B
></TT
><br> </P
></BLOCKQUOTE
><P
>Now recompile the package using the same commands as above.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN784"
>Installing Make</A
></H2
><P
>Install Make by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:make-3.78.1# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr --disable-nls</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:make-3.78.1# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:make-3.78.1# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN795"
>Installing Sed</A
></H2
><P
>Install Sed by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:sed-3.02# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:sed-3.02# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:sed-3.02# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:sed-3.02# </TT
><TT
CLASS="USERINPUT"
><B
>    mv $LFS/usr/bin/sed $LFS/bin</B
></TT
><br> </P
></BLOCKQUOTE
><P
>This package is known to cause static linking problems on certain
platforms. If you're having trouble compiling this package as well, you
can download a patch from
<A
HREF="http://www.linuxfromscratch.org/download/sed-3.02.patch.gz"
TARGET="_top"
>http://www.linuxfromscratch.org/download/sed-3.02.patch.gz</A
></P
><P
>Install this patch by running the following command:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:sed-3.02# </TT
><TT
CLASS="USERINPUT"
><B
>    patch -Np1 -i ../sed-3.02.patch.gz</B
></TT
><br> </P
></BLOCKQUOTE
><P
>Now recompile the package using the same commands as above.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN816"
>Installing Shellutils</A
></H2
><P
>Install Shellutils by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:sh-utils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr --disable-nls</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:sh-utils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:sh-utils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:sh-utils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    cd $LFS/usr/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:/bin# </TT
><TT
CLASS="USERINPUT"
><B
>    mv date echo false pwd stty $LFS/bin</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:bin# </TT
><TT
CLASS="USERINPUT"
><B
>    mv su true uname hostname $LFS/bin</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN833"
>Installing Tar</A
></H2
><P
>Install Tar by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:tar-1.13# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr --disable-nls</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:tar-1.13# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:tar-1.13# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:tar-1.13# </TT
><TT
CLASS="USERINPUT"
><B
>    mv $LFS/usr/bin/tar $LFS/bin</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN846"
>Installing Textutils</A
></H2
><P
>Install Textutuils by running the following commands:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
<TT
CLASS="PROMPT"
>root:textutils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    ./configure --prefix=/usr --disable-nls</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:textutils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e LDFLAGS=-static</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:textutils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    make -e prefix=$LFS/usr install</B
></TT
><br>
<TT
CLASS="PROMPT"
>root:textutils-2.0# </TT
><TT
CLASS="USERINPUT"
><B
>    mv $LFS/usr/bin/cat $LFS/bin</B
></TT
><br> </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN859"
>Creating passwd and group files</A
></H2
><P
>Create a new file <TT
CLASS="FILENAME"
>$LFS/etc/passwd</TT
> containing the
following:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
root::0:0:root:/root:/bin/bash<br> </P
></BLOCKQUOTE
><P
>Create a new file <TT
CLASS="FILENAME"
>$LFS/etc/group</TT
> containing the
following:</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
CLASS="LITERALLAYOUT"
><br>
root::0:<br> </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x514.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x869.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>About debugging symbols</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c506.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Installing basic system software</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>