[lfs-support] can't compile gcc pass 1

Bruce Dubbs bruce.dubbs at gmail.com
Sat Jan 5 16:24:10 PST 2013

Tobias Gasser wrote:
> Am 05.01.2013 18:39, schrieb Bruce Dubbs:
>> The idea of the script was that it should be short.  Generally the
>> problem is that the symlinks are not set and occasionally makeinfo is
>> not installed.  Rarely is the problem an out-of-date executable.
> agree.
> so why not check just the very important stuff?

Try this.  Note that I want the user to actually check the versions of 
the packages manually, not just rely on a script to do it.

   - -Bruce

# Simple script to list version numbers of critical development tools

function die
   rm -f dummy.c dummy
   echo "Error: $1"
   exit 1

export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4
SH=`readlink -f /bin/sh`
echo "/bin/sh -> $SH"
[ "$SH" == "/bin/bash" ] || die "/bin/sh is not a symlink to bash"

echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-

bison --version | head -n1
if [ -e /usr/bin/yacc ];
   then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
   else die "yacc not found"; fi

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
if [ -e /usr/bin/awk ];
     AWK=`readlink -f /usr/bin/awk`
     echo "/usr/bin/awk -> $AWK"
     [ "$AWK" ==  "/usr/bin/gawk" ] || die "/usr/bin/awk is not a 
symlink to gawk"
   else die "awk not found"; fi

gcc --version | head -n1
echo 'main(){}' > dummy.c && gcc -o dummy dummy.c
if [ -x dummy ]
     echo "gcc compilation OK"
     rm -f dummy.c dummy
     die "gcc compilation failed"

ldd --version | head -n1 | cut -d" " -f2-  # glibc version
grep --version | head -n1
gzip --version | head -n1
cat /proc/version
m4 --version | head -n1
make --version | head -n1
patch --version | head -n1
echo Perl `perl -V:version`
sed --version | head -n1
tar --version | head -n1
echo "Texinfo: `makeinfo --version | head -n1`"
xz --version | head -n1

echo -e "\n\n*** Review all versions for currency!"

More information about the lfs-support mailing list