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

Cannot precompile GDAL after an update of GEOS_jll from 3.9.0 to 3.10.0 #126

Closed
mathieu17g opened this issue Nov 1, 2021 · 5 comments
Closed

Comments

@mathieu17g
Copy link
Contributor

@visr I had an unsolicited upgrade of GEOS_jll from 3.9.0 to 3.10.0 which prevents current GDAL version to compile. Here is the error message below. Do you face the same issue ?

julia> using GDAL
ERROR: InitError: could not load library "/Users/Mathieu/.julia/artifacts/dce3145800aa7866bf5cdbedd3ac40850df3fc47/lib/libgdal.28.dylib"
dlopen(/Users/Mathieu/.julia/artifacts/dce3145800aa7866bf5cdbedd3ac40850df3fc47/lib/libgdal.28.dylib, 1): Library not loaded: @rpath/libgeos_c.1.dylib
  Referenced from: /Users/Mathieu/.julia/artifacts/dce3145800aa7866bf5cdbedd3ac40850df3fc47/lib/libgdal.28.dylib
  Reason: Incompatible library version: libgdal.28.dylib requires version 18.0.0 or later, but libgeos_c.1.16.0.dylib provides version 1.0.0
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/bkwIo/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ GDAL_jll ~/.julia/packages/GDAL_jll/WxCDm/src/wrappers/x86_64-apple-darwin.jl:110
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:696
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:782
  [7] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
    @ Base ./loading.jl:711
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:771
  [9] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1020
 [10] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
 [12] eval
    @ ./boot.jl:360 [inlined]
 [13] eval
    @ ./Base.jl:39 [inlined]
 [14] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/repl.jl:157
 [15] (::VSCodeServer.var"#69#71"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/repl.jl:123
 [16] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:491
 [17] with_logger
    @ ./logging.jl:603 [inlined]
 [18] (::VSCodeServer.var"#68#70"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/repl.jl:124
 [19] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [20] invokelatest(::Any)
    @ Base ./essentials.jl:706
 [21] macro expansion
    @ ~/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [22] (::VSCodeServer.var"#53#54")()
    @ VSCodeServer ./task.jl:411
during initialization of module GDAL_jll
visr added a commit that referenced this issue Nov 1, 2021
From GitHub right click "Create status badge" in Actions.

Used to verify #126
@visr
Copy link
Member

visr commented Nov 1, 2021

Hmm yeah it looks like unfortunately JuliaPackaging/Yggdrasil#3834 broke the GDAL_jll for macOS and Windows: https://github.com/JuliaGeo/GDAL.jl/actions/runs/1407402966. (cc @jaakkor2)

Probably we have to pin the minor version of GEOS in the GDAL build. We already do this for PROJ: https://github.com/JuliaPackaging/Yggdrasil/blob/aa2ad28df953aa40eb59a8903e1ee0d63d0541da/G/GDAL/GDAL%40julia-1.6/build_tarballs.jl#L8-L14.

To avoid GEOS 3.10, you probably have to add GEOS_jll@3.9 for now.

libgdal.28.dylib requires version 18.0.0 or later, but libgeos_c.1.16.0.dylib provides version 1.0.0

@giordano this seems strange right? As I correct that in in principle a minor release should be safe without pinning? Also the numbers seem strange, 18 vs 1.16 vs 1. I see nothing mentioned in https://github.com/libgeos/geos/blob/main/NEWS. Or could it be due to the switch to CMake for the GEOS build?

@giordano
Copy link

giordano commented Nov 1, 2021

Yeah, that changed the SONAME of the library, see for example: JuliaBinaryWrappers/GEOS_jll.jl@46bcbb7#diff-2a84e35074ab9c852eb3e5c4b62019ca420842a627a0d8d55c03cd26dd65151f. You need to fix this first in the registry.

@mathieu17g
Copy link
Contributor Author

To avoid GEOS 3.10, you probably have to add GEOS_jll@3.9 for now.

It seems that it as to momentarily to be also put in GDAL.jl/project.toml [deps] and [compat] for Pkg.test to work on ArchGDAL

@giordano
Copy link

giordano commented Nov 1, 2021

It's easier to fix GDAL_jll in the registry, as I said above

@visr
Copy link
Member

visr commented Nov 1, 2021

Thanks for the tip @giordano. I submitted JuliaRegistries/General#47879, hopefully this is right?

@visr visr closed this as completed Dec 27, 2021
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