JuliaIO / HDF5.jl

Save and load data in the HDF5 file format from Julia
https://juliaio.github.io/HDF5.jl
MIT License
386 stars 140 forks source link

Switch to Preferences for using system hdf5 #1037

Closed simonbyrne closed 1 year ago

simonbyrne commented 1 year ago

Technically this is already possible, by overriding the HDF5_jll paths, e.g. https://github.com/CliMA/ClimaCore.jl/blob/3e250b1f75d3bd3f4f7353cb9c1892e318b9e809/.buildkite/JuliaProject.toml

However I'm not sure that this will work on systems where JLL's aren't already available.

simonbyrne commented 1 year ago

Unfortunately setting the HDF5_jll paths can then break other packages, like NetCDF_jll.

mkitti commented 1 year ago

How so?

simonbyrne commented 1 year ago

Because the library in NetCDF_jll is linked against the library name which includes the version number, and this may not be the same as on the system: https://buildkite.com/clima/climacore-ci/builds/1880#0186f6b7-490c-4439-8c42-ef21dc99fbed/986-1211

mkitti commented 1 year ago

Ah yes. That situation is particularly confusing. Would a symlink work? Is there another solution that works better?

mkitti commented 1 year ago

I'm this particular case perhaps you should just rebuild the NetCDF and HDF5 JLLs... then maintain a fork.

mkitti commented 1 year ago

Also have we considered using Preferences.jl separately from the JLL override mechanism?

JoshuaLampert commented 1 year ago

What's the status of this issue? It would indeed be nice to switch to Preferences.

simonbyrne commented 1 year ago

Also have we considered using Preferences.jl separately from the JLL override mechanism?

This is probably the easiest option for now. PRs welcome?