julia: fix bindings build with mirrored types and current CxxWrap#4143
Open
tae0x wants to merge 5 commits into
Open
julia: fix bindings build with mirrored types and current CxxWrap#4143tae0x wants to merge 5 commits into
tae0x wants to merge 5 commits into
Conversation
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.
Summary
This PR fixes the Julia bindings build against current OpenCV
4.xand recent Julia/CxxWrap releases.The main issues addressed are:
Related issues
Fixes #4142.
Also addresses the mirrored-type failure reported in #3531.
Related to #3915, which reports current Julia/CxxWrap build failures including
jl_array_data,vector_int, mirrored-type, andcv::Ptrerrors.Fix approach
The fix keeps manually mirrored OpenCV value types on the manual CxxWrap path and prevents the generator from also emitting regular class wrappers for them. This avoids the invalid
map_typeplusadd_typecombination for types such ascv::RotatedRect.The Julia generator now receives OpenCV binding preprocessor definitions through a small generated JSON config, and the generator entry points pass those definitions to
hdr_parser. This makes generated Julia wrappers respect the same module and version guards as the rest of the binding infrastructure.The C++ support code uses version-gated compatibility paths for Julia and CxxWrap API changes:
jl_array_dataone-argument versus typed two-argument form.julia_base_typereturn type handling.The PR also adds aliases needed by the generated wrappers for current OpenCV headers, including
vector_int,CirclesGridFinderParameters::GridType, and newer DNN enum aliases.Verification
Tested with:
ubuntu:latestcontainer image4.xfix-julia-module-build1.12.60.17.5opencv_juliaAt the time of verification,
opencv/opencv:4.xresolved toab1aaa75, and this branch resolved to72df737a.Reproducer:
This command completes by building and linking
libopencv_julia.so.