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

[netCDF #NOM-755338]: Can't find or link to the hdf5 library



Hi Philip,

Thanks for the bug report; I'll take a look at the HDF5 documentation and make 
the necessary changes to our documents.

Regarding the build process finding HDF5;  using  `--with-hdf5` and 
`--with-zlib` to specify the location of hdf5 and zlib have been long 
deprecated;  you'll want to use the CFLAGS and LDFLAGS environmental variables 
instead.  If your libraries lived in /home/me/local, for example, you would use 
them as follows:

    $ CFLAGS="-I/home/me/local/include" LDFLAGS="-L/home/me/local/lib" 
./configure

For your specific example I think you could use:

    $ CFLAGS="-I/home/me/zlib -I/home/me/hdf5" LDFLAGS="-L/home/me/zlib 
-L/home/me/hdf5" ./configure

but that assumes that both your include files and the compiled libraries live 
at the top level of /home/me/hdf5 and /home/me/zlib.  

Give this a shot and let me know if it doesn't resolve the issue.  Note that 
you might also have to modify your LD_LIBRARY_PATH variable at *runtime* to 
include both locations, but that should be necessary if you are using shared 
libraries. 

Have a great day!

-Ward


> Full Name: Philip Underwood
> Email Address: address@hidden
> Organization: UNEP-WCMC
> Package Version: 4.3.3.1
> Operating System: openSUSE 12.1
> Hardware: x86_64
> Description of problem:
> 
> Hi there,
> 
> I've been trying the various compilation options for NetCDF with version
> 4 support for a couple of days without success. It seems that no matter
> how I attempt to do this I am presented with the message below when
> executing ./configure:
> 
> 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.
> 
> I'm compiling and installing zlib without trouble. HDF5 also appears
> to install without problem. Although the trouble I've been experiencing
> has led me to compile this with szip and with C++ and Fortran enabled.
> 
> I started out installing these in standaline directories,
> e.g. /home/me/zlib and /home/me/hdf5. With this approach I used the
> --with-zlib=/home/me/zlib and --with-hdf5=/home/me/hdf5 switches. I've
> also followed the suggestion in the NetCDF installation instructions
> (https://www.unidata.ucar.edu/software/netcdf/docs/build_default.html)
> of installing all these libraries in a common directory tree, and thus set
> CPPFLAGS and LDFLAGS accordingly. Yet every time, I get the same message.
> 
> Please see my latest config.log file attached. Do you have any idea
> what's going wrong?
> 
> Cheers,
> Phil
> 
> P.S. I also found that the instructions for installing HDF5 were not 
> accurate. I found that it fails with 'make check install', where as 'make', 
> followed by 'make check', then 'make install' worked perfectly. Please see 
> http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/release_docs/INSTALL
> 
> 


Ticket Details
===================
Ticket ID: NOM-755338
Department: Support netCDF
Priority: Normal
Status: Closed