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

[netCDF #PZA-597868]: Configure: error: Could not link to netcdf C library.



It appears that the linker cannot find the libraries required by libnetcdf.so.  
 You'll want to use 'nc-config --libs' when running configure for 
netcdf-fortran, e.g.

    $ CFLAGS=$(nc-config --cflags) LDFLAGS=$(nc-config --libs) ./configure

If the error persists, depending how libhdf5 et. al. were compiled, you may 
need to run

    $ CFLAGS=$(nc-config --cflags) LDFLAGS="${nc-config --libs --static) 
./configure

Try these and let us know if you encounter any other errors.

Thanks!

-Ward

> Dear Support NetCDF team
> 
> I have been trying to install netcdf-f-4.5.3 on the HPC system to run WRF but 
> it gives the following error.
> 
> "configure: error: Could not link to netcdf C library. Please set LDFLAGS; 
> for static builds set LIBS to the results of nc-config --libs."
> 
> I have already installed the libraries (zlib-1.2.11, hdf5-1.12.0, 
> netcdf-c-4.7.4) in same folder 
> (/srv/ccrc/data53/z5239661/wrf/wrf_install_intel/wrf_libs_intel/) with no 
> errors (make check).
> 
> I have attached the complete "config.log" file generated by running configure.
> Any comments would be very appreciated.
> 
> All the best
> Youngil Kim
> 
> 


Ticket Details
===================
Ticket ID: PZA-597868
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.