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

[netCDF #UWY-552980]: netCDF Fortran



Hello,

From the config.log file you provided, it appears that the issue is that the 
compiler is not linking against libhdf5.  In your LDFLAGS definition, try 
adding '-lhdf5_hl -lhdf5' after your existing definitions, and let us know if 
that solves the issue!

Thanks,

-Ward


> Hello!
> 
> I am trying to install the NetCDF-Fortran. I successfully installed al
> ZLIB, HDF5 and NetCDF-C and set my environment accordingly:
> 
> >
> > export DIR=$HOME/MPAS/Libs
> > export PATH=/usr/local/ifort/mpich/bin:$PATH
> > export CC=mpicc
> > export CXX=mpicxx
> > export FC=mpif90
> > export F77=mpif77
> > export HDF5=$DIR/grib2
> > export LD_LIBRARY_PATH=$HDF5/lib:$LD_LIBRARY_PATH
> > export PATH=$DIR/NETCDF/bin:$PATH
> > export NETCDF=$DIR/NETCDF
> > export LD_LIBRARY_PATH=$DIR/NETCDF/lib:$LD_LIBRARY_PATH
> 
> 
> In this case, zlib was built in the same dir as the hdf5: $DIR/grib2.
> 
> When I attempt to configure:
> 
> cd $HOME/MPAS/Downloads
> > cd netcdf-fortran-4.5.3/
> > export CPPFLAGS=-I$DIR/NETCDF/include
> > export LDFLAGS="-L$NETCDF/lib -L$HDF5/lib
> > ./configure --prefix=$DIR/NETCDF --disable-shared
> > CFLAGS="-no-multibyte-chars"
> 
> 
> I run into:
> 
> 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 tried to do what was asked but nothing seems to work. Do you have any
> suggestions? I attached the config.log file just in case
> 
> Best regards,
> 
> D.
> 
> 


Ticket Details
===================
Ticket ID: UWY-552980
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.