Next
Previous
Contents
In this section we're going to reinstall all software that has been linked
statically before dynamically. It's pretty straightforward like it was when
we prepared our system for the Glibc installation.
It's important that you take a close look at this section. If you decide
you can't be bothered reinstalling all the previously installed software, at
least look at the new libraries and programs in this section. A few programs
that are already installed depend on certain libraries when dynamically linked.
But these libraries aren't only used by the already installed programs; other
software might require it as well, so you want to install those. Also, a few
programs recommend other programs to be installed. We didn't require those
programs for the Glibc and GCC installation, but we might as well install them
now to avoid problems later.
Make sure you remove the old source tree first for best result (to make
sure all programs are linked dynamically).
- Unpack the GCC archive
- Configure the package by running
configure
- Compile the package by running
make LANGUAGES=c
make stage1
make "CC=stage1/xgcc -Bstage1/" "CFLAGS="-g -O2" LANGUAGES=c
make stage2
make "CC=stage2/xgcc -Bstage2/" "CFLAGS="-g -O2" LANGUAGES=c
make compare
- Install the package by running
make CC="stage2/xgcc -Bstage2/" "CFLAGS="-g
-O2" LANGUAGES=c install
- Unpack the Termcap archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Readline archive
- Configure the package by running
configure
- Compile the package by running
make shared
- Install the package by running
make install
- Install the shared libraries by running
make install-shared
- Unpack the Bash archive
- Configure the package by running
configure --with-installed-readline
- Compile the package by running
make
- Edit the
Makefile
file and find the variable: bindir
- Replace the current value with: /bin
- Install the package by running
make install
The just installed Bash version is compiled with the -g compiler flag,
which means it's compiled with debugging information. This means that when
you ever need to run bash through a debugger, the output is human readable,
whereas a binary compiled without debugger information is very hard to debug.
The downside is that the Bash executable is now about 1MB in size. If you remove
the debug information, you'll have an executable of around 340KB in size. This
is quite a difference and worth it if you don't debug programs at all.
You can edit the Makefile files whenever you compile a program so you can
remove the -g compiler flags (often found in a CFLAGS variable), or you can
run the strip program with one or more executables as the parameter(s). All
debugging information will be deleted (this won't affect the program itself
in any way whatsoever). The choice is yours.
- Unpack the Sysvinit package
- Go to the src directory
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Make archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Sed archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Shell Utils archive
- Configure the package by running
configure
- Compile the package by running
make
- Copy the following binaries from the src directory to /bin:
date echo false
pwd sleep stty su true uname
- Copy the following binary from the src directory to /sbin:
chroot
- Copy the following binaries from the src directory to /usr/bin:
basename
dirname env expr factor groups id logname nice nohup pathchk printenv printf
seq tee test tty uptime users who whoami yes
- Unpack the File Utils archive
- Configure the package by running
configure
- Compile the package by running
make
- Edit the
Makefile
file
- Find the following variables: bindir sbindir sysconfdir localstatedir
- Remove the $(exec_prefix) and $(prefix) parts so you'll be
left with the values: /bin /sbin /etc and /var
- Install the package by running
make install
- Move the
/bin/install
file to the /usr/bin
directory
- Unpack the Util Linux archive
- Configure the package by running
configure
- Go to the lib directory
- Compile the files there by running
make
- Go to the disk-util directory
- Compile mkswap by running
make mkswap
- Copy the following binary to /sbin:
mkswap
- Go to the fdisk directory
- Compile fdisk by running
make fdisk
- Compile cfdisk by running
make cfdisk
- Copy the following binaries to /sbin:
cfdisk fdisk
- Copy the following files to /usr/man/man8:
cfdisk.8 fdisk.8
- Go to the login-utils directory
- Compile agetty by running
make agetty
- Compile login by running
make login
- Copy the following file to /usr/man/man1:
login.1
- Copy the following file to /usr/man/man8:
agetty.8
- Go to the mount directory
- Compile the utilities by running
make
- Copy the following binaries to /sbin:
mount umount swapon losetup
- Copy the following files to /usr/man/man8: All
*.8
files
- Remove the /sbin/swapoff symlink and recreate the symlink that links
/sbin/swapoff
to /sbin/swapon
- Go to the sys-utils directory
- Compile dmesg by running
make dmesg
- Compile rdev by running
make rdev
- Copy the following binary to /bin:
dmesg
- Copy the following binary to /sbin:
rdev
- Copy the following files to /usr/man/man8:
dmesg.8 rdev.8 swapdev.8 ramsize.8
vidmode.8 rootflags.8
- Create the symlinks that link
/sbin/rdev, /sbin/swapdev, /sbin/ramsize,
/sbin/vidmode
and /sbin/rootflags
to /sbin/rdev
- Go to the text-utils directory
- Compile more by running
make more MOREHELPDIR=/usr/share/more
- Copy the following binary to /usr/bin:
more
- Copy the following file to /usr/man/man1:
more.1
- Create the
/usr/share/more
directory
- Copy the following file to /usr/share/more:
more.help
- Unpack the Text Utils archive
- Configure the package by running
configure
- Compile the package by running
make
- Edit the
src/Makefile
file and find the variable: bindir
- Replace the current value with: /usr/bin
- Install the package by running
make install
- Move the /usr/bin/cat file to
/bin/cat
- Unpack the Tar archive
- Configure the package by running
configure
- Compile the package by running
make
- Edit the src/Makefile file and find the variables: bindir and libexecdir
- Give bindir the value: /bin
- Give libexecdir the value: /usr/bin
- Install the package by running
make install
- If you don't need the ReMote Tapeserver program, you can delete the
/usr/bin/rmt
program
- Unpack the Gzip archive
- Configure the package by running
configure
- Compile the package by running
make
- Edit the
Makefile
file and find the variable: bindir
- Replace the current value with: /bin
- Install the package by running
make install
There is a possibility you will experience compilation problems. If this
is the case, you can download a fixed version of this package from the following
URL:
http://tts.ookhoi.dds.nl/download/lfs-howto/gzip-1.2.4-lfs.tar.gz
- Unpack the Bison archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Flex archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Binutils archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Grep archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Mawk archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Find Utils archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
There is a possibility you will experience compilation problems. If this
is the case, you can download a fixed version of this package from the following
URL:
http://tts.ookhoi.dds.nl/download/lfs-howto/findutils-4.1-lfs.tar.gz
- Unpack the Diff Utils archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Less archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Perl archive
- Configure the package by running
Configure
If you agree on all default values, you might want to configure the package
by running Configure -d
. This way you don't have to press enter all the time
to accept the default values.
- Compile the package by running
make
- Test the package by running
make test
- Install the package by running
make install
- Unpack the M4 archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
- Unpack the Texinfo archive
- Configure the package by running
configure
- Compile the package by running
make
- Install the package by running
make install
Next
Previous
Contents