-
Notifications
You must be signed in to change notification settings - Fork 30
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
NetCDF_jll v400.702.402+0 and later broken on Windows #164
Comments
Thanks a lot for letting me know! |
Yes, I just checked, HDF5.jl, doesn't have an issue with that HDF5_jll, so it seems both libs work individually, but not together, on Windows. |
Thanks @visr for the update! Filled also a bug report here: |
As there are many more Windows users than Apple M1 users, I would indeed be in favour to yank the build of NetCDF_jll. |
This issue is not resolved but mitigated by declaring NCDatasets incompatible with v400.702.402+0 in NCDatasets 0.12. |
Thanks! Just curious, why did you go this route versus yanking the build from the registry? Though I suppose this way Apple M1 users still have a way to use the build if they want. |
Yes this is one reason, and I had a classroom full of students last Monday (mostly Windows, some Apple x86_64, some Linux) and needed a quick solution :-) |
For Julia 1.8 all jll packages (with a shared dependency with julia) need to be rebuild. The is also the case of NetCDF_jll as NetCDF_jll and julia depend on libcurl. Unfortunately the work-around of the setting the compat entry does not work with julia 1.8 on Windows. Unfortunately, there is no installable NetCDF_jll currently on Windows with julia 1.8 (Linux and Mac OS seem to be fine on julia 1.8) If a windows user want to contribute here is an overview of the involved steps:
Here is more information on BinaryBuilder: https://docs.binarybuilder.org/stable/. Windows support of BinarBuilder is currently under active development. Alternatively, one can also use a Linux VM for BinaryBuilder. The hart nut to crack is this:
A workaround might be to install NetCDF via Conda.jl or build locally NetCDF_jll with HDF 1.12.0 (but I did not test these options and it is likely that one need to locally adapt NCDatasets compat entry of NetCDF_jll in the |
I've been on 1.8 beta for a while and never encountered any issues with the Windows build that is currently pinned (NetCDF_jll v400.702.400+0), and the tests pass locally. Do you know of any code examples that would fail on 1.8 Windows? I assume these would have to use the shared dependencies (curl, MbedTLS, zlib). |
The world of dynamic libraries does not cease to surprise me ! But maybe Windows can handle a library version mismatch better than Linux. using NCDataset
ds = NCDataset("https://erddap.ifremer.fr/erddap/griddap/SDC_GLO_CLIM_TS_V2_1") |
Ha, fascinating indeed. The opendap URL also just works, including when I load some actual data into memory ( |
Thank you for confirming, I am hitting another bug with Linux #173. |
The NetCDF write test fails on Windows, perhaps something similar to: JuliaGeo/NCDatasets.jl#164 Try to mitigate by forcing an older NetCDF_jll version for now.
For future reference, here is how to pin the NetCDF version (for windows users only to run the NCDatasets master version on julia 1.8):
|
For the record, here is a test I made in June with HDF5 1.12.2 from MSYS2 (Windows):
I compiled NetCDF C 4.8.1 from source in MSYS2 ./configure --disable-testsets --enable-shared --disable-static --disable-dap-remote-tests
make LDFLAGS=" -no-undefined -Wl,--export-all-symbols" In Julia, I used these libraries using
While running the test suite, using NCDatasets
include(joinpath(dirname(pathof(NCDatasets)),"..","test","runtests.jl"))
NetCDF library: C:\msys64\home\Alexander Barth\netcdf-c\liblib\.libs\libnetcdf-19.dll I had no failures:
Surprisingly, when NetCDF 4.9.0 is compiled with BinaryBuilder using the recently released HDF5_jll 1.12.2, I get now (again) these errors in julia 1.8.0 rc3:
Full logs I somebody whats to try here is the dll of NetCDF 4.8.1 which worked for me:
|
Oh that's a bummer! So do I understand correctly that it's not the HDF5 patch version 1 or 2 that is important, but whether or not netcdf is cross compiled? And the last cross compiled netcdf that was successfully built against a HDF5 mingw build, was netcdf 4.7 against HDF5 1.12.0? https://github.com/JuliaPackaging/Yggdrasil/blob/5b9aa3d48766ab2681f6b92e0b7e6116ddfc5e27/N/NetCDF/common.jl |
To be honest, I am not sure what exactly triggers this error but it appears indeed to be a cross-compilation issue introduced in hdf5 1.12.1. As far as I know netcdf only test native compliation, and only relatively recently the mingw compiler in CI. |
This long standing issue, should be fixed thanks to NetCDF_jll 400.902.5 . |
Thanks a lot for a major effort! Hope it gets easier. Looks like this issue can be unpinned as well :) |
Thanks Martijn for your help too! |
Describe the bug
A new NetCDF_jll release was made a few days ago. It appears that this doesn't communicate well with the HDF5 dependency.
This was introduced in JuliaPackaging/Yggdrasil#4481, cc @felixcremer. I don't see anything wrong in the build file, but the main difference is that it is linked to HDF5_jll v1.12.1+0 instead of the older v1.12.0+1.
Shall we yank the build? We would lose a functioning Apple M1 build however.
Side note: this is not directly related to NCDatasets. @Alexander-Barth do you prefer that I create these issues in Yggdrasil? I thought here might be better for visibility for users.
To Reproduce
Here is an example using only NetCDF_jll, to keep it as simple as possible.
Expected behavior
Create an empty ""test.nc4" file.
Environment
Full output
Workaround
or
The text was updated successfully, but these errors were encountered: