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

Fernando de Oliveira famobr at yahoo.com.br
Sun Jan 6 04:09:45 PST 2013


--- Em dom, 6/1/13, Bruce Dubbs escreveu:

> De: Bruce Dubbs
> Assunto: Re: [lfs-support] can't compile gcc pass 1
> Para: "LFS Support List"
> Data: Domingo, 6 de Janeiro de 2013, 1:09
> Fernando de Oliveira wrote:
> 
> > I like this. Output from
> >
> > $ cat /etc/lfs-release
> > SVN-20120311
> 
> Here is another version.  I can't say I really like
> it.  The original is 
> 40 lines and this is 73.  All this because users either
> don't have 
> enough experience to understand what's there now or because
> a user 
> (generally experienced) just skips it.
> 
> After all, the book says:
> 
> /bin/sh should be a symbolic or hard link to bash
> /usr/bin/yacc should be a link to bison or small script that
> executes bison
> /usr/bin/awk should be a link to gawk
> 
> We then print out all the current values on the system.
> 
> How much hand holding do we need to do?

I agree with you. However, I think that there must be a way to reduce 
user problems, and as usual in life, a price has to be paid for that. 
So, I am dropping the word "like", and also, I do not "dislike" this
script.

1. I have run the previous posted script, then the new one, and logged
both. A "diff" showed no difference in the outputs.

2. A "diff" was between the scripts, not their output, gave (just
pasting the lines that could have some interest, although it is not
really an important point):

<paste>
$ diff -Naur ../../lfs/version-check-lfs-support{,-2}.sh | less
...
 SH=`readlink -f /bin/sh`
 echo "/bin/sh -> $SH"
-[ "$SH" == "/bin/bash" ] || die "/bin/sh is not a symlink to bash"
+[ "$SH" ==  "/bin/bash" ] || die "/bin/sh is not a symlink to bash"
...
</paste>

There is an extra space in the new one, just after "==".

[]s,
Fernando

> #!/bin/bash
> # Simple script to list version numbers of critical
> development tools
> 
> function die
> {
>    rm -f dummy.c dummy
>    echo "Error: $1"
>    exit 1
> }
> 
> function executable
> {
>    EXE=$(which $1 2>/dev/null)
>    [ -x "$EXE" ] || die "$1 not found"
> }
> 
> 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"
> 
> executable ld
> echo -n "Binutils: "; ld --version | head -n1 | cut -d" "
> -f3-
> 
> executable bison; 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
> 
> executable bzip2
> bzip2 --version 2>&1 < /dev/null | head -n1 | cut
> -d" " -f1,6-
> 
> executable chown
> echo -n "Coreutils: "; chown --version | head -n1 | cut
> -d")" -f2
> 
> executable diff; diff --version | head -n1
> executable find; find --version | head -n1
> executable gawk; gawk --version | head -n1
> 
> AWK=`readlink -f /usr/bin/awk`
> awk=/usr/bin/awk
> echo "$awk -> $AWK"
> [ "$AWK" ==  "/usr/bin/gawk" ] || die "$awk is not a
> symlink to gawk"
> 
> executable gcc; gcc --version | head -n1
> 
> echo 'main(){}' > dummy.c && gcc -o dummy
> dummy.c
> if [ -x dummy ]
>    then
>      echo "gcc compilation OK"
>      rm -f dummy.c dummy
>    else
>      die "gcc compilation failed"
> fi
> 
> executable ldd;      ldd --version | head -n1
> | cut -d" " -f2-  # glibc
> executable grep;     grep --version |
> head -n1
> executable gzip;     gzip --version |
> head -n1
> 
> cat /proc/version;
> executable m4;       m4 --version |
> head -n1
> executable make;     make --version |
> head -n1
> executable patch;    patch --version | head -n1
> executable perl;     echo Perl `perl
> -V:version`
> executable sed;      sed --version | head
> -n1
> executable tar;      tar --version | head
> -n1
> executable makeinfo; echo "Texinfo: `makeinfo --version |
> head -n1`"
> executable xz;       xz --version |
> head -n1
> 
> echo -e "\n\n*** Review all versions for currency!"



More information about the lfs-support mailing list