H5FDsubfiling.h: No such file or directory

Hello,

I am trying to build the static library of the latestl HDF5 ibrary to be used in risc-v gnu compiler. I successfully generated the libhdf5.a file and put it in risc-v gnu compiler’s sysroot/lib/. I used the configuration below before making the library:

./configure --prefix=$RISCV_COMPILER --host=riscv64-unknown-linux-gnu

But when I try compile my program with the risc-v gcc compiler, I get the following error:

/home/user/Desktop/test_hdf5/src/hdf5.h:74:10: fatal error: H5FDsubfiling.h: No such file or directory
74 | #include “H5FDsubfiling.h” /* Subfiling VFD */
| ^~~~~~~~~~~~~~~~~
compilation terminated.

Could you please tell me how to fix this?

Hi @amoon.sari.2055,

it looks like you’re compiling your application against your source tree of HDF5 rather than an installed version. After building and installing HDF5, you should find that several headers were placed in the “include” directory under wherever $RISCV_COMPILER points to. To compile your application, you can either use the h5cc script that should have been placed in the “bin” directory under $RISCV_COMPILER (it should include all the correct paths for compiling), or you can point your compiler to the place where the include files are at with, e.g. -I$RISCV_COMPILER/include.