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

GDAL_jll broke – uses LERC_jll without declaring it #179

Closed
eschnett opened this issue Oct 8, 2024 · 9 comments · Fixed by JuliaPackaging/Yggdrasil#9588
Closed

GDAL_jll broke – uses LERC_jll without declaring it #179

eschnett opened this issue Oct 8, 2024 · 9 comments · Fixed by JuliaPackaging/Yggdrasil#9588
Labels

Comments

@eschnett
Copy link

eschnett commented Oct 8, 2024

Yesterday I created a new version of Libtiff_jll that uses LERC_jll, updating from LERC 3 to LERC 4.

This morning I see that GDAL_jll is broken. I see the error message

ERROR: LoadError: InitError: could not load library "/Users/eschnett/.julia/artifacts/1337ee940f233626adea175588d755d2f70a802f/lib/libgdal.35.dylib"
dlopen(/Users/eschnett/.julia/artifacts/1337ee940f233626adea175588d755d2f70a802f/lib/libgdal.35.dylib, 0x0001): Library not loaded: @rpath/libLerc.dylib

It is possible/likely that GDAL_jll depends on LERC_jll, but doesn't declare so. It now expects LERC_jll version 3, but that is not available any more.

If so, the solution would be to either add a compat bound for GDAL_jll, restricting Libtiff_jll to ~4.6, or to release a new version of GDAL_jll that either doesn't use LERC or explicitly delcares this dependency.

@visr
Copy link
Member

visr commented Oct 8, 2024

I guess LERC was just picked up automatically since it was found since libtiff has it as a dependency:

Control whether to use LERC. Defaults to ON when LERC is found.

From https://gdal.org/en/latest/development/building_from_source.html#lerc

LERC compression is also available when building GDAL against external libtiff >= 4.3.0, built itself against https://github.com/esri/lerc

https://gdal.org/en/latest/drivers/raster/gtiff.html

So I guess it would be best to explicitly declare the LERC dependency.

@visr visr added the build label Oct 8, 2024
@visr
Copy link
Member

visr commented Oct 8, 2024

This breakage doesn't affect Windows. Is add LERC_jll@3 enough for you as a workaround?

@visr visr pinned this issue Oct 8, 2024
@lazarusA
Copy link

lazarusA commented Oct 8, 2024

@visr wow! Coming back from a 2 week lagged project, this one also failed for me. However, doing the above first works.

add LERC_jll@3

in my case it complained about

LoadError: InitError: could not load library
".../lib/libgdal.so"
libLerc.so:

@arlowhite
Copy link

arlowhite commented Oct 9, 2024

confirmed that LERC_jll 3 works, but 4 does not. So I'd suggest you also compat or pin
add LERC_jll@3
compat LERC_jll 3

@tpoisot
Copy link

tpoisot commented Oct 9, 2024

The fix of adding LERC_jll@3 works on Linux - but this should be handled by GDAL.jl directly

@eschnett
Copy link
Author

eschnett commented Oct 9, 2024

I think it should be handled by GDAL_jll.jl, not GDAL.jl, either by adding (after the fact) the missing compat bound, or by releasing a new version with an explicit dependency on LERC_jll.jl.

visr added a commit to visr/Yggdrasil that referenced this issue Oct 9, 2024
Needs JuliaPackaging#9586.

The recent LERC_jll v4 release broke GDAL_jll since it was an implicit dependency. See JuliaGeo/GDAL.jl#179.

This tries to make a new release compatible with LERC_jll v4, and the latest breaking PROJ release. Since PROJ is also a dependency of libgeotiff this needs JuliaPackaging#9586 first.

It also adds compats for dependencies that did not yet have them.
visr added a commit to visr/Yggdrasil that referenced this issue Oct 9, 2024
A more minimal predecessor to JuliaPackaging#9587 to hopefully be able to fix JuliaGeo/GDAL.jl#179 more quickly.
@visr
Copy link
Member

visr commented Oct 9, 2024

I submitted the (hopefully) quick fix JuliaPackaging/Yggdrasil#9588 to add a LERC v3, and JuliaPackaging/Yggdrasil#9586 and JuliaPackaging/Yggdrasil#9587 as the way forward, such that we also become compatible with the latest PROJ build again.

@ViralBShah
Copy link
Contributor

ViralBShah commented Oct 10, 2024

Thanks guys. I just found this myself with 1.11 on mac, and great to see a fix is almost in place.

ViralBShah pushed a commit to JuliaPackaging/Yggdrasil that referenced this issue Oct 10, 2024
* [GDAL] Add LERC only

A more minimal predecessor to #9587 to hopefully be able to fix JuliaGeo/GDAL.jl#179 more quickly.

* Disable aarch64-freebsd for now
visr added a commit that referenced this issue Oct 10, 2024
@visr
Copy link
Member

visr commented Oct 10, 2024

Fixed by JuliaPackaging/Yggdrasil#9588 as shown by #181.

@visr visr closed this as completed Oct 10, 2024
ViralBShah pushed a commit to JuliaPackaging/Yggdrasil that referenced this issue Oct 10, 2024
* [GDAL] Add explicit LERC dependency

Needs #9586.

The recent LERC_jll v4 release broke GDAL_jll since it was an implicit dependency. See JuliaGeo/GDAL.jl#179.

This tries to make a new release compatible with LERC_jll v4, and the latest breaking PROJ release. Since PROJ is also a dependency of libgeotiff this needs #9586 first.

It also adds compats for dependencies that did not yet have them.

* Rebuild now that libgeotiff_jll is updated
@visr visr unpinned this issue Oct 10, 2024
avik-pal pushed a commit to avik-pal/Yggdrasil that referenced this issue Oct 25, 2024
* [GDAL] Add LERC only

A more minimal predecessor to JuliaPackaging#9587 to hopefully be able to fix JuliaGeo/GDAL.jl#179 more quickly.

* Disable aarch64-freebsd for now
avik-pal pushed a commit to avik-pal/Yggdrasil that referenced this issue Oct 25, 2024
* [GDAL] Add explicit LERC dependency

Needs JuliaPackaging#9586.

The recent LERC_jll v4 release broke GDAL_jll since it was an implicit dependency. See JuliaGeo/GDAL.jl#179.

This tries to make a new release compatible with LERC_jll v4, and the latest breaking PROJ release. Since PROJ is also a dependency of libgeotiff this needs JuliaPackaging#9586 first.

It also adds compats for dependencies that did not yet have them.

* Rebuild now that libgeotiff_jll is updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants