Skip to content

QVAC-13511 - Upgrade onnxruntime version to v1.24 in qvac-registry-vcpkg#95

Merged
jpgaribotti merged 36 commits into
tetherto:mainfrom
ishanvohra2:main
Mar 9, 2026
Merged

QVAC-13511 - Upgrade onnxruntime version to v1.24 in qvac-registry-vcpkg#95
jpgaribotti merged 36 commits into
tetherto:mainfrom
ishanvohra2:main

Conversation

@ishanvohra2

Copy link
Copy Markdown
Contributor

No description provided.

Ishan Vohra and others added 7 commits March 2, 2026 18:56
Made-with: Cursor
Reverting the addition of older onnxruntime port versions (1.22.0 and 1.21.0) as they were causing build failures with protobuf dependency resolution.

Made-with: Cursor
Changed find_dependency(Protobuf) to find_dependency(protobuf) to match vcpkg's package naming convention. This resolves the build error where CMake couldn't find the protobuf dependency.

- Updated port-version from 0 to 1
- Fixed 05-add-dependencies-to-config.patch
- Updated versions file with new git-tree hash

Made-with: Cursor
Updates baseline to point to the fixed version with lowercase protobuf dependency.

Made-with: Cursor

@jpgaribotti jpgaribotti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The abseil and onnx ports are improperly updated. The version should be updated in the vcpkg.json of each port (ports/abseil/vcpkg.json and ports/onnx/vcpkg.json). In the case of these, which are versioned as "onnxruntime" (look at the dependencies in ports/onnxruntime/vcpkg.json) the port version has to increase, and the dependency must be increased to "version>=": "onnxruntime#1".

Ishan Vohra added 5 commits March 3, 2026 16:11
As per vcpkg convention, when onnxruntime is updated to port-version 1,
all dependent ports that use "onnxruntime" versioning scheme must also:
1. Increment their port-version to 1
2. Update dependency constraints to require the new port-version using #1 suffix

Changes:
- abseil: Added port-version 1, updated git-tree hash
- onnx: Added port-version 1, updated git-tree hash
- onnxruntime: Updated all "onnxruntime" versioned dependencies to require #1
- Updated versions files and baseline for all three ports

This addresses the review comment about proper port versioning.

Made-with: Cursor
Only abseil and onnx have port-version 1. Other dependencies like
cpuinfo, eigen3, protobuf, pybind11, and xnnpack should use their
standard version scheme without #1 suffix.

Made-with: Cursor
The CMake FindProtobuf module expects the package name to be 'Protobuf'
with a capital P, not 'protobuf'. The vcpkg wrapper correctly maps this
to the lowercase protobuf package.

Made-with: Cursor
@ishanvohra2 ishanvohra2 requested a review from jpgaribotti March 4, 2026 16:41
Ishan Vohra added 16 commits March 5, 2026 12:24
Replace __builtin_ia32_tpause with portable _tpause intrinsic to fix clang-19 build error.
GCC's __builtin_ia32_tpause takes 2 args, but clang's takes 3 args.
The _tpause intrinsic works consistently across both compilers.

- Add 11-fix-tpause-clang.patch
- Update port-version to 5
- Update versions database

Made-with: Cursor
The 07-fix-nnapi-export.patch is no longer needed for onnxruntime v1.24.2+
as the EXPORT clause is already included in the upstream source.

- Updated portfile.cmake to skip applying the patch for Android builds
- Bumped port-version from 5 to 6
- Added documentation note to the patch file for historical reference

Made-with: Cursor
- Added new git-tree hash for port-version 6
- Updated baseline.json to reference port-version 6

Made-with: Cursor
The absl_windows.patch is no longer compatible with abseil v20250814.0.
Analysis shows the main fixes (removal of /wd4244 and /wd4267 warning
suppressions) are already in upstream. The symbolizer code has been
completely refactored, making the patch obsolete.

Changes:
- Remove conditional patch application for Windows builds
- Increment port-version from 1 to 2
- Add documentation comment explaining the removal

If Windows-specific compilation issues arise, a new minimal patch
targeting v20250814.0 can be created.

Made-with: Cursor
The 07-fix-dml-export.patch is no longer needed for onnxruntime v1.24.2.
The EXPORT clause it was adding is already present in upstream.

Changes:
- Delete 07-fix-dml-export.patch (Windows/DirectML only)
- Remove patch application from portfile
- Increment port-version from 6 to 7

DirectML is Windows-only, so this patch only affected Windows builds.

Made-with: Cursor
The second hunk of 07-fix-dml-export.patch (adding EXPORT to install)
is already present in upstream v1.24.2. Updated patch to only include
the first hunk (fixing DirectML.lib linking with generator expressions).

Bumped port-version to 7.

Made-with: Cursor
Removed trailing blank line that was causing 'corrupt patch at line 20' error.

Made-with: Cursor
The 07-fix-dml-export.patch had an incorrect unified diff header
that caused 'corrupt patch at line 19' error on Windows builds.

Changed header from @@ -48,8 +48,13 @@ to @@ -48,6 +48,11 @@
to match the actual patch content (6 original lines, 11 new lines).

Bumped port-version from 7 to 9.

Made-with: Cursor
When building as a static library (onnxruntime_BUILD_SHARED_LIB=OFF),
the onnxruntime target is an INTERFACE target. CMake only allows
setting INTERFACE properties on INTERFACE targets.

The original code tried to set PRIVATE link options which caused:
'target_link_options may only set INTERFACE properties on INTERFACE targets'

Added patch 12-fix-delayload-static-lib.patch to conditionally use
INTERFACE for static builds and PRIVATE for shared builds.

Bumped port-version to 10.

Made-with: Cursor
The patch 12-fix-delayload-static-lib.patch had an incorrect hunk header that didn't match the actual line counts, causing "corrupt patch at line 16" errors during vcpkg builds on Windows. Added missing context lines from the source to match the declared line count.

Made-with: Cursor
Ishan Vohra added 5 commits March 6, 2026 12:55
Updated git-tree hash to reflect the patch fix in the previous commit.

Made-with: Cursor
Changed the incorrect `+` prefix to a space prefix for context lines at the end of the patch file.

Made-with: Cursor
Comment thread ports/onnx/portfile.cmake Outdated
Comment thread ports/onnxruntime/portfile.cmake Outdated
Comment thread versions/o-/onnxruntime.json Outdated
Comment thread versions/o-/onnx.json Outdated
Comment thread versions/a-/abseil.json Outdated
Comment thread ports/onnxruntime/vcpkg.json Outdated
Comment thread ports/abseil/vcpkg.json Outdated
Comment thread versions/baseline.json Outdated
Comment thread versions/o-/onnxruntime.json
@jpgaribotti jpgaribotti merged commit af1010f into tetherto:main Mar 9, 2026
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.

3 participants