See also the Installation Guide for 64-bit GFortran binaries.

Installation

NOTE: The package requires installation of the following additional libraries: GMP Library, MPFR Library, and MPC Library.

Here are the essential steps:

Install using the following command:

This will install gfortran in /usr/local/gfortran. You can then either set /usr/local/gfortran/bin to be in your search path or set up a link in your local ~/bin directory with this command as an example:

Alternatively you can put links in the /usr/local/bin like this:

Using gfortran

You can read the man pages for gfortran with this:

Assuming ~/bin is in your search path, you can invoke gfortran with:

Examples for setting the LD_LIBRARY_PATH

These examples assume that you installed gfortran at /opt/gcc-trunk.

Using the sh/bash/ksh etc. shell:

  if [ -z "$LD_LIBRARY_PATH" ]; then
    LD_LIBRARY_PATH="/usr/local/gfortran/lib"
  else
    LD_LIBRARY_PATH="/usr/local/gfortran/lib:$LD_LIBRARY_PATH"
  fi
  export LD_LIBRARY_PATH

and an example using the csh/tcsh shell:

  if !($?LD_LIBRARY_PATH) then
    setenv LD_LIBRARY_PATH "/usr/local/gfortran/lib"
  else
    setenv LD_LIBRARY_PATH "/usr/local/gfortran/lib:$LD_LIBRARY_PATH"
  endif

(One should not use "/usr/local/gfortran/lib:$LD_LIBRARY_PATH" if LD_LIBRARY_PATH is unset. The reason is that in that case the current directory is automatically included in the library path, which can be exploited by malicious users by placing a tinkered library in, e.g., /tmp.)

None: GFortranBinaries32Linux (last edited 2010-04-09 17:13:44 by pool-71-115-211-223)