5.8. Installing Diffutils-2.8

Estimated build time:           1 minute
Estimated required disk space:  4 MB

5.8.1. Installation of Diffutils

When installing Diffutils using glibc-2.1.x on your base system, it may be necessary to use a fix to prevent a variable name conflict. The following commands can be used in this case. Note that these commands can also be used for other glibc versions so if you aren't sure, then use the first version.

export CPPFLAGS=-Dre_max_failures=re_max_failures2 &&
./configure --prefix=$LFS/usr --disable-nls &&
unset CPPFLAGS &&
make LDFLAGS=-static &&
make install

If you are using a newer glibc version (2.2.x), you can use the following commands to install Diffutils:

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

5.8.2. Command explanations

CPPFLAGS=-Dre_max_failures=re_max_failures2: The CPPFLAGS variable is a variable that's read by the cpp program (C PreProcessor). The value of this variable tells the preprocessor to replace every instance of re_max_failures it finds by re_max_failures2 before handing the source file to the compiler itself for compilation. This package has problems linking statically on systems that run an older Glibc version and this construction fixes that problem.

5.8.3. Contents of diffutils-2.7

5.8.4. Dependencies

Diffutils-2.7 needs the following to be installed:


bash: sh
binutils: ld, as
diffutils: cmp
fileutils: chmod, cp, install, mv, rm
gcc: cc1, collect2, cpp0, gcc
grep: egrep, grep
make: make
sed: sed
sh-utils: date, hostname
textutils: cat, tr