You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use netcdf5 in a Tauri application. I'm starting with the basic print file example but it's running into issues at the build step with the following error:
Compiling tauri v1.5.4
error: failed to run custom build command for `hdf5-sys v0.8.1`
Caused by:
process didn't exit successfully: `/Users/nakaj/Documents/sandbox/nc_analyzer/metro_nc/src-tauri/target/debug/build/hdf5-sys-58f0def845f04fb4/build-script-build` (exit status: 101)
--- stdout
Attempting to find HDF5 via Homebrew (any version)...
--- stderr
thread 'main' panicked at /Users/nakaj/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hdf5-sys-0.8.1/build.rs:548:13:
Unable to locate HDF5 root directory and/or headers.
I checked home-brew cellar and verified I already have hdf5 v1.14.3 installed.
Even after commenting out all the example code, and only importing the library, the build error persists
Solution
resolved the issue by enabling the "static" feature in the Cargo.toml:
netcdf = { version = "0.8.3", features = ["static"] }
That said, it would be nice to have some detailed instructions or a link to them for those who don't want to use a binary blob.
The text was updated successfully, but these errors were encountered:
nakajimayoshi
changed the title
Can't get print example to compile on macOS (missing HDF5)
Can't get print example to compile in tour on macOS (missing HDF5)
Dec 22, 2023
nakajimayoshi
changed the title
Can't get print example to compile in tour on macOS (missing HDF5)
Can't get print example to compile in Tauri on macOS (missing HDF5)
Dec 22, 2023
nakajimayoshi
changed the title
Can't get print example to compile in Tauri on macOS (missing HDF5)
Can't compile in Tauri on macOS (missing HDF5)
Dec 22, 2023
Commenting for posterity. Specifying the static feature was the happy path to a successful windows/msvc build for me, and as a rust newb this instruction was not clear to me either.
cargo add netcdf --features static will update your project's Cargo.toml file.
I did not try the conda method but ci.yml shows you which environment variables to set.
Platform: macOS 14.2 apple silicon
I am trying to use netcdf5 in a Tauri application. I'm starting with the basic print file example but it's running into issues at the build step with the following error:
I checked home-brew cellar and verified I already have hdf5 v1.14.3 installed.
Even after commenting out all the example code, and only importing the library, the build error persists
Solution
resolved the issue by enabling the "static" feature in the Cargo.toml:
That said, it would be nice to have some detailed instructions or a link to them for those who don't want to use a binary blob.
The text was updated successfully, but these errors were encountered: