You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any pantry recipe that transitively links libprotobuf.so (so far observed: android-tools in #13068) fails the final ld step with hundreds of unresolved references to abseil templated functions:
ld: /opt/protobuf.dev/v35.0.0/lib/libprotobuf.so.35.0.0:
undefined reference to `absl::lts_20250127::log_internal::LogMessage::operator<<<long, …>(…)`
Both protobuf 25.x and 35.0.0 bottles show the same pattern, and the absl::lts_<DATE>:: namespace in the unresolved symbols differs from the abseil currently published by pantry's resolver. Pinning the consumer's abseil.io: ^20250127 (or even =20250127.0.0) doesn't fix it — the template instantiations in libabsl_log_internal_message.so.2501.0.0 differ even within the same LTS line.
dependencies:
# this is a bit of a hack, since they need their built version at link time# but the built version *has* to drift :/abseil.io: '*'build:
dependencies:
abseil.io: ^20250127# FIXME: how? it links to e.g. libabsl_bad_any_cast_impl.so.2308.0.0env:
linux:
# likely needs bumping to an unreleased abseil.io version# ld.lld: error: undefined reference due to --no-allow-shlib-undefined:# absl::lts_20240116::log_internal::LogMessage::operator<<<int, 0>(int const&)LDFLAGS: $LDFLAGS -Wl,--allow-shlib-undefined
In other words protobuf's own bottle is built with --allow-shlib-undefined, so its libprotobuf.so ships with unresolved abseil refs baked in. Consumers then have to either:
Statically link everything (cargo / Bazel / vcpkg do this) — defeats pantry's bottle model.
Coincidentally have the same abseil at consumer link time that protobuf was built against — the lockstep approach arch uses (upgpkg: rebuild abseil-cpp + protobuf on every abseil bump).
Suggested fixes (in increasing order of structural change)
Re-bottle protobuf against current abseil. No recipe change needed — just bump pkgrel / re-trigger CI. Buys time until next abseil drift, then re-bottle again. Matches what arch does.
Add a CI policy in pantry: when abseil's bottle changes major LTS namespace, automatically trigger rebuilds of every consumer (protobuf, grpc, etc.). This is the proper "lockstep" approach.
Bundle abseil inside libprotobuf.so. Protobuf upstream provides -Dprotobuf_ABSL_PROVIDER=module which statically links abseil into protobuf. Larger bottle but eliminates the ABI drift entirely. Used by Bazel/conan/vcpkg.
Likely affects any new C++ recipe that uses protobuf at link time. Things like envoy, grpc, opentelemetry, gnu radio etc. are all candidates.
Happy to send a PR for option 1 (re-bottle) if a maintainer says "yes" — would just need a trivial commit on projects/protobuf.dev/package.yml to bump version metadata and let CI re-run.
cc'ing nobody in particular — wanted to make this surface-visible since the FIXME is buried in a comment.
Symptom
Any pantry recipe that transitively links
libprotobuf.so(so far observed:android-toolsin #13068) fails the finalldstep with hundreds of unresolved references to abseil templated functions:Both protobuf 25.x and 35.0.0 bottles show the same pattern, and the
absl::lts_<DATE>::namespace in the unresolved symbols differs from the abseil currently published by pantry's resolver. Pinning the consumer'sabseil.io: ^20250127(or even=20250127.0.0) doesn't fix it — the template instantiations inlibabsl_log_internal_message.so.2501.0.0differ even within the same LTS line.Root cause
projects/protobuf.dev/package.ymlacknowledges this directly with aFIXMEand a build-time workaround:In other words protobuf's own bottle is built with
--allow-shlib-undefined, so itslibprotobuf.soships with unresolved abseil refs baked in. Consumers then have to either:-Wl,--allow-shlib-undefined(my current workaround on new(android-tools): standalone adb / fastboot / mkbootimg #13068) — fragile, the binary may still fail to load at runtime depending on what abseil is in RUNPATH.upgpkg: rebuild abseil-cpp + protobufon every abseil bump).Suggested fixes (in increasing order of structural change)
pkgrel/ re-trigger CI. Buys time until next abseil drift, then re-bottle again. Matches what arch does.-Dprotobuf_ABSL_PROVIDER=modulewhich statically links abseil into protobuf. Larger bottle but eliminates the ABI drift entirely. Used by Bazel/conan/vcpkg.Where this surfaces in practice
adb/fastbootlink bombs on these symbols. Workaround pushed to that PR's branch; not a real fix.Happy to send a PR for option 1 (re-bottle) if a maintainer says "yes" — would just need a trivial commit on
projects/protobuf.dev/package.ymlto bump version metadata and let CI re-run.cc'ing nobody in particular — wanted to make this surface-visible since the FIXME is buried in a comment.
🤖 Surfaced while working on #13068.