Unable to install hdf5 with cmake

I am following this link for installing hdf5 with cmake. I am following the instruction I’ve set
set (ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF”)
set (ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF”)
set (ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF”)

My dockerfile content for hdf5 installation is
RUN wget -q http://nl.alpinelinux.org/alpine/v3.12/main/x86_64/cmake-3.17.2-r0.apk &&
apk add cmake-3.17.2-r0.apk

RUN echo $(apk info cmake)

COPY ./CMake-hdf5-1.10.6 /root/CMake-hdf5-1.10.6

ENV HDF5_VERSION=1.10.6

RUN cd /root/CMake-hdf5-${HDF5_VERSION} && \
    ./build-unix.sh

I am getting this error

Run dashboard with model Experimental
Source directory: /root/CMake-hdf5-1.10.6/hdf5-1.10.6
Build directory: /root/CMake-hdf5-1.10.6/build
Group: Experimental
Reading ctest configuration file: /root/CMake-hdf5-1.10.6/hdf5-1.10.6/CTestConfig.cmake
Site: e59e76451cb3
Build name: Linux-3.10.0-1062.el7.x86_64-x86_64
Use Experimental tag: 20200902-1017
Configure project
Each . represents 1024 bytes of output
. Size of output: 0K
Error(s) when configuring the project
Build project
Each symbol represents 1024 bytes of output.
. Size of output: 0K
0 Compiler errors
1 Compiler warnings
Error(s) when building project

Please help on this.

Hello,

Can you edit the build-unix.sh script and change the “-V” to “-VV”, and then try building again?
That will output more information, and hopefully give more clues as to what the issue is.

Thanks!
-Barbara

  • Extra verbosity turned on
    Reading Script: /root/CMake-hdf5-1.10.6/HDF5config.cmake,BUILD_GENERATOR=Unix
    – Dashboard script uname output: Linux-3.10.0-1062.el7.x86_64-x86_64

– Dashboard script configuration:
CTEST_SITE=[62ed5ac4a624]
CTEST_BUILD_NAME=[Linux-3.10.0-1062.el7.x86_64-x86_64]
CTEST_SOURCE_DIRECTORY=[/root/CMake-hdf5-1.10.6/hdf5-1.10.6]
CTEST_BINARY_DIRECTORY=[/root/CMake-hdf5-1.10.6/build]
CTEST_CMAKE_GENERATOR=[Unix Makefiles]
CTEST_CONFIGURATION_TYPE=[Release]
CTEST_GIT_COMMAND=[]
CTEST_CHECKOUT_COMMAND=[]
CTEST_CONFIGURE_COMMAND=["/usr/bin/cmake" -C “/root/CMake-hdf5-1.10.6/hdf5-1.10.6/config/cmake/cacheinit.cmake” -DCMAKE_BUILD_TYPE:STRING=Release “““;-DHDF5_BUILD_CPP_LIB:BOOL=OFF”;-DHDF5_BUILD_JAVA:BOOL=OFF”;-DHDF5_ENABLE_THREADSAFE:BOOL=OFF” -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/root/CMake-hdf5-1.10.6/HDF_Group/HDF5/1.10.6 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=/root/CMake-hdf5-1.10.6 -DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DSITE:STRING=62ed5ac4a624 -DBUILDNAME:STRING=Linux-3.10.0-1062.el7.x86_64-x86_64 -DCTEST_USE_LAUNCHERS:BOOL=ON “-GUnix Makefiles” “” “” “/root/CMake-hdf5-1.10.6/hdf5-1.10.6”]
CTEST_SCRIPT_DIRECTORY=[/root/CMake-hdf5-1.10.6]
CTEST_USE_LAUNCHERS=[1]
LOCAL_SKIP_TEST=[TRUE]

