-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure: error: HDF5 support requested with arg..., but no hdf5 lib found #2053
Comments
Here are a couple of random hacking suggestions. I just built gdal 3.0.1 on Mac yesterday with HDF5, and no problem. Try configure with I hesitate to suggest backing down from 3.0.2 to 3.0.1, because 3.0.2 is billed as a relatively simple bug fix release. That should not matter. This message: |
It looks to me like either |
Never mind about that last remark. |
Encountered the same issue on CenOS7. This is not the only library with the same problem. I can't normally configure also:
GDAL can not find hdf5 libraries from vcpkg in headers (for me they are build to I have installed static hdf5 and expat libraries. I've tried --with-hdf4 \
--with-hdf5="/usr/lib64" \
--with-expat=${vc_packages} Truncated configure output:
|
Same issue (gdal 3.2.3, hdf5-1.10 on centos7) I noticed the failed tests was: My problem was, my problem was that I didn't have libpng installed in this folder... I don't know if this will help you, but for me it works. |
closing as configure has been removed and replaced by cmake |
I know it is closed but I had the same issue recently which could also occur when linking dynamic libraries and using cmake. In my case the real problem wasn't that hdf5 wasn't found but that the hdf5 library was dynamically linked to something else such as libsz which wasn't found. I had to set LD_LIBRARY_PATH since the libsz was linked dynamically. Using LDFLAGS to specify the path to libraries did not fix all of the issues related to finding other libraries. |
If you are still having a problem, please start a new issue, or post to the user list. Include your specific error message and version information. |
that's fully expected if libsz isn't in a directory that is searched by default for dynamic library loaded. No bug here. Just standard operating system working |
Hi All
The configure process doesn't pick up the existing hdf5 library I passed through the following command line
"""
$ ./configure --prefix=$APP_PATH --with-gnu-ld --with-python=$PYTHON3_ROOT/bin/python3 --with-java=$JAVA_ROOT--with-hdf4=$HDF4_ROOT --with-hdf5=$HDF5_ROOT --with-netcdf=$NETCDF_ROOT --with-geos=yes --with-cfitsio=$CFITSIO_ROOT/lib --with-xerces=$XERCES_ROOT --with-xerces-inc=$XERCES_ROOT/include --with-xerces-lib="-L/apps/xerces-c/3.2.2/lib -lxerces-c-3.2" --with-proj=$PROJ_ROOT --with-gif=/usr/lib64 --with-png=/usr/lib64 --with-jasper=/user/lib64 --with-libtiff=/usr/lib64 --with-jpeg=/usr/lib64 --with-geotiff=internal
"""
The error message says
"""
.....
checking for H5Fopen in -lhdf5... no
configure: error: HDF5 support requested with arg /apps/hdf5/1.10.5, but no hdf5 lib found
"""
But I got
"""
$ ls -ltrah $HDF5_ROOT/lib/libhdf5.so
lrwxrwxrwx 1 apps z30 18 Nov 4 17:25 /apps/hdf5/1.10.5/lib/libhdf5.so -> libhdf5.so.103.1.0
"""
and
"""
$ nm $HDF5_ROOT/lib/libhdf5.so | grep H5Fopen
00000000000f8555 T H5Fopen
"""
I also added the line
"""
echo $LIBS
"""
into the file ./configure after this section
"""
if test -d $with_hdf5/lib ; then
HDF5_LIB_DIR=$with_hdf5/lib
else
HDF5_LIB_DIR=$with_hdf5
fi
ORIG_LIBS="$LIBS"
LIBS="-L$HDF5_LIB_DIR $LIBS -lhdf5"
"""
and before it checks for the function H5Fopen. The variable LIBS is printed as
"""
-L/apps/hdf5/1.10.5/lib -L/usr/lib64 -L/usr/lib64/lib -lgif -L/usr/lib64 -L/usr/lib64/lib -ljpeg -L/usr/lib64/lib -ltiff -L/usr/lib64 -L/usr/lib64/lib -lpng -L/apps/cfitsio/3.47/lib -L/apps/cfitsio/3.47/lib/lib -lcfitsio -lpq -L/apps/proj/6.2.1/lib -lproj -lz -lpthread -lm -lrt -ldl -lhdf5
"""
Why it doesn't pickup the hdf5 library pre-installed in my system? I actually browsed through the configure file and don't understand why ${ac_cv_lib_hdf5_H5Fopen+:} false is true and where actually the variable is set.
I have to say the following
if-elif-else-fi
statement is not very reader friendly."""
if test "$with_hdf5" = "no" ; then
HAVE_HDF5=no
echo "hdf5 support disabled."
elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then
HDF5_CFLAGS=""
HDF5_LIBS=""
...
else
if test -d $with_hdf5/lib ; then
HDF5_LIB_DIR=$with_hdf5/lib
else
HDF5_LIB_DIR=$with_hdf5
fi
ORIG_LIBS="$LIBS"
LIBS="-L$HDF5_LIB_DIR $LIBS -lhdf5"
echo $LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5
$as_echo_n "checking for H5Fopen in -lhdf5... " >&6; }
if ${ac_cv_lib_hdf5_H5Fopen+:} false; then :
$as_echo_n "(cached) " >&6
else
....
fi
...
fi
"""
It tooks me hours to figure out the structure but I got even more confused about where the variable ac_cv_lib_hdf5_H5Fopen is defined.
Steps to reproduce the problem.
wget https://github.com/OSGeo/gdal/releases/download/v3.0.2/gdal-3.0.2.tar.gz
tar -xzf gdal-3.0.2.tar.gz
cd gdal-3.0.2
%%% I set the system specific variables like APP_PATH, PYTHON3_ROOT, and HDF5_ROOT here.
./configure --prefix=$APP_PATH --with-gnu-ld --with-python=$PYTHON3_ROOT/bin/python3 --with-java=$JAVA_ROOT--with-hdf4=$HDF4_ROOT --with-hdf5=$HDF5_ROOT --with-netcdf=$NETCDF_ROOT --with-geos=yes --with-cfitsio=$CFITSIO_ROOT/lib --with-xerces=$XERCES_ROOT --with-xerces-inc=$XERCES_ROOT/include --with-xerces-lib="-L/apps/xerces-c/3.2.2/lib -lxerces-c-3.2" --with-proj=$PROJ_ROOT --with-gif=/usr/lib64 --with-png=/usr/lib64 --with-jasper=/user/lib64 --with-libtiff=/usr/lib64 --with-jpeg=/usr/lib64 --with-geotiff=internal
Operating system
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 8.0.1905 (Core)
Release: 8.0.1905
Codename: Core
GDAL version and provenance
3.0.2
The text was updated successfully, but these errors were encountered: