[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #UUD-717336]: netcdf fortran compile problem



Hi Eric,

> On a MacBook Pro running Mac OS X 10.6.8, I'm attempting to compile the
> NetCDF Fortran libraries (version 4.2) after (successfully as far as I can
> tell) doing the normal build (version 4.3.0-rc1).  When I attempt "make
> check" for the Fortran libraries, I get an error related to "Making check
> in nf_test",:
> 
> Undefined symbols:
> "_nf_get_varm_text_", referenced from:
> _test_nf_get_varm_text_ in test_get.o
> _test_nf_get_varm_text_ in test_get.o
> etc.
> 
> The output of the configuration and "make check" are in the attached files
> config.log and check.out.  Please let me know if you have any ideas what
> the problem might be.

First, on my Mac laptop, I installed netcdf-4.2.1.1 and netcdf-fortran-4.2 by
just using the MacPorts netcdf-fortran package that Takeshi Horinouchi 
maintains,
using:

  sudo port install netcdf-fortran

But if you don't have MacPorts (http://www.macports.org/) already installed, 
that
can be an obstacle.

You didn't say whether you're following these steps:

  http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html

but they have some hints that have cleared up some problems.

In particular, there is this, which is relevant when you're using mpicc and 
mpif90:

 For parallel I/O: The configure script sets CFLAGS appropriately for standard 
compilers, 
 but if  you are building with parallel I/O using wrappers such as mpicc and 
mpif90, you 
 sometimes have to set CFLAGS to indicate which Fortran compiler is wrapped by 
mpif90. For 
 example, if "mpicc --show" and "mpif90 --show" indicate gcc and gfortran are 
being used, 
 then set CFLAGS=-DgFortran, and similarly set CFLAGS=-DpgiFortran for Portland 
Group 
 compilers.

So CFLAGS=-DgFortran would have had to be set in the netCDF C library build, 
before 
trying to build the separate Fortran library with gfortran.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: UUD-717336
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.