下载地址:https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.20/src/hdf5-1.8.20.tar.gz
cd /path/to/download/hdf5
tar -zxvf hdf5-1.8.20.tar.gz
cd hdf5-1.8.20
./configure --prefix=/path/to/install/HDF5 --build=aarch64-unknown-linux-gnu --enable-fortran --enable-static=yes --enable-parallel --enable-shared CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort CFLAGS=-fPIC CXXFLAGS=-fPIC FCFLAGS=-fPIC
vi libtool
将第10118行 wl=”” 修改为 wl=”-Wl,”
将第10267行 wl=”” 修改为 wl=”-Wl,”
各版本HDF5所在行可能不同,可以查找wl=””进行修改。
make -j 16 make install
export PATH=/path/to/install/HDF5/bin:$PATH export LD_LIBRARY_PATH=/path/to/install/HDF5/lib:$LD_LIBRARY_PATH