5.9. Installing Fileutils-4.1

Estimated build time:           0.94 SBU
Estimated required disk space:  40 MB

5.9.1. Installation of Fileutils

The programs from a statically linked Fileutils package may cause segmentation faults on certain systems, if your distribution has Glibc-2.2.3 installed. It seems to happen mostly on machines powered by an AMD CPU, but there is a case or two where an Intel system is affected as well. If your system falls in this category, apply the patch.

Note that in some cases using this patch will result in not being able to compile this package at all, even when your system has an AMD CPU and has Glibc-2.2.3 (or higher) installed. If that's the case, you'll need to remove the fileutils-4.1 directory and unpack it again from the tarball before continuing. We believe this may be the case when your distribution has altered Glibc-2.2.3 somehow, but details are unavailable at this time.

To fix this package to compile properly on AMD/Glibc-2.2.3 machines, run the following command. Do not attempt this fix if you don't have Glibc-2.2.3 installed. It will more than likely result in all kinds of compile time problems.

patch -Np1 -i ../fileutils-4.1.patch

Install Fileutils by running the following commands:

LDFLAGS=-static \
    ./configure --disable-nls --prefix=$LFS/static &&
make &&
make install

Once you have installed Fileutils, you can test whether the segmentation fault problem has been avoided by running $LFS/static/bin/ls. If this works, then you are OK. If not, then you need to re-do the installation with the patch if you didn't use it, or without the patch if you did use it.

5.9.2. Command explanations

patch -Np1 -i ../fileutils-4.1.patch: This is used to fix a problem with building fileutils statically on glibc 2.2.3 systems. If this isn't done, then there is the possibility of all of the fileutils programs causing segmentation faults once chroot is entered in Chapter 6.

5.9.3. Contents of Fileutils

Last checked against version 4.1.

5.9.3.2. Descriptions

5.9.4. Fileutils Installation Dependencies

Last checked against version 4.1.

Bash: sh
Binutils: ar, as, ld, ranlib
Diffutils: cmp
Fileutils: chmod, cp, install, ln, ls, mkdir, mv, rm, rmdir
Gettext: msgfmt, xgettext
Gcc: cc, cc1, collect2, cpp0, gcc
Grep: egrep, fgrep, grep
Make: make
Perl: perl
Sed: sed
Sh-utils: basename, echo, expr, hostname, sleep, uname
Texinfo: install-info
Textutils: cat, tr