Skip to content

fix: support HDF5 1.10.4 with graceful degradation (#21)#22

Merged
shinaoka merged 6 commits intomainfrom
fix/linux-library-search-paths
Feb 14, 2026
Merged

fix: support HDF5 1.10.4 with graceful degradation (#21)#22
shinaoka merged 6 commits intomainfrom
fix/linux-library-search-paths

Conversation

@shinaoka
Copy link
Copy Markdown
Member

Summary

  • Lower minimum HDF5 version from 1.10.5 to 1.10.4 (fixes Support HDF5 1.10.4 (lower minimum version) #21)
  • Convert H5Dget_num_chunks and H5Dget_chunk_info to optional loading — they return None on HDF5 < 1.10.5 instead of panicking
  • Try multiple library names (libhdf5.so, libhdf5_serial.so) when loading HDF5 on Linux
  • Add HDF5 1.10.4 to CI test matrix via conda-forge

Test plan

  • cargo test --workspace --all-features passes locally
  • cargo clippy --workspace clean
  • cargo fmt --all applied
  • CI passes with HDF5 1.10.4 (new matrix entry)
  • CI passes with existing HDF5 1.10.x, 1.12.x, 1.14.x entries

🤖 Generated with Claude Code

shinaoka and others added 6 commits February 14, 2026 20:51
On Debian/Ubuntu, the HDF5 shared library is named `libhdf5_serial.so`
rather than `libhdf5.so`. The previous code only tried `libhdf5.so`,
causing dlopen to fail on these distributions.

Now tries multiple candidate names in order:
- Linux: `libhdf5.so`, `libhdf5_serial.so`
- macOS: `/opt/homebrew/lib/libhdf5.dylib`, `/usr/local/lib/libhdf5.dylib`, `libhdf5.dylib`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ding

These two functions are only available in HDF5 1.10.5+. By using
optional symbol loading (returning Option<herr_t> instead of panicking),
HDF5 1.10.4 can be supported with graceful degradation for chunk queries.

Updated the call sites in chunks.rs to handle the Option return type
using and_then instead of directly passing to h5check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shinaoka shinaoka merged commit 8f28c90 into main Feb 14, 2026
8 checks passed
@shinaoka shinaoka deleted the fix/linux-library-search-paths branch February 14, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support HDF5 1.10.4 (lower minimum version)

1 participant