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


Where in the World Does Fortran (and GNU CC) Go?

Before configuring, you should make sure you know where you want the g77 and gcc binaries to be installed after they're built, because this information is given to the configuration tool and used during the build itself.

A g77 installation normally includes installation of a Fortran-aware version of gcc, so that the gcc command recognizes Fortran source files and knows how to compile them.

For this to work, the version of gcc that you will be building as part of g77 must be installed as the "active" version of gcc on the system.

Sometimes people make the mistake of installing gcc as `/usr/local/bin/gcc', leaving an older, non-Fortran-aware version in `/usr/bin/gcc'. (Or, the opposite happens.) This can result in gcc being unable to compile Fortran source files, because when the older version of gcc is invoked, it complains that it does not recognize the language, or the file name suffix.

So, determine whether gcc already is installed on your system, and, if so, where it is installed, and prepare to configure the new version of gcc you'll be building so that it installs over the existing version of gcc.

You might want to back up your existing copy of `/usr/bin/gcc', and the entire `/usr/lib' directory, before you perform the actual installation (as described in this manual).

Existing gcc installations typically are found in `/usr' or `/usr/local'. (This means the commands are installed in `/usr/bin' or `/usr/local/bin', the libraries in `/usr/lib' or `/usr/local/lib', and so on.)

If you aren't certain where the currently installed version of gcc and its related programs reside, look at the output of this command:

gcc -v -o /tmp/delete-me -xc /dev/null -xnone

All sorts of interesting information on the locations of various gcc-related programs and data files should be visible in the output of the above command. (The output also is likely to include a diagnostic from the linker, since there's no `main_()' function.) However, you do have to sift through it yourself; gcc currently provides no easy way to ask it where it is installed and where it looks for the various programs and data files it calls on to do its work.

Just building g77 should not overwrite any installed programs--but, usually, after you build g77, you will want to install it, so backing up anything it might overwrite is a good idea. (This is true for any package, not just g77, though in this case it is intentional that g77 overwrites gcc if it is already installed--it is unusual that the installation process for one distribution intentionally overwrites a program or file installed by another distribution, although, in this case, g77 is an augmentation of the gcc distribution.)

Another reason to back up the existing version first, or make sure you can restore it easily, is that it might be an older version on which other users have come to depend for certain behaviors. However, even the new version of gcc you install will offer users the ability to specify an older version of the actual compilation programs if desired, and these older versions need not include any g77 components. See section `Specifying Target Machine and Compiler Version' in Using and Porting GNU CC, for information on the `-V' option of gcc.


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