Conversation
cmake/CheckTrezor.cmake gated the absl::string_view overload of
get_message_wire_number() behind a Protobuf_VERSION VERSION_GREATER_EQUAL
22.0 check. Protobuf_VERSION (as CMake's FindProtobuf.cmake parses it from
`protoc --version`) now reports a decoupled generator-version axis
("libprotoc 7.35.1") rather than the library release version ("35.1"),
so the check silently failed against protobuf-35.1 even though this
protobuf's Descriptor::name() unconditionally returns absl::string_view.
Every device_trezor call site passing a .name() result to
get_message_wire_number() then failed with "no matching function".
Patch replaces the version-number comparison with a compile-time probe of
the actual API surface, so detection stays correct regardless of how
protobuf numbers future releases.
Verified: extracted the failing build's compiler invocations, confirmed
Protobuf_VERSION resolved to 7.35.1 in CMakeCache.txt, live-tested the
patched CheckTrezor.cmake inside the xbps-src chroot (all 3 previously
failing objects compile clean), then a full clean ./xbps-src pkg monero
build succeeds end-to-end.
monero-gui vendors its own internal copy of the monero core (see post_extract() in the template), including the same cmake/CheckTrezor.cmake affected by the protobuf abseil-detection bug fixed in monero (commit 32fcd13) -- same root cause, same fix, applied to the vendored copy's path (monero/cmake/CheckTrezor.cmake). Verified with a full clean ./xbps-src pkg monero-gui build, then confirmed on the real host: reinstalled both monero and monero-gui against the upgraded libprotobuf-35.1_1 (previously blocked -- xbps refused to upgrade libprotobuf while installed monero/monero-gui still required libprotobuf.so.25.2.0), verified both binaries link against libprotobuf.so.35.1.0 and run correctly.
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.
Both packages fail to build against current protobuf (35.1) with:
Root cause
cmake/CheckTrezor.cmakegates monero's ownabsl::string_viewoverload ofget_message_wire_number()— which exists precisely to handle protobuf'sDescriptor::name()now returningabsl::string_view— behindProtobuf_VERSION VERSION_GREATER_EQUAL 22.0.Protobuf_VERSION, as CMake's bundledFindProtobuf.cmakeparses it fromprotoc --version, now reports a decoupled generator-version axis (libprotoc 7.35.1) distinct from the library release version (35.1). SoProtobuf_VERSIONbecomes7.35.1, and7 < 22silently fails the check — even though this protobuf'sDescriptor::name()unconditionally returnsabsl::string_view.Fix
Replace the version-number comparison with a
check_cxx_source_compilesprobe of the actual API surface, so detection stays correct regardless of how protobuf numbers future releases.monero-guivendors its own internal copy of the monero core (post_extract()), including the samecmake/CheckTrezor.cmake— same root cause, same fix, applied to the vendored path.Verification
CMakeCache.txt, confirmedProtobuf_VERSIONresolved to7.35.1(FIND_PACKAGE_MESSAGE_DETAILS_Protobuf:INTERNAL=[...][v7.35.1()]), confirmed viacheck_cxx_source_compilesin/usr/share/cmake-4.2/Modules/FindProtobuf.cmakethat this is exactly how the module derives the version.xbps-srcchroot before writing the final patch file: all 3 previously-failing objects (messages_map.cpp.o,device_trezor_base.cpp.o,device_trezor.cpp.o) compile clean../xbps-src pkg moneroand./xbps-src pkg monero-guibuilds succeed end-to-end.libprotobufupgrade (35.1) that was previously blocked — xbps refused to touchlibprotobufwhile the installedmonero/monero-guistill requiredlibprotobuf.so.25.2.0. Confirmed both binaries now link againstlibprotobuf.so.35.1.0and run correctly (monerod --version,monero-wallet-guilinkage).Test plan
monero: full clean build succeedsmonero-gui: full clean build succeedslibprotobuf-35.1_1on a real systemlddconfirms both link againstlibprotobuf.so.35.1.0monerod --versionruns correctly