Skip to content

Added qvac-lib-inference-addon-cpp port at version 0.1.0#1

Merged
chetasr merged 4 commits into
tetherto:mainfrom
jpgaribotti:main
Mar 12, 2025
Merged

Added qvac-lib-inference-addon-cpp port at version 0.1.0#1
chetasr merged 4 commits into
tetherto:mainfrom
jpgaribotti:main

Conversation

@jpgaribotti

Copy link
Copy Markdown
Contributor

No description provided.

@chetasr chetasr merged commit e855945 into tetherto:main Mar 12, 2025
jpgaribotti pushed a commit that referenced this pull request Mar 9, 2026
…pkg (#95)

* chore: Update onnxruntime version to 1.24.2

* Remove all ports except 1

Made-with: Cursor

* chore: Add back old ports

* Revert "chore: Add back old ports"

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

* fix(onnxruntime): Fix protobuf dependency case sensitivity

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

* chore: Update baseline to use onnxruntime 1.24.2 port-version 1

Updates baseline to point to the fixed version with lowercase protobuf dependency.

Made-with: Cursor

* fix(ports): Properly version abseil and onnx ports with port-version 1

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

* fix(onnxruntime): Remove incorrect #1 port-version from dependencies

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

* fix(onnxruntime): Revert protobuf to Protobuf (capital P) for CMake

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

* fix: correct protobuf case sensitivity in onnxruntime config

Made-with: Cursor

* chore: update versions database for onnxruntime port-version 4

Made-with: Cursor

* fix(onnxruntime): Fix clang compatibility for __builtin_ia32_tpause

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

* fix(onnxruntime): Remove obsolete NNAPI export patch for v1.24.2

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

* chore(versions): Update onnxruntime to port-version 6

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

Made-with: Cursor

* fix(abseil): remove obsolete Windows patch for v20250814.0

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

* chore(versions): update abseil to port-version 2

Made-with: Cursor

* fix(onnxruntime): remove obsolete DML export patch for v1.24.2

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

* chore(versions): update onnxruntime to port-version 7

Made-with: Cursor

* Revert "chore(versions): update onnxruntime to port-version 7"

This reverts commit 4fa1c79.

* Revert "fix(onnxruntime): remove obsolete DML export patch for v1.24.2"

This reverts commit f79941e.

* fix(onnxruntime): update DML patch for v1.24.2

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

* chore(registry): update onnxruntime to port-version 7

Made-with: Cursor

* fix(onnxruntime): correct patch file format for DML export

Removed trailing blank line that was causing 'corrupt patch at line 20' error.

Made-with: Cursor

* chore(registry): update git-tree hash for onnxruntime#7

Made-with: Cursor

* Fix onnxruntime DML patch header for Windows build

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

* Fix onnxruntime target_link_options for static lib on Windows

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

* Fix corrupt patch in onnxruntime port

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

* Update git-tree hash for onnxruntime 1.24.2#10

Updated git-tree hash to reflect the patch fix in the previous commit.

Made-with: Cursor

* Fix patch context formatting

Changed the incorrect `+` prefix to a space prefix for context lines at the end of the patch file.

Made-with: Cursor

* Update git-tree hash for fixed patch context

Made-with: Cursor

* Add patch to fix CoreML unguarded availability error on macOS

Made-with: Cursor

* Update git-tree hash for CoreML availability fix

Made-with: Cursor

* Resolve PR comments from GustavoA1604

Made-with: Cursor

* Bump abseil dependency version in onnxruntime

Made-with: Cursor

* Fix git-tree hash for abseil port version 1

---------

Co-authored-by: Ishan Vohra <ishanvohra@Ishans-MacBook-Air.local>
Zbig9000 added a commit to Zbig9000/qvac-registry-vcpkg that referenced this pull request May 19, 2026
…C-18993)

The 1.8.4.3 port previously pinned mario-rei/qvac-ext-lib-whisper.cpp
@ 1318aee9, which was mario-rei/feat/upstream-sync-v1.8.4.3 HEAD as it
stood when PR tetherto#12 on tetherto was opened.  That snapshot pre-dated
21 commits that had landed on tetherto/master (incl. tts-cpp /
parakeet-cpp first appearing in-tree); merging it into tetherto/master
directly silently dropped those 21 commits because mario's branch
never picked them up.

