Re: How to migrate to gfortran on Mac OS X?

From: Eric Salathe (salathe AT washington.edu)
Date: Tue Oct 04 2005 - 11:52:28 MDT


Nathan-

I assume you are most interested in compiling ncarg from source using
gfortran. This may take some work and may be a worthwhile project. In
the meantime, if you install libg2c.a (or libf2c.a), you will be able
to use the g77-compiled binary libraries provided you add -lg2c to your
compile statement in gfortran. In this way, the g77 binaries work with
any compiler I have tried.

This works on my Mac, with the g77-compiled binaries in
/usr/local/ncarg_4.4.0:

gfortran -o example_gfortran example.f90 \
   -L/usr/local/ncarg_4.4.0/lib -L/usr/X11R6/lib \
   -lncarg -lncarg_gks -lncarg_c -lXpm -lX11 -lXext -lf2c

-Eric

On Oct 3, 2005, at 10:41 PM, Nathan Nutter wrote:

> I am an undergraduate student, who is just learning Fortran and I
> don't have any interest in using Fortran 77 and hence I don't even
> want g77 on my Mac.
>
> I have been trying to get NCARG to build using gfortran on Mac OS X
> (10.4.2). I would like to know how this can be done. I have not been
> able to determine whether it is possible or not from the mailing list.
> It looks like it is possible to build with gfortran just not on Mac? I
> don't know.
>
> A couple of problems I have noticed so far:
> 1) I don't think gfortran has/needs/installs the library g2c.
> 2) The install script doesn't seem to build Iftran or when another
> build tries to use it then it might be looking in the wrong location.
> 3) -lcc_dynamic does not seem to be a valid options and produces
> warning/errors during the install.
>
> If I can help in anyway just let me know and if you already know how
> the process should go then I am listening.
>
> Thanks all,
> Nathan Nutter
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>

--
Eric Salathe
Climate Impacts Group             <salathe@washington.edu>
University of Washington          
<http://www.atmos.washington.edu/~salathe>

_______________________________________________ ncarg-talk mailing list ncarg-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncarg-talk



This archive was generated by hypermail 2b29 : Thu Oct 06 2005 - 16:33:26 MDT