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

[netCDF #PLN-405191]: Undefined symbols for architecture x86_64



Hi Dave,

You did everything right to build and install the netCDF C library, but you 
still have to
build and install the netCDF Fortran library.  The C, Fortran, and C++ 
libraries have been 
in separate distributions since version 4.1.3.  They were separated to make the 
processes
of building and diagnosing errors simpler, as well as to fix some problems with 
32- and
64-bit libraries for multiple Fortan compilers on the same platform.

Just get the netcdf-fortran-4.2 distribution (the latest operational release) 
from our
netCDF downloads page or

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.2.tar.gz

and build/install it according to these instructions:

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

Please let us know if you have any problems.

--Russ

> I'm trying to compile the WRF model under Mac OS X v.10.8.4, using the Intel 
> Fortran compiler (ifort, v.11.1), and the Apple cc compiler (v.4.2). It's a 
> 64-bit machine. I'm getting "Undefined symbols for architecture x86_64" 
> errors, for symbols that I think are supposed to be in libnetcdf.a:
> 
> "_nf_close_", referenced from: ...
> "_nf_def_dim_", referenced from: ...
> "_nf_def_var_", referenced from: …
> 
> etc.
> 
> I've got NetCDF-4.3.0 installed, using:
> 
> ./configure --prefix=/usr/local --disable-netcdf-4 --disable-dap
> 
> with the following environment variables set:
> 
> CC=/usr/bin/cc
> FC=/usr/bin/ifort
> 
> As far as I know, there were no configuration, make check, make install 
> errors.
> 
> I confirmed that the libnetcdf.a library was 64-bit:
> 
> ldm_virga% lipo -info /usr/local/lib/libnetcdf.a
> input file /usr/local/lib/libnetcdf.a is not a fat file
> Non-fat file: /usr/local/lib/libnetcdf.a is architecture: x86_64
> 
> For the benefit of the WRF compilation, I've got NETCDF set to /usr/local, 
> and later, for good measure, I tried setting:
> 
> INCLUDE_DIRS=-l/usr/local/incude
> LD_OPTIONS_NETCDF="-L/usr/local/lib -lnetcdf"
> CDFLIB=/usr/local/lib/libnetcdf.a
> 
> (They made no difference.)
> 
> Running "nm /usr/local/lib/libnetcdf.a | grep nf_close" produced 
> nothing--that symbol (and several others that I checked from the "undefined 
> symbols" error message from the compiler) seem to be absent from libnetcdf.a.
> 
> They are present in /usr/local/include/netcdf.inc, though. For example:
> 
> wrf_virga% grep nf_close /usr/local/include/netcdf.inc
> integer         nf_close
> external        nf_close
> 
> I don't know how to get libnetcdf.a built with the missing routines in it. 
> Any suggestions?
> 
> I've attached configure.log and make.log files captured from the NetCDF 
> installation. Also, a more complete list of the missing symbols, from the 
> output of the WRF compilation attempt.
> 
> -- Dave
> 
> ****************************************************************
> *                                      |         __ __    \|/  *
> *   Dr. Dave Dempsey                   | )   ^  /|| ||\  --0-- *
> *   Dept. of Geosciences               |) ) ^  / ||_|| \  /|\  *
> *   San Francisco State University     | ) )  /  | _ |  \      *
> *   1600 Holloway Ave.                 |)   )/   || ||   \     *
> *   San Francisco, CA   94132          | )   )   ||_||    \    *
> *                                      |)  ) )   | _ |     \   *
> *   Phone:  (415) 338-7716             |  )   )  || ||      \  *
> *   FAX:    (415) 338-7705             |)   )  )~~~~~~~~~~~~~~~*
> *   Email:  address@hidden<mailto:address@hidden>           |  )  )  )  ~  ~  
>  ~ ~  *
> *                                      |)  )   ) )  ~   ~  ~   *
> ****************************************************************
> 
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: PLN-405191
Department: Support netCDF
Priority: Normal
Status: Closed