# Host System Requirements

You should be able to build a CLFS system from just about any Unix-type operating system. Your host system should have the following software with the minimum versions indicated. Also note that many distributions will place software headers into separate packages, often in the form of [package-name]-devel or [package-name]-dev. Be sure to install those if your distribution provides them.

- Bash-2.05a

- Binutils-2.12 (Versions greater than &binutils-version; are not recommended as they have not been tested)

- Bison-1.875

- Bzip2-1.0.2

- Coreutils-5.0

- Diffutils-2.8

- Findutils-4.1.20

- Gawk-3.1.5

- GCC-4.1.2 and the C++ compiler, `g++` (Versions greater than &gcc-version; are not recommended as they have not been tested)

- Glibc-2.2.5 (Versions greater than &eglibc-version; are not recommended as they have not been tested)

- Grep-2.5

- Gzip-1.2.4

- Linux 2.6.32 (Built with GCC 4.1.2 or later)

- Make-3.80

- Ncurses-5.3

- Patch-2.5.4

- Sed-3.0.2

- Tar-1.22

- Texinfo-4.7

- XZ-Utils-4.999.8beta

To see whether your host system has all the appropriate versions, create and run the following script. Read the output carefully for any errors, and make sure to install any packages that are reported as not found.

    cat > version-check.sh << "EOF"
    #!/bin/bash

    # Simple script to list version numbers of critical development tools

    bash --version | head -n1 | cut -d" " -f2-4
    echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
    bison --version | head -n1
    bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
    echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
    diff --version | head -n1
    find --version | head -n1
    gawk --version | head -n1
    gcc --version | head -n1
    g++ --version | head -n1
    ldd $(which ${SHELL}) | grep libc.so | cut -d ' ' -f 3 | ${SHELL} | head -n 1 | cut -d ' ' -f 1-7
    grep --version | head -n1
    gzip --version | head -n1
    uname -s -r
    make --version | head -n1
    tic -V
    patch --version | head -n1
    sed --version | head -n1
    tar --version | head -n1
    makeinfo --version | head -n1
    xz --version | head -n1
    echo 'main(){}' | gcc -v -o /dev/null -x c - > dummy.log 2>&1
    if ! grep -q ' error' dummy.log; then
      echo "Compilation successful" && rm dummy.log
    else
      echo 1>&2  "Compilation FAILED - more development packages may need to be \
    installed. If you like, you can also view dummy.log for more details."
    fi
    EOF

    bash version-check.sh 2>errors.log &&
    [ -s errors.log ] && echo -e "\nThe following packages could not be found:\n$(cat errors.log)"