I now managed to build the whole thing (libhdf5.dylib and libhdf5_fortran.dylib) with clang as C compiler and gfortran (8.0.1) as fortran compiler. So you have to figure out why your libhdf5 didn't build and maybe complain to the developers. In any case, it is a C problem, ...