GenericMappingTools / GMT.jl

Generic Mapping Tools Library Wrapper for Julia
Other
191 stars 28 forks source link

Not finding libgdal-35.dll on windows #1479

Closed boriskaus closed 5 days ago

boriskaus commented 1 week ago

I have an issue with my CI which fails on windows due to the following GMT.jl precompilation error:

Failed to precompile GMT [5752ebe1-31b9-557e-87aa-f909b540aa54] to "C:\\Users\\runneradmin\\.julia\\compiled\\v1.12\\GMT\\jl_78A2.tmp".
ERROR: LoadError: InitError: could not load library "C:\Users\runneradmin\.julia\artifacts\9db36ce542776801f81c6432d08864ea4abfc279\bin\libgdal-35.dll"
The specified module could not be found. 
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl .\libdl.jl:120
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl .\libdl.jl:119
  [3] top-level scope
    @ C:\Users\runneradmin\.julia\packages\GDAL_jll\EQFRa\src\wrappers\x86_64-w64-mingw32-cxx11.jl:78
  [4] macro expansion

Works fine on Linux/Mac. Does it look familiar?

joa-quim commented 1 week ago

Yes. GDAL is broken on Windows and oddly they are taking long to revert the breaking change. Solvable by reinstalling older version. e.g. add GDAL_jll@301.900 See also https://discourse.julialang.org/t/gmt-fails-to-precompile-in-julia-1-10-4/116391/6

boriskaus commented 1 week ago

thanks - that indeed solved it!

boriskaus commented 6 days ago

In fact, why don't you limit the version of GDAL_jll within the GMT.jl package? That would give a more positive experience for GMT.jl users; you can release that limitation once a new version of GDAL_jll is released that fixes the issue. What you would need to do is add the following [compat] in Project.toml (or something like that; I just took a random lower bound):

[compat]
GDAL_jll = "300.900.0 - 301.900.0"
joa-quim commented 5 days ago

Thanks, I did that in v1.15.2.

Can't understand how they live it in a broken state for almost a week (and counting).