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

[netCDF #CWH-526599]: problem with netcdf-fortran-4.2 (nc_open not found)



Hi Sven,

> trying to get things work on another operating system than the one I used
> before I encountered the following problem:
> 
> When I run "make check" for netcdf-fortran-4.2 there are many errors like
> util.F:(.text+0x5644): undefined reference to `nf_open_'
> 
> I attached the "config.log" which tells me that there is a problem with
> nc_open.
> Maybe with its help you can give me an advise.
> 
> Comment: I need to compile netcdf-fortran with mpicc and mpif90.

From config.log, this is where the first problem is detected:

> configure:18686: checking for library containing nc_open
> configure:18717: mpicc -o conftest -O3 -xHost -ip -no-prec-div -static 
> -L/home/sven/local/lib -I/home/sven/local/include 
> -I/home/sven/Downloads/netcdf-fortran-4.2/fortran -I/home/sven/local/include 
> -L/home/sven/local/lib conftest.c  >&5
> /tmp/iccTXpGxK.o: In function `main':
> conftest.c:(.text+0x2b): undefined reference to `nc_open'

From this, it's not clear where the netCDF C library was installed or
whether it's installed as a static library or a shared library.

Here's the instructions for building netcdf-fortran-4.2, with details
such as why it's sometimes necessary to set environment variables such
as LS_LIBRARY_PATH when building from source:

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

There's also some details there about parallel builds with mpicc and
mpif90.

If that doesn't work, please send us the environemnt variables you
have set and exactly how you invoked the configure script.

Thanks!

--Russ

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



Ticket Details
===================
Ticket ID: CWH-526599
Department: Support netCDF
Priority: Normal
Status: Closed