SetCTestConfiguration:SourceDirectory:/root/CMake-hdf5-1.10.6/hdf5-1.10.6
SetCTestConfiguration:BuildDirectory:/root/CMake-hdf5-1.10.6/build
Run dashboard with model Experimental
Source directory: /root/CMake-hdf5-1.10.6/hdf5-1.10.6
Build directory: /root/CMake-hdf5-1.10.6/build
Group: Experimental
Reading ctest configuration file: /root/CMake-hdf5-1.10.6/hdf5-1.10.6/CTestConfig.cmake
SetCTestConfigurationFromCMakeVariable:NightlyStartTime:CTEST_NIGHTLY_START_TIME
SetCTestConfiguration:NightlyStartTime:18:00:00 CST
SetCTestConfigurationFromCMakeVariable:Site:CTEST_SITE
SetCTestConfiguration:Site:62ed5ac4a624
SetCTestConfigurationFromCMakeVariable:BuildName:CTEST_BUILD_NAME
SetCTestConfiguration:BuildName:Linux-3.10.0-1062.el7.x86_64-x86_64
Site: 62ed5ac4a624
Build name: Linux-3.10.0-1062.el7.x86_64-x86_64
Use Experimental tag: 20200903-0952
Add coverage exclude regular expressions.
SetCTestConfiguration:CMakeCommand:/usr/bin/cmake
SetCTestConfiguration:BuildDirectory:/root/CMake-hdf5-1.10.6/build
SetCTestConfiguration:SourceDirectory:/root/CMake-hdf5-1.10.6/hdf5-1.10.6
SetCTestConfiguration:ConfigureCommand:"/usr/bin/cmake" -C “/root/CMake-hdf5-1.10.6/hdf5-1.10.6/config/cmake/cacheinit.cmake” -DCMAKE_BUILD_TYPE:STRING=Release “““;-DHDF5_BUILD_CPP_LIB:BOOL=OFF”;-DHDF5_BUILD_JAVA:BOOL=OFF”;-DHDF5_ENABLE_THREADSAFE:BOOL=OFF” -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/root/CMake-hdf5-1.10.6/HDF_Group/HDF5/1.10.6 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=/root/CMake-hdf5-1.10.6 -DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DSITE:STRING=62ed5ac4a624 -DBUILDNAME:STRING=Linux-3.10.0-1062.el7.x86_64-x86_64 -DCTEST_USE_LAUNCHERS:BOOL=ON “-GUnix Makefiles” “” “” “/root/CMake-hdf5-1.10.6/hdf5-1.10.6”
Configure project
Configure with command: “/usr/bin/cmake” -C “/root/CMake-hdf5-1.10.6/hdf5-1.10.6/config/cmake/cacheinit.cmake” -DCMAKE_BUILD_TYPE:STRING=Release “““;-DHDF5_BUILD_CPP_LIB:BOOL=OFF”;-DHDF5_BUILD_JAVA:BOOL=OFF”;-DHDF5_ENABLE_THREADSAFE:BOOL=OFF” -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/root/CMake-hdf5-1.10.6/HDF_Group/HDF5/1.10.6 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=/root/CMake-hdf5-1.10.6 -DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DSITE:STRING=62ed5ac4a624 -DBUILDNAME:STRING=Linux-3.10.0-1062.el7.x86_64-x86_64 -DCTEST_USE_LAUNCHERS:BOOL=ON “-GUnix Makefiles” “” “” “/root/CMake-hdf5-1.10.6/hdf5-1.10.6”
Run command: “/usr/bin/cmake” “-C” “/root/CMake-hdf5-1.10.6/hdf5-1.10.6/config/cmake/cacheinit.cmake” “-DCMAKE_BUILD_TYPE:STRING=Release” ““““;-DHDF5_BUILD_CPP_LIB:BOOL=OFF”;-DHDF5_BUILD_JAVA:BOOL=OFF”;-DHDF5_ENABLE_THREADSAFE:BOOL=OFF”” “-DHDF5_BUILD_FORTRAN:BOOL=OFF” “-DHDF5_BUILD_JAVA:BOOL=OFF” “-DCMAKE_INSTALL_PREFIX:PATH=/root/CMake-hdf5-1.10.6/HDF_Group/HDF5/1.10.6” “-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ” “-DTGZPATH:PATH=/root/CMake-hdf5-1.10.6” “-DHDF5_PACKAGE_EXTLIBS:BOOL=ON” “-DSITE:STRING=62ed5ac4a624” “-DBUILDNAME:STRING=Linux-3.10.0-1062.el7.x86_64-x86_64” “-DCTEST_USE_LAUNCHERS:BOOL=ON” “-GUnix Makefiles” “” “” “/root/CMake-hdf5-1.10.6/hdf5-1.10.6”
loading initial cache file /root/CMake-hdf5-1.10.6/hdf5-1.10.6/config/cmake/cacheinit.cmake
CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
– Configuring incomplete, errors occurred!
See also “/root/CMake-hdf5-1.10.6/build/CMakeFiles/CMakeOutput.log”.
CMake Error: CTEST_USE_LAUNCHERS is enabled, but the RULE_LAUNCH_COMPILE global property is not defined.
Did you forget to include(CTest) in the toplevel CMakeLists.txt ?
Command exited with the value: 1
Error(s) when configuring the project
SetCTestConfiguration:BuildDirectory:/root/CMake-hdf5-1.10.6/build
SetCTestConfiguration:SourceDirectory:/root/CMake-hdf5-1.10.6/hdf5-1.10.6
SetMakeCommand:/usr/bin/cmake --build . --config “Release” – -j2
SetCTestConfiguration:MakeCommand:/usr/bin/cmake --build . --config “Release” – -j2
SetCTestConfiguration:UseLaunchers:1
Build project
MakeCommand:/usr/bin/cmake --build . --config “Release” – -j2
Run command: “/usr/bin/cmake” “–build” “.” “–config” “Release” “–” “-j2”
No such file or directory
CMake Error: Generator: execution of make failed. Make command was: -j2 &&
Command exited with the value: 1
MakeCommand:/usr/bin/cmake --build . --config “Release” – -j2
0 Compiler errors
1 Compiler warnings
Error(s) when building project
The command ‘/bin/sh -c cd /root/CMake-hdf5-${HDF5_VERSION} && ./build-unix.sh’ returned a non-zero code: 255

Looks like you need to install “make” (usually the “dev-tools” group from your package manager).

According to the official site, it talks about cmake and I have installed it.

RUN wget -q http://nl.alpinelinux.org/alpine/v3.12/main/x86_64/cmake-3.17.2-r0.apk && \
    apk add cmake-3.17.2-r0.apk

Do I need ‘make’ also? There is no mention of it !?

Yes. You will also need “make”. Not sure what package that is part of on a linux machine but maybe something like “dev-essentials” or “gcc-7” or something like that.