1594219 : pkg-config file for hdf5¶
Created: 2026-04-21T06:51:14Z - current status: new¶
Summary:
A user reports that the hdf5.pc (pkg-config) file is missing on the Maxwell cluster, preventing compilation of a C program that relies on pkg-config to locate the HDF5 library. While the h5cpp.pc (C++ version) is present, the C-specific libhdf5.pc file is absent, despite being part of the standard HDF5 distribution.
Solution:
1. Reinstall HDF5 with pkg-config support: Ensure the HDF5 installation includes the hdf5.pc file (e.g., by configuring the build with --enable-pkg-config or equivalent flags).
2. Update modulefiles: Modify the HDF5 modulefiles to include the PKG_CONFIG_PATH environment variable, pointing to the directory containing hdf5.pc (e.g., /software/hdf5/[VERSION]/lib/pkgconfig). This would enable pkg-config hdf5 --libs to work automatically after loading the module.
Next Steps:
- Verify if the HDF5 installation on Maxwell was built with pkg-config support disabled.
- If confirmed, rebuild HDF5 with the appropriate flags and update the modulefiles as suggested.
Sources: - Maxwell HDF5 Documentation (for modulefile structure and environment variables).