Go to the first, previous, next, last section, table of contents.


Pre-installation Checks

Before installing the system, which includes installing gcc, you might want to do some minimum checking to ensure that some basic things work.

Here are some commands you can try, and output typically printed by them when they work:

sh# cd /usr/src/gcc
sh# ./g77 -B./ -v
g77 version 0.5.23
Driving: ./g77 -B./ -v -c -xf77-version /dev/null -xnone
Reading specs from ./specs
gcc version 2.8.1
 cpp -lang-c -v -isystem ./include -undef -D__GNUC__=2 ...
GNU CPP version 2.8.1 (Alpha GNU/Linux with ELF)
#include "..." search starts here:
#include <...> search starts here:
 include
 /usr/alpha-linux/include
 /usr/lib/gcc-lib/alpha-linux/2.8.1/include
 /usr/include
End of search list.
 ./f771 -fnull-version -quiet -dumpbase g77-version.f -version ...
GNU F77 version 2.8.1 (alpha-linux) compiled ...
GNU Fortran Front End version 0.5.23
 as -nocpp -o /tmp/cca14485.o /tmp/cca14485.s
 ld -m elf64alpha -G 8 -O1 -dynamic-linker /lib/ld-linux.so.2 ...
 /tmp/cca14485
__G77_LIBF77_VERSION__: 0.5.23
@(#)LIBF77 VERSION 19970919
__G77_LIBI77_VERSION__: 0.5.23
@(#) LIBI77 VERSION pjw,dmg-mods 19980405
__G77_LIBU77_VERSION__: 0.5.23
@(#) LIBU77 VERSION 19970919
sh# ./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone
Reading specs from ./specs
gcc version 2.8.1
 ./cpp -lang-c -v -isystem ./include -undef ...
GNU CPP version 2.8.1 (Alpha GNU/Linux with ELF)
#include "..." search starts here:
#include <...> search starts here:
 include
 /usr/alpha-linux/include
 /usr/lib/gcc-lib/alpha-linux/2.8.1/include
 /usr/include
End of search list.
 ./cc1 /tmp/cca18063.i -quiet -dumpbase null.c -version ...
GNU C version 2.8.1 (alpha-linux) compiled ...
 as -nocpp -o /tmp/cca180631.o /tmp/cca18063.s
 ld -m elf64alpha -G 8 -O1 -dynamic-linker /lib/ld-linux.so.2 ...
/usr/lib/crt1.o: In function `_start':
../sysdeps/alpha/elf/start.S:77: undefined reference to `main'
../sysdeps/alpha/elf/start.S:77: undefined reference to `main'
sh#

(Note that long lines have been truncated, and `...' used to indicate such truncations.)

The above two commands test whether g77 and gcc, respectively, are able to compile empty (null) source files, whether invocation of the C preprocessor works, whether libraries can be linked, and so on.

If the output you get from either of the above two commands is noticeably different, especially if it is shorter or longer in ways that do not look consistent with the above sample output, you probably should not install gcc and g77 until you have investigated further.

For example, you could try compiling actual applications and seeing how that works. (You might want to do that anyway, even if the above tests work.)

To compile using the not-yet-installed versions of gcc and g77, use the following commands to invoke them.

To invoke g77, type:

/usr/src/gcc/g77 -B/usr/src/gcc/ ...

To invoke gcc, type:

/usr/src/gcc/xgcc -B/usr/src/gcc/ ...


Go to the first, previous, next, last section, table of contents.