NRAO
 

Astronomical Image Processing System

[AIPS]

Steps to install GNU 2.95.3 compiler in Linux

Go to http://www.gnu.org/software/gcc/
  • Download instructions.
  • Click link to releases, then the link to either 2.95.3 (do NOT use 3.0 or 3.1 versions), then the link to GNU mirror sites. Choose one.
  • Download gcc-2.95.3.tar.gz 2.95.3 is preferred; 3.0.2, 3.1, and 3.2 produce slower code, while 3.0.3 and 3.0.4 do not work 3.2+ with new options (OPT2="-O2") works fairly well and is recommended for RedHat 9 systems.
  • Or download the tarball from us at gcc-2.95.3.tar.gz
  • Anonymous ftp to ftp.aoc.nrao.edu, area pub/staff/egreisen, file gcc-2.95.3.ps.gz will also work. Be sure to use binary.
  • Unpack the tarball with tar xzvf gcc-2.95.3.tar.gz (1)
  • cd gcc-2.95.3
  • ./configure
  • make bootstrap
  • make install (2)
Gcc-2.95.3 binaries (such as gcc or g77) can be accessed via /usr/local/bin/gcc or /usr/local/bin/g77.

Notes

  1. Note this will make a subdirectory called gcc-2.95.3 in the directory the tar file was downloaded to.
  2. This will install in /usr/local/{bin,lib,include}. If you want the location to be elsewhere you must run configure with the --prefix=dirname argument for instance
    ./configure --prefix=/usr/local/gcc
    In this case you must mkdir /usr/local/gcc first. You will almost certainly need root access to do this step.
  3. Do NOT replace the gcc and g77 in the bin, lib, et al. directories below /usr. These are needed by your operating system and it will not take kindly to being overwritten.
  4. Tests show that gcc-3.0.3 and 3.0.4 produce code that does not work in some tasks, particularly COMB. Furthermore, all 3.0, 3.1, and 3.2 versions produce code that is 10-25% slower than that produced by 2.95.3 on a Pentium IV.

AIPS Changes

If your AIPS has not yet been installed, things are pretty simple. While running install.pl or update.pl you will be asked if the automatically detected compilers are correct. Answer no and then provide the path to where you put the 2.95 compilers. The installaion will then edit the necessary files for you.

If you installed AIPS using the 2.96 compiler you have much more work to do:

  1. Edit $SYSLOCAL files named CCOPTS.SH, LDOPTS.SH, and FDEFAULT.SH to change the path to "COMPILER" to the new 2.95 path.
  2. rm $LIBR/*/SUBLIB
  3. cd $TST/$ARCH/INSTALL
  4. rm *.LIS
  5. ( INSTEP2 >/dev/null 2>>INSTEP2.ERR & )
  6. ( INSTEP4 >/dev/null 2>>INSTEP4.ERR & )

The first step selects the new compilers. If FDEFAULT.SH is not in $SYSLOCAL change the one in $TST/$ARCH/SYSTEM or, if that is not there, the one in $SYSUNIX (be sure to do the part for your architecture, i.e. LINUX). The next three steps clear away things made during the last installation that will block a new installation. The next step recompiles all of the subroutine libraries and the last step compiles and links all of the programs.


Modified on $Date: 2007/10/29 21:07:27 $
Eric W. Greisen