Repoint to Zbig9000/qvac-ext-lib-whisper.cpp @ 47784b9e =
QVAC-18991-pull-latest-whisper-cpp-upstream HEAD, which is mario's
1318aee9 + the post-divergence tetherto/master merge (recovers
tts-cpp + parakeet-cpp) + a new regression test covering the
whisper_vad_detect_speech_no_reset / whisper_vad_reset_state contract
added by upstream PR #3677 (upstream merged that PR without a test).

Same source identity once QVAC-18991 lands on tetherto/master and is
tagged v1.8.4.3; the TODO is to flip REPO -> tetherto/qvac-ext-lib-whisper.cpp
+ REF -> v1.8.4.3 + recompute SHA512 at that point.

Android dynamic-backend fix (the actual QVAC-18993 substance):

The QVAC-18300 port-version 0 recipe combined `GGML_BACKEND_DL=ON` +
`GGML_CPU_ALL_VARIANTS=ON` on Android, but the bundled ggml inside
whisper.cpp v1.8.4.3 still has the upstream
`if (GGML_BACKEND_DL AND NOT BUILD_SHARED_LIBS) FATAL_ERROR ...`
check.  vcpkg's `arm64-android` triplet forces VCPKG_LIBRARY_LINKAGE=static
(=> BUILD_SHARED_LIBS=OFF), so port-version 0's Android recipe never
actually built — it died at CMake configure time on `ggml/src/CMakeLists.txt:188`.
Adreno-on-the-device validation in CI presumably ran on a different
recipe (we couldn't reproduce port-version 0 building on local NDK r29).

Patch `patches/0001-ggml-allow-backend-dl-with-static-core.patch`
mirrors the speech-stack patch carried in qvac-ext-ggml: it removes
the FATAL_ERROR and switches the two PIC / GGML_BACKEND_SHARED guards
from `BUILD_SHARED_LIBS` to `BUILD_SHARED_LIBS OR GGML_BACKEND_DL`.
Three lines changed, narrow scope, mechanical.  Lets the dispatcher
(libwhisper.a, libggml.a, libggml-base.a) stay static while ggml's
loader dlopen's the per-backend MODULE .so files at runtime.

Validation: `vcpkg install whisper-cpp[opencl,vulkan]:arm64-android`
against this branch produces, in `lib/`:

  libwhisper.a            10.7 MB
  libggml.a               749 KB
  libggml-base.a          8.8 MB
  libOpenCL*.a            ICD loader from the opencl port

and in `bin/`:

  libggml-cpu-android_armv8.0_1.so
  libggml-cpu-android_armv8.2_1.so
  libggml-cpu-android_armv8.2_2.so
  libggml-cpu-android_armv8.6_1.so
  libggml-cpu-android_armv9.0_1.so
  libggml-cpu-android_armv9.2_1.so
  libggml-cpu-android_armv9.2_2.so
  libggml-vulkan.so
  libggml-opencl.so

i.e. the exact static-core + 7-microarch-CPU + Vulkan + OpenCL
dynamic-backend shape the speech-stack already ships for
parakeet-cpp / tts-cpp.  Linux x64 (without dynamic-backend) still
links cleanly into `libwhisper.a` only (no regression on the
non-Android path).

Bumps whisper-cpp 1.8.4.3 #0 -> 1.8.4.3 tetherto#1.
Zbig9000 added a commit to Zbig9000/qvac-registry-vcpkg that referenced this pull request May 20, 2026
Bumps the whisper-cpp port to consume the QVAC-18991 upstream-sync
commit on the Zbig9000 fork (https://github.com/tetherto/qvac-ext-lib-
whisper.cpp/pull/25), so the transcription-whispercpp on-PR workflow
in qvac monorepo can run against the upstream-sync content in
isolation (no QVAC-18300 / 18992 / 18993 changes mixed in).

Single-purpose validation port:
  - REF: tetherto v1.8.4.2 -> Zbig9000 47784b9e (PR tetherto#25 HEAD)
  - SHA512 recomputed from the GitHub tarball
  - HEAD_REF -> QVAC-18991-pull-latest-whisper-cpp-upstream
  - version: 1.8.4.2#1 -> 1.8.4.3#0
  - No feature changes, no patches, no Android-side configuration
    changes -- the port is identical in shape to 1.8.4.2#1 except
    for the source version.

This PR is NOT meant to merge to main long-term; it exists to feed
a CI run on tetherto/qvac#TBD (QVAC-18991 validation bump of
transcription-whispercpp). After CI proves the upstream-sync source
is buildable + addon CI is green, this PR is closeable. Production
consumption of 1.8.4.3 will go through whisper-cpp PR tetherto#28 + tetherto#27 +
this port's regular tetherto#1, tetherto#2, ... port-version chain landing via
qvac-registry-vcpkg PR tetherto#152.

Refs QVAC-18991 (Asana).

Co-authored-by: Cursor <cursoragent@cursor.com>
Zbig9000 added a commit to Zbig9000/qvac-registry-vcpkg that referenced this pull request May 20, 2026
Bumps the whisper-cpp port to consume the QVAC-18991 upstream-sync
commit on the Zbig9000 fork (https://github.com/tetherto/qvac-ext-lib-
whisper.cpp/pull/25), so the transcription-whispercpp on-PR workflow
in qvac monorepo can run against the upstream-sync content in
isolation (no QVAC-18300 / 18992 / 18993 changes mixed in).

Single-purpose validation port:
  - REF: tetherto v1.8.4.2 -> Zbig9000 47784b9e (PR tetherto#25 HEAD)
  - SHA512 recomputed from the GitHub tarball
  - HEAD_REF -> QVAC-18991-pull-latest-whisper-cpp-upstream
  - version: 1.8.4.2#1 -> 1.8.4.3#0
  - No feature changes, no patches, no Android-side configuration
    changes -- the port is identical in shape to 1.8.4.2#1 except
    for the source version.

This PR is NOT meant to merge to main long-term; it exists to feed
a CI run on tetherto/qvac#TBD (QVAC-18991 validation bump of
transcription-whispercpp). After CI proves the upstream-sync source
is buildable + addon CI is green, this PR is closeable. Production
consumption of 1.8.4.3 will go through whisper-cpp PR tetherto#28 + tetherto#27 +
this port's regular tetherto#1, tetherto#2, ... port-version chain landing via
qvac-registry-vcpkg PR tetherto#152.

Refs QVAC-18991 (Asana).

Co-authored-by: Cursor <cursoragent@cursor.com>
GustavoA1604 added a commit that referenced this pull request May 20, 2026
…roid dynamic backends) (#159)

* ggml-speech: bump to port-version 4 (PR #10 iOS Metal NULL-safety)

Picks up the iOS Metal NULL-safety hardening from
tetherto/qvac-ext-ggml#10 (PR-10's 3 commits f21ff9a0 + b7dc01c7 +
0f54d9f7) now merged into the `speech` branch as PR-10 merge
08d39f0c.

Android backend stack unchanged: GGML_CPU_ALL_VARIANTS=ON +
GGML_CPU_REPACK=ON shape introduced in port-version 3 stays. Only
the Apple Metal init path changes -- transient
`MTLCreateSystemDefaultDevice` / `ggml_metal_library_init` / buffer-
alloc failures now surface as a clean
`ggml_backend_metal_init: error: Metal device init failed - falling
back to CPU` log line + NULL return, instead of crashing inside
AGXMetalG17P.bundle with EXC_BAD_ACCESS (observed on iPhone 16 /
iOS 26.4 warm relaunches).

Co-authored-by: Cursor <cursoragent@cursor.com>

* tts-cpp: bump to 2026-05-20 + tighten ggml-speech to #4

Pulls in the Android dynamic-backend selection landed on
tetherto/qvac-ext-lib-whisper.cpp@master via PR #29 (merge 60dc1504,
content commit 907f3151): registry-only `init_gpu_backend()`
(Adreno 700+ -> OpenCL, every other GPU -> Vulkan / Metal / CUDA),
new EngineOptions::backends_dir / opencl_cache_dir fields wired
through to `tts_cpp::detail::set_backends_directory` /
`tts_cpp::detail::set_opencl_cache_dir`, and the GGML_BACKEND_DL=ON
Android CMake defaults so `ggml_backend_load_all_from_path()`
discovers per-arch CPU + Vulkan + OpenCL .so files installed
alongside the bare module.

Also tightens the ggml-speech dependency to `version>=: 2026-04-09#4`
so consumers without an explicit constraint of their own pull
ggml-speech port-version 4 (PR-10 iOS Metal NULL-safety) instead of
the registry baseline #1. tts-cpp's new `init_gpu_backend()` walks
the registry blindly and a NULL-from-Metal-init is now handled
cleanly thanks to PR-10, so #4 is the lowest version this port is
safe against.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

5 participants