This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
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