6.6. Bash-3.1

The Bash package contains the Bourne-Again SHell.

6.6.1. Installation of Bash

Remove a test that causes the build to fail:

echo "ac_cv_func_setvbuf_reversed=no" >> config.cache

Prepare Bash for compilation:

CC="${CC} ${BUILD64}" CXX="${CXX} ${BUILD64}" \
   ./configure --prefix=/tools \
   --without-bash-malloc --host=${LFS_TARGET} \
   --cache-file=config.cache

The meaning of the configure option:

--without-bash-malloc

This option turns off the use of Bash's memory allocation (malloc) function which is known to cause segmentation faults. By turning this option off, Bash will use the malloc functions from Glibc which are more stable.

Compile the package:

make

Install the package:

make install

Make a link for programs that use sh for a shell:

ln -sv bash /tools/bin/sh

Details on this package are located in Section 10.23.2, “Contents of Bash.”