Skip to content

Upgrade to vcpkg 2026.04.27 release#689

Open
kring wants to merge 10 commits into
mainfrom
vcpkg-upgrade
Open

Upgrade to vcpkg 2026.04.27 release#689
kring wants to merge 10 commits into
mainfrom
vcpkg-upgrade

Conversation

@kring
Copy link
Copy Markdown
Member

@kring kring commented May 7, 2026

This depends on CesiumGS/cesium-native#1360 so merge that first.

This PR upgrades cesium-unity's vcpkg dependency stack to the 2026.04.27 release.

Changes

cesium-native submodule

  • Updated the cesium-native submodule to the vcpkg-upgrade branch, which bumps the vcpkg baseline and includes a Windows zlib fix.

abseil overlay port → 20260107.1

  • Customizations are identical to those in cesium-unreal: C++17 build, inline-namespace rename to avoid ODR violations with Unity's bundled abseil, suppressed ABSL_LTS_RELEASE_VERSION macros, forced ABSL_OPTION_USE_STD_ORDERING=0 for Android NDK compatibility, and the cord.h NDK r25 fix.
  • Two new upstream patch files (fix-heterogeneous_lookup_testing-target.patch, fix-mingw-dll.patch) are included.

abseil UWP build fix

  • Added a patch (fix-uwp-time-zone-lookup.patch) to fix an unresolved external symbol linker error on UWP targets. In abseil 20260107.1, time_zone_lookup.cc references GetWindowsLocalTimeZone() under #if defined(_WIN32), which is true on UWP, but the function is only compiled when CMAKE_SYSTEM_NAME == "Windows". The patch guards the call with !WINAPI_FAMILY_APP to match the compile-time guard.
  • This is an upstream bug that we're working around here.

sqlite3 overlay port → pinned to 3.51.3

  • Added a sqlite3 overlay port pinned to version 3.51.3. SQLite 3.53.0 (the version in the new vcpkg baseline) intentionally dropped WinRT support.
  • It's unclear if the sqlite3 developers intended to also drop UWP support (which we need for HoloLens, at least), but this is what happened.
  • Version 3.51.3 is the latest release with UWP support via SQLITE_OS_WINRT.

s2geometry overlay port (Android Clang 12 fix)

  • Added an s2geometry overlay port with a patch that removes [[nodiscard]] from the SpinLockHolder class declaration. s2geometry 0.13.1 added [[nodiscard]] ABSL_SCOPED_LOCKABLE to this class, but mixing a C++ standard attribute with a GNU-style attribute before the class name triggers a Clang 12 bug (used by Unity's Android NDK r23) that treats the class as anonymous. Clang 14+ (used by Unreal's NDK r25) handles this correctly.

blend2d overlay port removed

  • Removed the blend2d overlay port as it is no longer needed.

