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] Remove giflib to fix Windows #9075

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

visr
Copy link
Contributor

@visr visr commented Jul 13, 2024

Fixes #8781. I rebuilt with different combinations of the 7 dependencies added in #8749 to find that giflib breaks GDAL on Windows. So I suggest removing this dependency for now. @eschnett are you ok with this? I should add that installing the older Giflib_jll v5.2.1 (not the newly built v5.2.2) with the current GDAL_jll also didn't help.

@giordano giordano requested a review from eschnett July 13, 2024 19:44
@giordano
Copy link
Member

I'm confused by your message

I should add that installing the older Giflib_jll v5.2.1 (not the newly built v5.2.2) with the current GDAL_jll also didn't help.

and the comment in the code

# Breaks GDAL on Windows as of Giflib_jll v5.2.2 (#8781)

as I find the two statements somewhat contradicting.

@visr
Copy link
Contributor Author

visr commented Jul 14, 2024

Yeah I assume that GDAL was built against v5.2.2 (with a 5.2.1 compat). I can load both giflib JLLs fine. And if I have either version in my environment at load time, it both fails to load the current GDAL_jll.

Or does it build against the oldest compatible dependencies, in which case we should try setting compat to 5.2.2.

With this PR build the GDAL.jl tests pass on Windows except for two minor GDAL 3.9 changes.

@evetion
Copy link
Contributor

evetion commented Jul 14, 2024

If you look at the GMT failure, it already failed with Giflib_jll v5.2.1+0.

Another interesting thing is that if you put all required libraries in the same location (via JLLPrefixes.deploy_artifact_paths), you can load libgdal.dll just fine. Might be a red herring, but it seems to be some relative load thing at init time. Are there any tools to inspect/debug the dll dep tree like from within Julia?

@visr Did you also check with DGDAL_USE_WEBP=OFF (while including giflib), as libwebp also depends on giflib?

@giordano
Copy link
Member

Are there any tools to inspect/debug the dll dep tree like from within Julia?

https://github.com/giordano/DependencyWalker.jl?

@evetion
Copy link
Contributor

evetion commented Jul 14, 2024

Are there any tools to inspect/debug the dll dep tree like from within Julia?

giordano/DependencyWalker.jl?

Excellent stuff, this will save us some time in the future! That does indeed simply say libgif.dll not found.

Copy link
Contributor

@eschnett eschnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I can't tell whether there are any users of GDAL relying to giflib, though.

@giordano
Copy link
Member

Yeah I assume that GDAL was built against v5.2.2 (with a 5.2.1 compat)

If there's only a compat bound, then the minimum version matching it is used for building: https://docs.binarybuilder.org/stable/reference/#BinaryBuilderBase.Dependency

@visr
Copy link
Contributor Author

visr commented Jul 14, 2024

Ok then I'd say let's merge to fix the breakage, we can look into ways to get giflib working later.

@giordano giordano merged commit f9aef54 into JuliaPackaging:master Jul 14, 2024
32 checks passed
@visr visr deleted the gdal-no-giflib branch July 14, 2024 18:04
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

Successfully merging this pull request may close these issues.

[GDAL] Fix Windows build issues
4 participants