Skip to content

Replace FetchContent in hannk with vcpkg#8962

Merged
alexreinking merged 5 commits intomainfrom
alexreinking/hannk-vcpkg
Mar 10, 2026
Merged

Replace FetchContent in hannk with vcpkg#8962
alexreinking merged 5 commits intomainfrom
alexreinking/hannk-vcpkg

Conversation

@alexreinking
Copy link
Member

@alexreinking alexreinking commented Feb 24, 2026

With vcpkg support in place for the apps, only two stand out as needing additional treatment: hannk and onnx. These both use FetchContent, which fundamentally confuses the build system with dependency provision. This PR removes FetchContent from hannk, replacing it with structured vcpkg ports that benefit from binary caching (we used to build tensorflow-lite on every PR!), SHA512 validated sources, and faster HTTPS based downloads (rather than a shallow git clone). It also upgrades tensorflow-lite to 2.21.0-rc2, which is the first (and latest) version to have a usable CMake package API.

This will likely require making the buildbots unconditionally use vcpkg when building the apps. It did and this is done.

@alexreinking alexreinking force-pushed the alexreinking/hannk-vcpkg branch 2 times, most recently from e08f401 to f30b412 Compare February 24, 2026 20:23
@alexreinking alexreinking requested review from halidebuildbots and removed request for halidebuildbots February 24, 2026 20:26
@alexreinking alexreinking force-pushed the alexreinking/hannk-vcpkg branch from bc6b3d1 to 82d42bb Compare March 8, 2026 09:32
alexreinking and others added 4 commits March 9, 2026 22:49
vcpkg overrides find_package with a macro that stores \${ARGN} in a
double-quoted string.  Textual macro substitution causes the value to
be re-parsed as a string literal, so a Windows path whose components
start with a letter (e.g. \build_bot -> \b) triggers CMake's CMP0010
invalid-escape-sequence error.  Normalizing with file(TO_CMAKE_PATH)
converts backslashes to forward slashes before the path reaches the
macro.

No upstream vcpkg issue exists for this as of 2026-02-25.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alexreinking alexreinking force-pushed the alexreinking/hannk-vcpkg branch from 82d42bb to 640e8c6 Compare March 10, 2026 02:49
@alexreinking
Copy link
Member Author

Pesky illegal instruction strikes again

Use MSVC-valid distribution wrappers for bool, int8_t, and uint8_t. N4950 [rand.req.genl]/1.5 does not allow std::uniform_int_distribution on those types.
@alexreinking
Copy link
Member Author

alexreinking commented Mar 10, 2026

Intel macOS failure is this: microsoft/vcpkg#48417

AppleClang improperly prioritizes /usr/local/include over manually specified -isystem paths on Intel.

@alexreinking
Copy link
Member Author

alexreinking commented Mar 10, 2026

Resolved by removing the following packages from Homebrew on the x86 mac runners:

  • libjpeg / jpeg-turbo
  • protobuf
  • abseil

@alexreinking alexreinking merged commit 23a1386 into main Mar 10, 2026
25 checks passed
@alexreinking alexreinking deleted the alexreinking/hannk-vcpkg branch March 10, 2026 19:08
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.

2 participants