kring and others added 8 commits May 4, 2026 12:46
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The customizations in this overlay port are no longer needed with the
new vcpkg version, as confirmed when performing the same upgrade in
cesium-unreal (https://github.com/CesiumGS/cesium-unreal/tree/vcpkg-upgrade).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copied from CesiumGS/cesium-unreal vcpkg-upgrade branch at commit
9c0eb29876afce58827613297dfe259b59c1029c. This version targets the new
vcpkg 2026.04.27 baseline abseil release, with the following customizations
preserved for Unity (identical to those used by cesium-unreal):

- Prevent abseil from overriding CMAKE_MSVC_RUNTIME_LIBRARY
- Rename the inline namespace to lts_20260107_cesium_for_unreal to avoid ODR
  violations when both our abseil and Unity's bundled abseil are linked together
- Suppress ABSL_LTS_RELEASE_VERSION macros to avoid version-check mismatches
- Force ABSL_OPTION_USE_STD_ORDERING=0 to avoid C++20 library dependencies
  on Android NDK builds with incomplete C++20 library support
- Fix C++20 three-way comparison guard in cord.h for Android NDK r25
- Build with C++17 and ABSL_PROPAGATE_CXX_STD=OFF to avoid propagating C++20
  requirements to consumers

Two new patch files are also included (taken from the upstream vcpkg port):
- fix-heterogeneous_lookup_testing-target.patch
- fix-mingw-dll.patch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SQLite 3.53.0 intentionally dropped Windows RT / UWP support (see item 12
in the 3.53.0 changelog: https://www.sqlite.org/changes.html). The stock
vcpkg sqlite3 port at commit 56bb2411 uses 3.53.0, which fails to compile
when targeting arm64-uwp-unity because several Win32 APIs required by the
sqlite3.c Win32 VFS (AreFileApisANSI, CreateFileA, CreateFileW, GetFileSize,
HeapValidate) are not available when WINAPI_FAMILY=WINAPI_FAMILY_APP.

This overlay pins sqlite3 to version 3.51.3, the latest version with UWP /
WinRT support. The UWP fix relies on SQLITE_OS_WINRT=1, which is injected
via sqlite3-vcpkg-config.h when VCPKG_TARGET_IS_UWP is set. This define
exists and is functional in 3.51.3 but was removed in 3.53.0.

All other port files (patches, CMakeLists.txt, config headers, etc.) are
copied unchanged from the stock vcpkg port at commit 56bb2411.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…_APP.

In abseil 20260107.1, time_zone_name_win.cc is only compiled when CMake's
PLATFORM_ID is "Windows". On UWP targets, CMAKE_SYSTEM_NAME is
"WindowsStore", so PLATFORM_ID is not "Windows" and the file is excluded.
However, time_zone_lookup.cc still references GetWindowsLocalTimeZone()
under #if defined(_WIN32), which is true on UWP, causing an unresolved
external symbol linker error.

The fix adds a patch (fix-uwp-time-zone-lookup.patch) that:
1. Includes <winapifamily.h> on _WIN32 so WINAPI_FAMILY_APP is defined.
2. Guards the time_zone_name_win.h include and GetWindowsLocalTimeZone()
   call with an additional check excluding WINAPI_FAMILY_APP (UWP), matching
   the behavior of the CMakeLists.txt source file guard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
s2geometry 0.13.1 added [[nodiscard]] to the SpinLockHolder class:

  class [[nodiscard]] ABSL_SCOPED_LOCKABLE SpinLockHolder { ... };

ABSL_SCOPED_LOCKABLE expands to __attribute__((scoped_lockable)) on
Clang. Clang 12 (used by Unity's Android NDK r23) has a bug where
mixing a C++ standard attribute ([[nodiscard]]) with a GNU-style
attribute (__attribute__(...)) between the "class" keyword and the
class name causes the class to be treated as anonymous:

  error: declaration of anonymous class must be a definition
  error: unknown type name 'SpinLockHolder'

Clang 14+ (e.g. Unreal Engine's Android NDK r25) handles this syntax
correctly. The new overlay port patches spinlock.h to remove
[[nodiscard]] from the class declaration. This is a minor diagnostic
annotation only and does not affect correctness.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@j9liu j9liu added this to the June 2026 Release milestone May 7, 2026
@kring
Copy link
Copy Markdown
Member Author

kring commented May 18, 2026

Looks like the sqlite folks are aware of the regression and are moving toward fixing it: https://sqlite.org/forum/forumpost/b5a2f9413108b36b4e8b9e99d87c20118433e603f0ee3ececd77745c73374ef2

@j9liu j9liu removed this from the June 2026 Release milestone May 19, 2026
@j9liu j9liu added this to the July 2026 Release milestone May 29, 2026
@j9liu j9liu self-requested a review June 2, 2026 15:20
Copy link
Copy Markdown
Contributor

@j9liu j9liu left a comment

Choose a reason for hiding this comment

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

Thanks @kring for the PR! My only comments are about some copied references to "Unreal Engine" that should be changed to "Unity".

Otherwise, I spot checked the package in Unity and everything seems to work just as well.

Comment on lines +1 to +23
# =============================================================================
# Cesium for Unreal — Custom Abseil overlay port
# =============================================================================
#
# This overlay customizes the standard vcpkg abseil port in several ways
# required for compatibility with Unreal Engine. When upgrading the abseil
# version, re-apply each customization described below and verify it is still
# necessary.
#
# CUSTOMIZATION HISTORY:
# Originally created Nov 2024 (abseil 20240722.0) to fix Android and MSVC
# build issues. Updated to 20260107.1 to match the vcpkg 2026.04.27 baseline.
#
# BACKGROUND — Unreal Engine and the Android NDK:
# Unreal Engine uses C++20. However, the Android NDK version bundled with
# Unreal has incomplete C++20 *library* support even though the compiler
# supports C++20 *language* features. This means headers that are compiled
# as part of Unreal's Android build (including installed vcpkg headers) must
# not rely on C++20 standard library types such as std::partial_ordering.
# We build abseil itself with C++17 to avoid any C++20 library dependencies
# in abseil's own compilation. We additionally patch the installed headers
# to be safe when included by Unreal's C++20 Android build.

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.

Change the text throughout this doc for Unity?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I intentionally made this an exact copy of the overlay port in Cesium for Unreal. If I had it to do over again, I would have put less Unreal-specific stuff in there in the first place. But I think the benefit of keeping the two in sync outweighs the weirdness of the comments. The commit message explains exactly where the overlay came from (a particular commit of cesium-unreal). This is useful because, when I told Copilot to do this update, I told it specifically to look at the commit messages to understand what changed and why so that you know how to incorporate the relevant changes into the new version. That worked really well.

{
"name": "abseil",
"version": "20240722.0-cesium-for-unreal",
"version": "20260107.1-cesium-for-unreal",
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.

NIT: If it's not too much trouble...

Suggested change
"version": "20260107.1-cesium-for-unreal",
"version": "20260107.1-cesium-for-unity",

# error: declaration of anonymous class must be a definition
# error: unknown type name 'SpinLockHolder'
#
# Clang 14+ (Unreal Engine's Android NDK r25) handles this syntax correctly.
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.

Suggested change
# Clang 14+ (Unreal Engine's Android NDK r25) handles this syntax correctly.
# Clang 14+ (Unity's Android NDK r25) handles this syntax correctly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This time the reference to Unreal is actually correct! It's explaining why this overlay port is only needed in Unity, but not in Unreal.

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