Google
 

2/8/07

install gfortran from source file.

On Wed, Sep 21, 2005 at 06:09:52PM -0400, Prof J C Nash wrote:
> In trying to install gfortran I note that the installation instructions
> link leads to a blank page. Is there a good link please? (Linux install,
> specifically Debian for Xandros 3.02.
>

John,

To build gfortran from the gcc source distribution on linux
should be fairly straigth forward.

(1) Get gcc-4.0.1.tar.gz (see gcc.gnu.org)
Note 4.0.2 will be released in the next few days, and you'll
definitely want 4.0.2 over 4.0.1.
(2) Unpack.
cd tmp
tar xzf /path/to/gcc-4.0.1.tar.gz
(3) To build gfortran
mkdir obj
cd obj
../gcc-4.0.1/configure --enable-languages='c,fortran'
make bootstrap
(4) Install gfortran
make install
(5) Try buildling your software. Send bug reports.

Note, this will put gfortran under /usr/local/ if you want a
different directory use --prefix=/path/to/gfortran with configure.

--enable-languages=lang1,lang2,...
Specify that only a particular subset of compilers and their runtime libraries should be built. For a list of valid values for langN you can issue the following command in the gcc directory of your GCC source tree:
grep language= */config-lang.in

Currently, you can use any of the following: all, ada, c, c++, fortran, java, objc, obj-c++, treelang. Building the Ada compiler has special requirements, see below. If you do not pass this flag, or specify the option all, then all default languages available in the gcc sub-tree will be configured. Ada, Objective-C++, and treelang are not default languages; the rest are. Re-defining LANGUAGES when calling `make bootstrap' does not work anymore, as those language sub-directories might not have been configured!



Here are binary files for Mac.

http://gcc.gnu.org/wiki/GFortranBinaries

No comments: