Incorrect assumption about prefix/HDF5_INSTALL_BIN_DIR//HDF5_INSTALL_LIB_DIR in compiler wrappers
- Dominant language
- C
- Stars
- 988
- Forks
- 355
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 12
Description
**Describe the bug**
The compiler wrappers do the following calculation to find libhdf5.settings:
```
# Determine name and location of script
prg=$0
if [ ! -e "$prg" ]; then
case $prg in
(*/*) exit 1;;
(*) prg=$(command -v -- "$prg") || exit;;
esac
fi
dir=$(
cd -P -- "$(dirname -- "$prg")/.." && pwd -P
) || exit
prog_name=$(basename -- "$prg") || exit
prg=$dir/bin/$prog_name
prefix=$dir
libdir=$dir/@HDF5_INSTALL_LIB_DIR@
```
However this does not work when HDF5_INSTALL_BIN_DIR or HDF5_INSTALL_LIB_DIR are multiple levels. For the Fedora MPI builds we need to specify:
```
-DHDF5_INSTALL_LIB_DIR=%{_lib}/$mpi/lib \
-DHDF5_INSTALL_BIN_DIR=%{_lib}/$mpi/bin \
```
which results in /usr/lib64/mpich/bin/h5cc looking for /usr/lib64/mpich/lib64/mpich/lib/libhdf5.settings which is incorrect.
**Expected behavior**
h5cc finds libhdf5.settings
**Platform (please complete the following information)**
- HDF5 version 2.1.1
- OS and version
Fedora Rawhide
- Compiler and version
gcc 16
- Build system (e.g. CMake version) and generator (e.g. XCode, Ninja)
CMake
Contributor guide
Assessment
This issue has not been assessed yet.