Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile hdf5-sys on mac OS #297

Open
robinpaul85 opened this issue Aug 23, 2024 · 2 comments
Open

Unable to compile hdf5-sys on mac OS #297

robinpaul85 opened this issue Aug 23, 2024 · 2 comments

Comments

@robinpaul85
Copy link

robinpaul85 commented Aug 23, 2024

I installed HDF5 using brew install hdf5. However it seems hdf5-sys does not currently support the most recent HDF5 version supported by brew. I managed to compile it myself by commenting several panic and assert statements in build.rs (renamed as build.txt) file of hdf5-sys. But this is a very roundabout way of compiling the crate. Can you please update the crate so that its compatible with the most recent version of HDF5 supported by brew.
build.txt

@mulimoen
Copy link
Collaborator

See #295 for an active fork

@tvhong
Copy link

tvhong commented Oct 24, 2024

For me, hdf5-sys didn't build with the latest version of hdf5 from homebrew because the latest version has 4 components (1.14.4.3) and hdf5-sys expects 3.

Error:

  Invalid H5_VERSION: "1.14.4.3"
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/4f2f477fded0a47b21ed3f6aeddeafa5db8bf518/library/std/src/panicking.rs:665:5
     1: core::panicking::panic_fmt
               at /rustc/4f2f477fded0a47b21ed3f6aeddeafa5db8bf518/library/core/src/panicking.rs:74:14
     2: build_script_build::Header::parse
     3: build_script_build::LibrarySearcher::finalize
     4: build_script_build::main
     5: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Here is the related code: https://github.com/aldanor/hdf5-rust/blob/master/hdf5-sys/build.rs#L216-L221

I installed an old version of hdf5 from homebrew to get around this:

brew install [email protected]

We could probably update the build.rs to parse the version string better.

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

No branches or pull requests

3 participants