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

[netCDF #MXF-256225]: make check: undefined references to nf_*



Hi Marcus,

> make check fails, reporting undefined references to nf_*. The commands
> used to generate the attached output were:
> 
> configure --with-zlib=/opt/zlib --with-hdf5=/opt/hdf5 --prefix=/opt/netcdf 
> --disable-dap --disable-shared 2>&1 | tee c.txt
> make 2>&1 | tee m.txt
> make check 2>&1 | tee mc.txt
> 
> Libraries have been built using the latest Intel C++ and Fortran Composer
> XE (12.0.3), mpich2-1.3.2p1, zlib-1.2.5 and hdf5-1.8.6.
> 
> Any help is greatly appreciated.

It would be useful to know what you get when you run

  nm ../fortran/.libs/libnetcdff.a | grep nf_open"

to see how the name of the nf_open function is encoded in the compiled
Fortran library.  Your mpif90 compiler is expecting one underscore to be
appended, as in "nf_open_", but not finding a function by that name.  If
two underscores are found appended, as in "nf_open__", then you will need
to change the compiler option in CPPFLAGS to reflect how C functions are
called from Fortran, probably by adding -DpgiFortran to CPPFLAGS for the 
netcdf build.

--Russ

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



Ticket Details
===================
Ticket ID: MXF-256225
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.