deps: vendor Abseil and update re2 to 2025-11-05#891
Merged
Conversation
re2 was pinned to c9cba76 (~2023-06-01), the last release before re2 migrated its codebase onto Abseil. Our in-tree build compiles re2's sources directly rather than through its own CMake, so we couldn't move past that version without providing Abseil. Vendor abseil-cpp (20250512.1, the version re2 2025-11-05 declares in its MODULE.bazel) as a submodule and build it via add_subdirectory, like the other CMake-based dependencies (rubberband, libremidi). re2 is bumped to 2025-11-05 and now links the Abseil targets listed in its own ABSL_DEPS. stringpiece.cc is dropped (removed upstream; re2::StringPiece is now an alias for absl::string_view).
When ABSL_ENABLE_INSTALL is ON (static-dependency installs), Abseil drops its absl_ prefix and registers a bare "span" target (alias absl::span), which collided with libossia's own imported "span" target and broke all OSSIA_STATIC configure runs. Rename the backing target to ossia_span and keep the span::span alias that consumers actually use.
The static matrix (OSSIA_STATIC -> OSSIA_INSTALL_STATIC_DEPENDENCIES) failed at CMake generate time: export called with target "re2" which requires target "strings" that is not in any export set. Three fixes: - re2.cmake: drop the build-tree export(EXPORT re2-exports). re2 links Abseil publicly and Abseil only ships install(EXPORT) rules, not a build-tree export(), so the build-tree export of re2 cannot be generated. Only the installed re2 export is consumed (ossiaConfig.cmake.in). - abseil.cmake: don't add the Abseil subdir with EXCLUDE_FROM_ALL when installing static dependencies - CMake skips install() rules of such subdirs, so Abseil's libs/headers/config were never installed, leaving the installed re2 export dangling. - ossiaConfig.cmake.in: find_dependency(absl) before including the re2 export so downstream static consumers resolve absl::*.
Abseil's CMakeLists overrides CMAKE_MSVC_RUNTIME_LIBRARY from its own ABSL_MSVC_STATIC_RUNTIME option (default OFF -> /MD dynamic), ignoring the runtime selected by the enclosing build. Static ossia builds (Max/PD/Python/ Unity) force the static /MT runtime, so Abseil's /MD objects fail to link: absl_*.lib(...) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' Set ABSL_MSVC_STATIC_RUNTIME to mirror CMAKE_MSVC_RUNTIME_LIBRARY so the two agree.
b069ea2 to
4f126a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
re2 was pinned to
c9cba76(~2023-06-01), the last release before re2migrated its codebase onto Abseil. Our in-tree build compiles re2's
sources directly rather than through its own CMake, so we couldn't move
past that version without providing Abseil.
This vendors abseil-cpp (
20250512.1, the version re2 2025-11-05 declares inits
MODULE.bazel) as a submodule and builds it viaadd_subdirectory, likethe other CMake-based dependencies (rubberband, libremidi). re2 is bumped to
2025-11-05and now links the Abseil targets listed in its ownABSL_DEPS.stringpiece.ccis dropped (removed upstream;re2::StringPieceis now analias for
absl::string_view).Changes
3rdparty/abseil-cpp@76bb24329(20250512.1)3rdparty/re2bumpedc9cba76→927f5d53(2025-11-05)cmake/deps/abseil.cmake: build Abseil in-tree (or find systemabsl),headers treated as system, install/export gated on
OSSIA_INSTALL_STATIC_DEPENDENCIEScmake/deps/re2.cmake: link the Abseil targets, dropstringpiece.cccmake/OssiaDeps.cmake/.gitmodules: register the new submoduleGenerated by Claude Code