Fix HDF5 configuration by removing system installations and setting HDF5_ROOT#2
Fix HDF5 configuration by removing system installations and setting HDF5_ROOT#2
Conversation
Co-authored-by: madbaron <7315158+madbaron@users.noreply.github.com>
tmadlener
left a comment
There was a problem hiding this comment.
If the underlying reason truly is an hdf5 installation on the system, I think we should try and figure out where that came from and then try to purge that.
Co-authored-by: madbaron <7315158+madbaron@users.noreply.github.com>
|
@copilot the suggested changes don't work (see for example https://github.com/LUXEsoftware/luxe-spack/actions/runs/18356130853/job/52288696064?pr=2) Can you focus your changes on removing any system installation of the hdf5 library from the docker image? |
Co-authored-by: madbaron <7315158+madbaron@users.noreply.github.com>
Added a Docker build step to explicitly remove system HDF5 installations. The change removes HDF5 packages via apt-get and manually deletes HDF5 files from common system locations (/usr/lib, /usr/include, /usr/local, etc.) for both x86_64 and aarch64 architectures. Commit: 2411b23 |
|
This is fun, but it's not going well |
|
Closing, as @tmadlener fixed this in #3. Humans 1 - Machines 0 |
Problem
The CI build failed when configuring lxelsim via Spack because CMake could not find or populate HDF5 include directories (
HDF5_INCLUDE_DIRS) even though HDF5 1.14.6 was present. The existingpackages/lxelsim/package.pydid not explicitly expose the Spack-installed HDF5 prefix or CMake config directory to the CMake configure step, which allowed FindHDF5 to pick up wrong/system HDF5 installations or miss include/library paths entirely.Solution
This PR fixes the HDF5 configuration issue through two complementary approaches:
Docker/Dockerfilethat explicitly removes all system HDF5 packages and files to prevent CMake from finding thempackages/lxelsim/package.pyto setHDF5_ROOTto point to the Spack-installed HDF5 prefixChanges
Docker/Dockerfile
apt-get removeand manual file deletion/usr/lib/x86_64-linux-gnu//usr/lib/aarch64-linux-gnu//usr/lib//usr/include//usr/share//usr/local/lib//usr/local/include/packages/lxelsim/package.py
madbaroncmake_args()method to setHDF5_ROOTto the Spack-installed HDF5 prefixCMAKE_CXX_STANDARD=20settingImplementation Details
The solution eliminates the root cause by removing system HDF5 installations entirely from the Docker build environment. This approach:
CMAKE_PREFIX_PATHHDF5_INCLUDE_DIRSorHDF5_LIBRARIESThis comprehensive solution addresses the original issue by removing ambiguity at the source while following Spack best practices.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.