HDFGroup / HDFGroup/hdf5

HDF5 misconfigures libaec on Windows

Open
#5,354 8 comments 0 reactions 2 assignees Claimed by @jhendersonHDF View on GitHub
Component - Build
Dominant language
C
Stars
988
Forks
355
Avg merge
4d 2h
Merged PRs (30d)
12

Description

**Describe the bug**
I cross-compile HDF5 for Windows with support for `libaec`. I use cmake. cmake detects libaec, but the generated Makefile still has a `NOTFOUND` in it, and the build fails.

**Expected behavior**
cmake should generate a working Makefile when libaec is find

**Platform (please complete the following information)**
- HDF5 version: 1.14.6
- OS and version: Building for `MSYS_NT-6.3 indigo 2.8.2(0.313/5/3) Wed Feb 13 00:49:00 UTC 2013 x86_64 Cygwin`
- Compiler and version: `x86_64-w64-mingw32-gcc (GCC) 8.1.0`
- Build system (e.g. CMake, Autotools) and version: `cmake version 3.21.7`
- Any configure options you specified:
```
cmake -B builddir -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS=-L/workspace/destdir/bin -lsz -DCMAKE_INSTALL_PREFIX=/workspace/destdir -DCMAKE_SHARED_LINKER_FLAGS=-L/workspace/destdir/bin -lsz -DCMAKE_TOOLCHAIN_FILE=/opt/toolchains/x86_64-w64-mingw32-libgfortran5-cxx11-mpi+microsoftmpi/target_x86_64-w64-mingw32.cmake -DALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_CPP_LIB=ON -DHDF5_BUILD_DOC=OFF -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_BUILD_JAVA=OFF -DHDF5_BUILD_PARALLEL_TOOLS=OFF -DHDF5_BUILD_TOOLS=ON -DHDF5_ENABLE_HDFS=OFF -DHDF5_ENABLE_MAP_API=ON -DHDF5_ENABLE_PLUGIN_SUPPORT=OFF -DHDF5_ENABLE_ROS3_VFD=ON -DHDF5_ENABLE_SZIP_SUPPORT=ON -DHDF5_ENABLE_THREADSAFE=ON -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DONLY_SHARED_LIBS=ON -DHDF5_ENABLE_DIRECT_VFD=OFF -DHDF5_ENABLE_MIRROR_VFD=OFF -DHDF5_ENABLE_PARALLEL=OFF -DHDF5_ENABLE_SUBFILING_VFD=OFF -DFC_AVAIL_KINDS_RESULT=1,2,4,8,16;4,8,10,16;33;5;4;5;1,2,4,8,16; -DVALIDINTKINDS_RESULT_1=1 -DVALIDINTKINDS_RESULT_2=2 -DVALIDINTKINDS_RESULT_4=4 -DVALIDINTKINDS_RESULT_8=8 -DVALIDINTKINDS_RESULT_16=16 -DVALIDREALKINDS_RESULT_4=4 -DVALIDREALKINDS_RESULT_8=8 -DVALIDREALKINDS_RESULT_10=16 -DVALIDREALKINDS_RESULT_16=16 -DPAC_SIZEOF_NATIVE_KINDS_RESULT=4;4;4;4;8;8;```
- MPI library and version (parallel HDF5): no

**Additional context**
Cmake outputs these warnings:
```
[15:19:01] CMake Warning (dev) in CMakeLists.txt:
[15:19:01] Policy CMP0111 is not set: An imported target missing its location property
[15:19:01] fails during generation. Run "cmake --help-policy CMP0111" for policy
[15:19:01] details. Use the cmake_policy command to set the policy and suppress this
[15:19:01] warning.
[15:19:01]
[15:19:01] IMPORTED_IMPLIB not set for imported target "libaec::sz" configuration
[15:19:01] "Release".
[15:19:01] This warning is for project developers. Use -Wno-dev to suppress it.
[15:19:01]
[15:19:01] CMake Warning (dev) in CMakeLists.txt:
[15:19:01] Policy CMP0111 is not set: An imported target missing its location property
[15:19:01] fails during generation. Run "cmake --help-policy CMP0111" for policy
[15:19:01] details. Use the cmake_policy command to set the policy and suppress this
[15:19:01] warning.
[15:19:01]
[15:19:01] IMPORTED_IMPLIB not set for imported target "libaec::aec" configuration
[15:19:01] "Release".
[15:19:01] This warning is for project developers. Use -Wno-dev to suppress it.
```

The generated Makfile `hdf5-1.14.6/builddir/src/CMakeFiles/hdf5-shared.dir/build.make` contains these lines:
```
bin/libhdf5.dll: /opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/usr/local/bin/libssl.dll.a
bin/libhdf5.dll: /opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/usr/local/bin/libcrypto.dll.a
bin/libhdf5.dll: /workspace/destdir/lib/libz.dll.a
bin/libhdf5.dll: libaec::sz-NOTFOUND
bin/libhdf5.dll: libaec::aec-NOTFOUND
bin/libhdf5.dll: src/CMakeFiles/hdf5-shared.dir/linklibs.rsp
bin/libhdf5.dll: src/CMakeFiles/hdf5-shared.dir/objects1.rsp
bin/libhdf5.dll: src/CMakeFiles/hdf5-shared.dir/link.txt
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.