Error building HDF5_1.10.5 with MinGW64


Dear sirs,
I get errors when compiling HDF5_1.10.5 with MinGW64.

What I did:

  1. I downloaded source file CMake-hdf5-1.10.5 and unpacked it.
  2. Using CMake GUI I chosed MinGW64 and ran configure (with default installation parameters). Few lines before succesful configure show the following:
    Performing CXX Test OLD_HEADER_FILENAME - Failed
    Performing CXX Test HDF_NO_NAMESPACE - Failed
    Performing CXX Test HDF_NO_STD - Failed
    Performing CXX Test BOOL_NOTDEFINED - Failed
    Performing CXX Test NO_STATIC_CAST - Failed
    Performing CXX Test CXX_HAVE_OFFSETOF - Failed
    Configuring done
    Generating done
  3. from CMD-command line in build folder I run mingw32-make and after some time of processing I get errors:
    mingw32-make[2]: *** [src\CMakeFiles\hdf5-static.dir\build.make:793: src/CMakeFiles/hdf5-static.dir/H5Defl.c.obj] Error 1
    mingw32-make[1]: *** [CMakeFiles\Makefile2:934: src/CMakeFiles/hdf5-static.dir/all] Error 2
    mingw32-make: *** [Makefile:162: all] Error 2

Before that errors I get many warnings like:
D:\Qt\Downloaded\CMake-hdf5-1.10.5\hdf5-1.10.5\src\H5Defl.c:303:13: note: in exp
ansion of macro ‘HGOTO_ERROR’ HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, “read error in external raw data file”)

D:\Qt\Downloaded\CMake-hdf5-1.10.5\hdf5-1.10.5\src\H5Defl.c:378:13: note: in exp
ansion of macro 'HGOTO_ERROR' HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "write past logical end of file")

D:\Qt\Downloaded\CMake-hdf5-1.10.5\hdf5-1.10.5\src\H5Defl.c:390:13: note: in exp
ansion of macro 'HGOTO_ERROR' HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")

By the way compilation and installation is succesful if I run build-VS2017-64.bat but I need MinGW compiled library…
Does anybody know how to solve this?

Parameters of my PC:
Windows 7 x64
CMake 3.15.0
MinGW64 7.3.0

Best regards,