On Tue, Sep 16, 2025 at 10:23:23PM +0300, Adrian Bunk wrote: > Source: protobuf > Version: 3.21.12-11 > Severity: serious > Tags: ftbfs forky sid patch > > https://buildd.debian.org/status/logs.php?pkg=protobuf&ver=3.21.12-12 > > ... > google/protobuf/generated_message_tctable_lite.cc: In static member function > 'static const char* > google::protobuf::internal::TcParser::MpString(google::protobuf::MessageLite*, > const char*, google::protobuf::internal::ParseContext*, const > google::protobuf::internal::TcParseTableBase*, uint64_t, > google::protobuf::internal::TcFieldData)': > google/protobuf/generated_message_tctable_lite.cc:1666:46: error: cannot > tail-call: target is not able to optimize the call into a sibling call > 1666 | PROTOBUF_MUSTTAIL return MpRepeatedString(PROTOBUF_TC_PARAM_PASS); > | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ > ... > > > musttail support is new in gcc 15: > https://gcc.gnu.org/gcc-15/changes.html > > The attached patch restores the gcc 14 status quo of not using musttail. >...
Even better might be the patch attached now, which backports the upstream fix from https://github.com/protocolbuffers/protobuf/commit/719f3037032b2e952afe7fc49152cc4be38fa7a3 cu Adrian
>From 2ca7d67a789dcb1a826e9e75c1f505b077d63435 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot <[email protected]> Date: Wed, 25 Jun 2025 10:56:33 -0700 Subject: Change PROTOBUF_MUSTTAIL to affirmatively use the musttail annotation only on our primary target platforms where we know it does what we want. This should effectively be the same net result as the prior ifdef in practice, but leaves it disabled by default for the long tail of more exotic platforms where this may cause a build break. Fixes #22367 PiperOrigin-RevId: 775757737 --- src/google/protobuf/port_def.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 6c6aa1834..b78eb321a 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -254,10 +254,8 @@ #ifdef PROTOBUF_TAILCALL #error PROTOBUF_TAILCALL was previously defined #endif -#if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ - !defined(_ARCH_PPC) && !defined(__wasm__) && \ - !(defined(_MSC_VER) && defined(_M_IX86)) && \ - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) +#if __has_cpp_attribute(clang::musttail) && (defined(__aarch64__) || \ + defined(__x86_64__) || defined(_M_X64)) # ifndef PROTO2_OPENSOURCE // Compilation fails on ARM32: b/195943306 // Compilation fails on powerpc64le: b/187985113 -- 2.30.2

