Repository navigation
CI: Workaround OSGeo4W OpenSSL DLL conflict by forcing one - #7959
Merged
Merged
Conversation
The OSGeo4W python3-core package ships its own libssl-3-x64.dll and libcrypto-3-x64.dll (OpenSSL 3.0.21) in apps/Python312/DLLs, with the same names as the OSGeo4W openssl package DLLs (OpenSSL 3.5.8) in bin. The curl 8.22.0-1 package, which arrived in OSGeo4W on 2026-09-25 together with a gdal 3.13.3-2 rebuild, has a libcurl.dll which imports SSL_get0_group_name, available only since OpenSSL 3.2. In a Python process which already loaded the Python copy of libssl, loading the GDAL bindings or GRASS libraries (which pull in libcurl through GDAL or PROJ) fails with STATUS_ENTRYPOINT_NOT_FOUND (0xc0000139), so pytest reports collection errors. Copy the OSGeo4W OpenSSL DLLs over the Python copies so that there is only one OpenSSL version in the process. OpenSSL 3 keeps ABI compatibility across minor versions, so the Python ssl module works with the newer DLLs. The investigation and the change were done with AI assistance (Claude Code).
wenzeslaus
enabled auto-merge (squash)
September 27, 2026 03:34
echoix
approved these changes
Sep 27, 2026
echoix
left a comment
Member
There was a problem hiding this comment.
Thanks for the hack! I don’t know if you arrived to the same conclusions that I did or you had to redo the investigation, but it makes sense now knowing the cause
Member
|
I saw in my emails that my OSGeo4W trac ticket got closed I’m retrying in a not-updated PR, then I’ll revert this one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CI OSGeo4W job fails loading GDAL and GRASS libraries. My search did not find discussion in our repo, and the fix is ultimately an update in the OSGeo4W packaging, but anyway, as as a workaround, I think we can use this as a workaround to get the CI green. OpenSSL coming from cURL is forced into the Python install by copying the file.
Details and AI use (mostly AI generated)
The investigation (log and package diffing, DLL import and export analysis) and the workflow change were done with AI assistance (Claude Code); the result was verified by a CI run on the [fork repo](https://github.com/wenzeslaus/pull/50).Since 2026-09-25 (curl 8.22 update) the OSGeo4W "windows-2022 build and tests" job fails in
"Run pytest with multiple workers in parallel" with collection errors
ImportError: Could not load grass_gis.8.6.andImportError: DLL load failed while importing _gdal: The specified procedure could not be found.,accompanied by
Windows fatal exception: code 0xc0000139. Last green run:36112398152; first failures: 36126600837, 36134900476.
Between those runs OSGeo4W updated curl 8.21.0-1 -> 8.22.0-1 and gdal
3.13.3-1 -> 3.13.3-2. The new libcurl.dll imports
SSL_get0_group_name(OpenSSL >= 3.2). OSGeo4W python3-core 3.12.14-2 bundles OpenSSL 3.0.21 as
apps\Python312\DLLs\libssl-3-x64.dll, the same file name as the OSGeo4Wopenssl 3.5.8 DLL in
bin. Once Python has loaded its own libssl, libcurl(pulled in by GDAL, and by PROJ for libgrass_gis) binds to it and fails with
STATUS_ENTRYPOINT_NOT_FOUND. GRASS tools run as separate processes and are
not affected.
Proposed CI workaround: after installing OSGeo4W, copy
bin\libssl-3-x64.dlland
bin\libcrypto-3-x64.dllover the copies inapps\Python312\DLLs(OpenSSL 3 is ABI compatible across minor versions). This passed on a fork:
wenzeslaus#50. The underlying packaging
problem should also be reported to OSGeo4W, since any OSGeo4W Python that
imports
sslbeforeosgeo.gdalis likely affected.Commit message for auto-merge: