This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: setting up gfortran
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: John Appleyard <john dot appleyard at polyhedron dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 02 Jun 2006 21:41:10 +0200
- Subject: Re: setting up gfortran
- References: <44808140.9080101@polyhedron.com>
John,
Like Steve, I have never downloaded a Linux binary. I just gave it a
try a few seconds ago; to my horror, I find that the "detailed
instructions" are missing. Please accept profuse apologies from us all.
This is how I got it up and running:
(i) Download the linux binary from
http://gcc.gnu.org/wiki/GFortranBinaries 32/64bit accroding to
requirements.
(ii) cd to the directory where you wish to install gfortran; let us say
$mypath, which might conveniently be /home or /home/myname or /etc (or
even /).
(iii) tar -zxvf $path_to_download/gfortran-linux.tar.gz
This will create a directory irun, under $mypath that contains
gfortran-4.2 and gcc-4.2 plus associated libraries. This will not
interfere with any other compiler.
(iii) $mypath/irun/bin/gfortran --version will tests that all is well.
You should see
GNU Fortran 95 (GCC) 4.2.0 20060602 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
(iv) I have to confess that on my solo user system, I use $mypath = "",
so that the invocation is /irun/bin/gfortran You might find it cleaner
to use /etc
(v) You will need to set LD_LIBRARY_FLAG or compile with -static.
(vi) Assuming that you are using bash, find your .bash_profile and add
the line,
export LD_LIBRARY_PATH=$mypath/irun/lib
alternatively, invoke bash at the command line and enter this previous line.
You should have an operational gfortran by now. I just went through
this process, with $mypath set to /tmp and it worked just fine.
Come back to us right away if this does not do it for you.
Best regards
Paul