NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Larry Baker US Geological Survey 650-329-5608 baker@xxxxxxxx On Oct 19, 2010, at 10:35 AM, Ed Hartnett wrote:
Larry Baker <baker@xxxxxxxx> writes:John,I have no experience with the version of the library you are trying tocompile, nor with Snow Leopard yet. However, my ./configure command is slightly different than yours, esp. note -DgFortran: ./configure >configure.log 2>&1 \ CC="gcc -m64" \ CFLAGS="-g -O2" \ CXX="g++ -m64" \ CXXFLAGS="-g -O2" \ CPPFLAGS="-DNDEBUG -DgFortran" \ FC="gfortran -m64" \ FCFLAGS="-g -O2" Larry Baker US Geological Survey 650-329-5608 baker@xxxxxxxx#!/bin/bash make distclean # export FCFLAGS='-m64' export CC=/usr/bin/cc export F77=gfortran export FC=gfortran export FCFLAGS=-qsuffix=cpp=f90 export CPPFLAGS='-Df2cFortran' # ./configure --prefix=/usr/local/netcdf-4.1.2-beta1 --enable-f90 -- with-curl=/usr/local/lib Assistance would be very helpful since I don't have a working copy of GMT on this machine at the moment and need one.It's a little confusing, but there are *two* sets of Fortran flags, onefor F77 (FFLAGS) and one for F90+ (FCFLAGS). If you are going to build 64 bit, with GNU compilers, you must use -m64 for BOTH F77 and F90. Furthermore, you also need to use the same flag for C (and C++ if you build that). So a better set of environment vars for your flags would be: CFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64 CXXFLAGS=-m64 Setting CPPFLAGS is tricky, as it depends on your version of gfortan. It should either be set to -Df2cFortran or (more likely)-DgFortran. One way to handle this is to try setting neither, and see ifthe netcdf configure script can figure it out. I hope this answers all the questions! Thanks, Ed -- Ed Hartnett -- ed@xxxxxxxxxxxxxxxx
netcdfgroup
archives: