Repository navigation
[opencv4] Fix arm64ec being configured as 32-bit x86 - #55249
qualcommkdi wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the ARM64EC update, although validation was limited to the diff without build or consumer-integration testing.
No open issues 🎉
What changed in this PR
Updates the OpenCV port to recognize ARM64EC as AArch64 instead of falling back to the 32-bit x86 configuration.
Changes:
- Extends the architecture condition to include both
arm64andarm64ec. - Bumps OpenCV 4.14.0 to port revision 1 and updates the version database.
Validation was limited to the supplied diff; builds and consumer integration were not tested.
| File | Description |
|---|---|
versions/o-/opencv4.json |
Registers OpenCV 4.14.0 port revision 1. |
versions/baseline.json |
Advances the OpenCV baseline to revision 1. |
ports/opencv4/vcpkg.json |
Sets the port revision to 1. |
ports/opencv4/portfile.cmake |
Includes ARM64EC in AArch64 handling and adds a copyright comment. |
Review effort: Balanced
|
@microsoft-github-policy-service agree company="Qualcomm Technologies, Inc." |
Radek Bartoň (Blackhex)
left a comment
There was a problem hiding this comment.
LGTM, thank you.
GPT Sol 6.2 found one pre-existing issue:
F1: Strict direct consumers need the OpenCV-specific include root
Non-blocking; pre-existing. With only
<triplet>/includeon the include path, even opening the header as<opencv4/opencv2/core.hpp>fails at its nestedopencv2/core/cvdef.hinclude. Debug and Release both returned compiler exit 2 withfatal error C1083: Cannot open include file: 'opencv2/core/cvdef.h': No such file or directory. Every configuration-specific import library was supplied, but compilation stopped before linking. Replacing the sole include directory with<triplet>/include/opencv4made the same example compile and link in both configurations; matching CMake exports supply that directory automatically.The base recipe and the reviewed recipe pass the same
OPENCV_INCLUDE_INSTALL_PATH=include/opencv4to the same upstream source and patches. Classification as pre-existing is based on that unchanged layout and header, not a second base install on ARM64EC. A separate packaging change could make strict direct consumption work while preserving OpenCV-version coexistence and CMake consumers. No layout change is required for this PR.
Summary
arm64ecis not handled in theTARGET_IS_*selection ofports/opencv4/portfile.cmake, so it falls through to the finalelse()branch and OpenCV is configured with-DX86=1(32-bit x86 / SSE baseline), even though arm64ec code is compiled as AArch64 and uses NEON.This change treats
arm64ecthe same asarm64:TARGET_IS_AARCH64(passes-DAARCH64=1)The
_M_ARM64ECsource-level changes in OpenCV itself are already upstream as of 4.14.0, so no source patch is needed.Checklist
./vcpkg x-add-version opencv4.vcpkg install opencv4[core]:arm64ec-windows