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

[netCDF #JZT-105309]: neCDF 4.3.0 installation issue - Can't find or link to the hdf5 library



Peter,

> I actually ran the build a number of times with different combinations, so 
> the config.log has been overwritten.
> (I added in the hdf5 library in the LD_LIBRARY_PATH at the front just in case 
> it would make any difference.)
> 
> I have just re-ran the part of the script that builds netCDF and produced 
> another config.log.
> 
> I have attached the config.log and the make log as well.
> 
> I shall try building the netCDF with gcc, but our user would like to use the 
> netCDF linked with Intel compilers as well.
> So it will be useful to resolve this.

The problem is that szlib is not being found because "-lsz" is not included
with the ld flags when configure tests with a program containing a call to
H5Fflush.  I didn't see this problem, because we don't test with szlib and
I was misled by the error message that it couldn't find libhdf5 rather
than libsz.

It may be you can force the search for szlib by just adding "LDLIBS=-lsz"
to your configure invocation for netCDF.  I think the configure script
should have included this, but it's not well tested, because we don't
test adequately with szlib.  Thanks for reporting this problem and being
persistent about getting it resolved.

By the way, the clue was in the config.log, where the third try at finding
H5Fflush resulted in these error messages:

  configure:16229: /opt/intel/composer_xe_2013.0.079/bin/intel64/icc -o 
conftest -g -O2 -I/usr/local/hdf5-1.8.9intel/include 
-L/usr/local/hdf5-1.8.9intel/lib conftest.c -lhdf5  -lm -lcurl  >&5
  /usr/local/hdf5-1.8.9intel/lib/libhdf5.a(H5Z.o): In function `H5Zunregister':
  H5Z.c:(.text+0xa9b): undefined reference to `SZ_encoder_enabled'
  /usr/local/hdf5-1.8.9intel/lib/libhdf5.a(H5Z.o): In function `H5Z_unregister':
  H5Z.c:(.text+0x1872): undefined reference to `SZ_encoder_enabled'
    ...
  /usr/local/hdf5-1.8.9intel/lib/libhdf5.a(H5Z.o):H5Z.c:(.text+0x67f1): more 
undefined references to `SZ_encoder_enabled' follow
  /usr/local/hdf5-1.8.9intel/lib/libhdf5.a(H5Zszip.o): In function 
`H5Z_filter_szip':
  H5Zszip.c:(.text+0x6f2): undefined reference to `SZ_BufftoBuffDecompress'
  H5Zszip.c:(.text+0x7c9): undefined reference to `SZ_BufftoBuffCompress'
  configure:16229: $? = 1
  configure: failed program was:
    ...
  | return H5Fflush ();
    ...
  configure:16246: result: no
  configure:16253: error: Can't find or link to the hdf5 library. Use 
--disable-netcdf-4, or see config.log for errors.

I'm testing the LDLIBS=-lsz workaround here, just to make sure it works ...

--Russ


> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden]
> Sent: 20 June 2013 03:19
> To: Chiu, Peter (STFC,RAL,RALSP)
> Cc: address@hidden
> Subject: [netCDF #JZT-105309]: neCDF 4.3.0 installation issue - Can't find or 
> link to the hdf5 library
> 
> Peter,
> 
> One more thing I should have requested.  Could you send the entire 
> netCDF-4.3.0 config.log produced by running the netCDF configure script?  It 
> provides more detailed information that might give us an idea why the 
> installed hdf5-1.8.9 library is not being found ...
> 
> --Russ
> 
> > > I am trying to install netCDF 4.3.0 on a Scientific Linux 6.4
> > > system with Intel studio c and fortran compilers but have hit a
> > > problem, wonder if you can help resolve this.
> > >
> > > I used the following commands (in a script) to install hdf5-1.8.9,
> > > which appears to have gone through the "make check" without major 
> > > problems.
> > >
> > > When it comes down to install netCDF 4.3.0, it then complains with
> > > the above error.
> > >
> > > As you can see from the script, I have already exported the
> > > environment variables CPPFLAGS, LDFLAGS, and LD_LIBRARY_PATH to
> > > point to the installed location on hdf5-1.8.9.  I have also
> > > confirmed the hdf5 installed location being correct.
> > >
> > > However the fault persists.  I have attached the log on this installation.
> >
> > I can't duplicate the problem here, using HDF5-1.8.9, netCDF 4.3.0,
> > and a shell script very similar to yours, except that I use gcc rather
> > than Intel compilers, and I didn't enable fortran or cxx in the HDF
> > libraries (those APIs aren't used by netCDF-4).  I note that you
> > repeated the HDF5-1.8.9 library location in the first and third
> > position of your LD_LIBRARY_PATH and LD_RUN_PATH env variables, but that 
> > shouldn't cause a problem.
> >
> > Does it all work if you use gcc instead of icc?
> >
> > --Russ
> >
> >
> > > Much grateful if anyone can advise on this.
> > >
> > > Regards,
> > >
> > > Peter Chiu
> > >
> > > STFC Rutherford Appleton Laboratory
> > > UK
> > > echo "Enable intel 64 compilers"
> > > #intel64
> > > source /opt/intel/bin/compilervars.sh intel64
> > >
> > > CC=/opt/intel/composer_xe_2013.0.079/bin/intel64/icc
> > >
> > > FC=/opt/intel/composer_xe_2013.0.079/bin/intel64/ifort
> > >
> > > CXX=/opt/intel/composer_xe_2013.0.079/bin/intel64/icpc
> > >
> > > export CC FC CXX
> > > ls $CC $FC $CXX
> > >
> > > echo "Start installing hdf5-1.8.9 with intel"
> > > cd /usr/local/kits/netcdf-src/hdf5-1.8.9
> > >
> > > make distclean
> > >
> > > ./configure --prefix=/usr/local/hdf5-1.8.9intel
> > > --with-szlib=/usr/local/szip \
> > > --with-zlib=/usr/local/zlib1.2.7 --enable-fortran --enable-cxx
> > > --disable-shared echo; echo "`date`: make"
> > > make
> > > echo; echo "`date`: make check"
> > > make check
> > > echo; echo "`date`: make check install"
> > > make install
> > >
> > > echo
> > >
> > > echo "Set CPPFLAGS..."
> > > CPPFLAGS='-I/usr/local/hdf5-1.8.9intel/include'
> > >
> > > ls /usr/local/hdf5-1.8.9intel/include /usr/local/szip/include
> > > /usr/local/zlib1.2.7/include
> > >
> > > echo "Set LDFLAGS..."
> > > LDFLAGS='-L/usr/local/hdf5-1.8.9intel/lib'
> > >
> > > ls /opt/intel/composer_xe_2013.0.079/compiler/lib/intel64
> > > /usr/local/hdf5-1.8.9intel/lib /usr/local/szip/lib
> > > /usr/local/zlib1.2.7/lib export CPPFLAGS LDFLAGS
> > >
> > > LD_LIBRARY_PATH="/usr/local/hdf5-1.8.9intel/lib:/opt/intel/composer_xe_2013.0.079/compiler/lib/intel64:/usr/local/hdf5-1.8.9intel/lib:/usr/local/szip/lib:/usr/local/zlib1.2.7/lib:$LD_LIBRARY_PATH"
> > > LD_RUN_PATH="/usr/local/hdf5-1.8.9intel/lib:/opt/intel/composer_xe_2013.0.079/compiler/lib/intel64:/usr/local/hdf5-1.8.9intel/lib:/usr/local/szip/lib:/usr/local/zlib1.2.7/lib:$LD_RUN_PATH"
> > >
> > > export LD_LIBRARY_PATH LD_RUN_PATH
> > >
> > > cd /usr/local/kits/netcdf-src/netcdf-4.3.0
> > >
> > > make distclean
> > >
> > > ./configure --prefix=/usr/local/netcdf-4.3.0ifort64-hdf5-1.8.9
> > > --disable-dap-remote-tests
> > >
> > > make
> > > make check
> > >
> > >
> > > --
> > > Scanned by iCritical.
> > >
> > >
> > >
> >
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> 
> Russ Rew                                         UCAR Unidata Program
> address@hidden                      http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: JZT-105309
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 

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



Ticket Details
===================
Ticket ID: JZT-105309
Department: Support netCDF
Priority: Normal
Status: Closed