Apple Silicon Binaries, Universal Binaries

I tried to compile HDF5 1.8.22 on my M1 mac. but failed. I try to upload the log files but not allowed as a new comer. basically, it says a lots of files are missing in the build/bin folders, including: h52gif-shared/h5diff-shared/filter_plugin/h5importtest/…

I also found a PreinstallOutput.log file in the build/_CPack_Packages/Darwin/TGZ/ folder, says:

Run command: /opt/homebrew/Cellar/cmake/3.21.3/bin/cmake --build . --config “RelWithDebInfo” --target “preinstall”

Directory: /Users/twister/temp/IfcOpenShell/build/Darwin/arm64/build/CMake-hdf5-1.8.22/build

Output:

[ 0%] Built target SZIP
[ 0%] Performing build step for ‘ZLIB’
Consolidate compiler generated dependencies of target zlib-static
[ 6%] Building C object CMakeFiles/zlib-static.dir/gzlib.c.o
/Users/twister/temp/IfcOpenShell/build/Darwin/arm64/build/CMake-hdf5-1.8.22/build/ZLIB-prefix/src/ZLIB/gzlib.c:214:15: error: implicitly declaring library function ‘snprintf’ with type ‘int (char *, unsigned long, const char *, …)’ [-Werror,-Wimplicit-function-declaration]
(void)snprintf(state->path, len + 1, “%s”, (const char *)path);
^
/Users/twister/temp/IfcOpenShell/build/Darwin/arm64/build/CMake-hdf5-1.8.22/build/ZLIB-prefix/src/ZLIB/gzlib.c:214:15: note: include the header <stdio.h> or explicitly provide a declaration for ‘snprintf’
1 error generated.
make[5]: *** [CMakeFiles/zlib-static.dir/gzlib.c.o] Error 1
make[4]: *** [CMakeFiles/zlib-static.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [ZLIB-prefix/src/ZLIB-stamp/ZLIB-build] Error 2
make[1]: *** [CMakeFiles/ZLIB.dir/all] Error 2
make: *** [all] Error 2

I don’t know if this is the root of failures. anyone can help? thanks in advance.