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

[netCDF #LDB-240645]: WRF build failing ... is the issue my NetCDF build?



> Hi good support folks at Unidata -
> 
> 'Hope something will be obvious to a build guru there.
> 
> I'm trying to build WRF, failing, and my compile-time log there has the 
> following (and a whole lot more):
> 
> ... {many lines of the following general form} ...
> /.../netcdf-4.0.1/libsrc4/nc4hdf.c:823: undefined reference to `H5Tclose'
> /.../netcdf-4.0.1/libsrc4/nc4hdf.c:792: undefined reference to `H5Dextend'
> /.../netcdf-4.0.1/libsrc4/nc4hdf.c:794: undefined reference to `H5Dget_space'
> /.../netcdf-4.0.1/libsrc4/nc4hdf.c:796: undefined reference to 
> `H5Sselect_hyperslab'
> collect2: ld returned 1 exit status
> make[1]: [em_real] Error 1 (ignored)
> make[1]: Leaving directory `/.../WRF/smp/WRFV3/main'
> ...
> 
> 'Believe i carefully followed instructions in the INSTALL file that came with 
> netcdf... and i certainly didn't see anything alarming with 'make check'.  
> But i don't know what to make of the above.  Is the issue with my NetCDF 
> build / install?
> 
> Any insights? ' Can provide relevant logs & such.
> 
> 
> In deep gratitude,
> Karl

Howdy Karl!

Looks like you are not linking to the HDF5 libraries when building your 
application. This is necessary (unless your are using shared libraries).

Are you building netCDF? Or are you building something that links to netCDF?

If the former, you need to use the --with-hdf5= option to configure, to specify 
the location of the hdf5-1.8.4-patch1 library.

If the latter you need to add -lhdf5_hl -lhdf5 -lz to your link command. (You 
may be able to do this by setting environment variable LIBS, or you may have to 
modify a makefile.)

Please let me know if this doesn't help.

Thanks,

Ed

Ticket Details
===================
Ticket ID: LDB-240645
Department: Support netCDF
Priority: Normal
Status: Closed