ncbi-vdb
ncbi-vdb copied to clipboard
error: too few arguments to function ‘H5Oget_info_by_name3’
While following the instructions to compile from source, I faced this error after running ./configure && make
:
Here is the colored version to help readability, the text of the error is also accessible in the collapsed section after the image:
The error log in text format
[ 57%] Building C object libs/ext/magic/CMakeFiles/magic.dir/apptype.c.o
[ 57%] Building C object libs/ext/magic/CMakeFiles/magic.dir/cdf.c.o
[ 57%] Building C object libs/ext/magic/CMakeFiles/magic.dir/cdf_time.c.o
[ 57%] Building C object libs/ext/magic/CMakeFiles/magic.dir/readcdf.c.o
[ 57%] Building C object libs/ext/magic/CMakeFiles/magic.dir/strlcat.c.o
[ 57%] Building C object libs/ext/magic/CMakeFiles/magic.dir/strlcpy.c.o
[ 57%] Linking C static library /home/mehrad/ncbi-outdir/ncbi-vdb/linux/gcc/x86_64/rel/lib/libmagic.a
[ 57%] Built target magic
[ 57%] Building C object libs/hdf5/CMakeFiles/kdf5.dir/hdf5arrayfile.c.o
[ 57%] Building C object libs/hdf5/CMakeFiles/kdf5.dir/hdf5dir.c.o
In file included from /usr/include/H5public.h:32,
from /usr/include/hdf5.h:22,
from /home/mehrad/Applications/sra-tools/ncbi-vdb-3.0.0/libs/hdf5/hdf5dir.c:35:
/home/mehrad/Applications/sra-tools/ncbi-vdb-3.0.0/libs/hdf5/hdf5dir.c: In function ‘HDF5DirPathTypeOnBuffer’:
/home/mehrad/Applications/sra-tools/ncbi-vdb-3.0.0/libs/hdf5/hdf5dir.c:295:18: error: too few arguments to function ‘H5Oget_info_by_name3’
295 | herr_t h5e = H5Oget_info_by_name( self->hdf5_handle, buffer, &obj_info, H5P_DEFAULT );
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/H5Apublic.h:22,
from /usr/include/hdf5.h:23:
/usr/include/H5Opublic.h:521:15: note: declared here
521 | H5_DLL herr_t H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo, unsigned fields,
| ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [libs/hdf5/CMakeFiles/kdf5.dir/build.make:90: libs/hdf5/CMakeFiles/kdf5.dir/hdf5dir.c.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:2063: libs/hdf5/CMakeFiles/kdf5.dir/all] Error 2
make[1]: *** [Makefile:146: all] Error 2
make: *** [/home/mehrad/Applications/sra-tools/ncbi-vdb-3.0.0/build/Makefile.env:106: cmake] Error 2
Some quick system information:
❯ gcc --version
gcc (GCC) 12.1.1 20220730
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
❯ inxi --system --width=80
System:
Host: precisiontower Kernel: 5.15.59-1-MANJARO arch: x86_64 bits: 64
Desktop: KDE Plasma v: 5.24.6 Distro: Manjaro Linux
❯ lsb_release -a
LSB Version: n/a
Distributor ID: ManjaroLinux
Description: Manjaro Linux
Release: 21.3.6
Codename: Ruah
Please let me know if you need further info.
vdb shoud set the wanted API explicitly, e.g. #define H5_USE_18_API
.
As a workaround, one can pass this via CMake, -DCMAKE_C_FLAGS="-DH5_USE_18_API"
.