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

[netCDF #WHT-303520]: Help!My netcdf~



Hi,

> I hope you can help me with the following probles.Thank you very much!
> To compile netcdf 4.1.3, I've followed the guide on GrADS supplibs page, 
> which is attached bellow. After successfully compiling the hdf5, zlib, szip, 
> curl, I use this command:
> ./configure --disable-f77 --enable-netcdf-4 --enable-dap --disable-shared \
> --with-hdf5=$HOME/supplibs/src/hdf5 \
> --with-zlib=$HOME/supplibs/src/zlib \
> --with-szlib=$HOME/supplibs/src/szip \
> --with-curl=$HOME/supplibs/src/curl \
> --prefix=$HOME/supplibs/src/netcdf
> to build the Makefile file,and it echos that:

It's not sufficient to just compile hdf5, you also have to install it with 
"make install".  From the error

> checking for library containing H5Fflush... no
> configure: error: Can't find or link to the hdf5 library. Use 
> --disable-netcdf-4, or see config.log for errors.

it appears that it hasn't been installed under 

  $HOME/supplibs/src/hdf5

Also, it's generally not a good idea to install libraries in the same 
directories where the source was unpacked,
because that can result in overwriting some of the source files.  Judging by 
the names of directories where
you are specifying the library installation locations, it looks as if yu're 
installing on top of the source files.

If I'm wrong and the HDF5 directory is properly installed in the 
$HOME/supplibs/src/hdf5/lib/ directory and the
hdf5.h and hdf5_hl.h header files are installed in 
$HOME/supplibs/src/hdf5/include/, then you'll need to look
at the config.h file for more details about what caused the error, or send it 
to us.

> p.s.
> $ uname -a
> Linux rex-ThinkPad-X220 3.5.0-24-generic #37-Ubuntu SMP Thu Feb 7 05:32:22 
> UTC 2013 i686 i686 i686 GNU/Linux
> 
> 
> p.p.s.THE GUIDE from GRADS:http://grads.iges.org/grads/gadoc/supplibs.html
> 
> cd $HOME/supplibs/src
> tar xvfz tarfiles/netcdf-4.1.3.tar.gz
> mkdir        netcdf
> cd netcdf-4.1.3
> 
> Note: before running configure, set the following environment variables:
> setenv LIBS "-lsz -lm -lrt -lz"
> setenv LDFLAGS -L$HOME/supplibs/lib
> setenv CPPFLAGS -I$HOME/supplibs/include/hdf5
> 
> ./configure --disable-f77 --enable-netcdf-4 --enable-dap --disable-shared \
> --with-hdf5=$HOME/supplibs/src/hdf5 \
> --with-zlib=$HOME/supplibs/src/zlib \
> --with-szlib=$HOME/supplibs/src/szip \
> --with-curl=$HOME/supplibs/src/curl \
> --prefix=$HOME/supplibs/src/netcdf
> make ;         make install
> cp $HOME/supplibs/src/netcdf/lib/libnetcdf.a $HOME/supplibs/lib
> mkdir $HOME/supplibs/include/netcdf
> cp $HOME/supplibs/src/netcdf/include/netcdf.h $HOME/supplibs/include/netcdf
> cp $HOME/supplibs/src/netcdf/bin/nc-config $HOME/supplibs/bin

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: WHT-303520
Department: Support netCDF
Priority: Normal
Status: Closed