Re: sd_nc* undefined references

From: Rick Grubin <grubin_at_nyahnyahspammersnyahnyah>
Date: Wed, 5 Mar 2008 09:36:08 -0700

Hi Jeff

> I'm getting undefined references to `sd_nc*' errors when attempting
> to build NCL 5.0.0 on a RHEL3 system. HDF4 was compiled with --
> enable-netcdf turned on. Can anyone tell me where the references
> can be found, and/or what I might have done incorrectly?

Building HDF4 with its implementation of netCDF enabled causes
problems for NCL, as NCL requires the HDF build to specifically not
create
and include its own netCDF implementation into its libraries. The
INSTALL file in the HDF source distribution notes:

4. Using HDF/MFHDF libraries with original netCDF library
    ======================================================

    To use the HDF/MFHDF libraries (libdf.a, libmfhdf.a) with the
    original netCDF library (libnetcdf.a), the HDF4 distribution
    must be configured with the --disable-netcdf configuration flag.
    This will rename the HDF version of the C-interface (ncxxx) of
    the netCDF API to sd_ncxxx and disbale NC Fortran interfaces to
    avoid clashing with the original netCDF C and Fortran APIs from
    libnetcdf.a.

With HDF built enabling its own netCDF implementation, the HDF
libraries will not have its interfaces renamed as above, and NCL
source code
will not find the function signatures it requires to use HDF
functionality.

The NCL web documentation notes how to build HDF in ways (depending
on the version of HDF source code you have) that are palatable
to NCL. Please see:

http://www.ncl.ucar.edu/Download/build_from_src.shtml#HDF-4
http://www.ncl.ucar.edu/Download/BuildingNCL.shtml

Building/installing HDF as noted in the above documentation should
take care of the undefined references noted below.

> NclHDF.o(.text+0x5d): In function `HDFGetAttrVal':: undefined
> reference to `sd_ncattget'
> [...]

----
Rick Grubin NCAR/TDD/CISL/VETS
Visualization + Enabling Technologies
grubin_at_ucar.edu 303.497.1832

_______________________________________________
ncl-install mailing list
ncl-install_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-install
Received on Wed Mar 05 2008 - 09:36:08 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 13 2008 - 17:23:34 MDT