Upgrade Protobuf to v33.6 - #29906
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Can you bump it in Java too? Or should I make a separate PR for that? The equivalent Java version is https://central.sonatype.com/artifact/com.google.protobuf/protobuf-java/4.33.6, and it needs updating here and here. |
|
Copilot, please update protobuf-java to 4.33.6. Also use .agents/skills/ort-ci/SKILL.md to fix CI pipeline failures. |
Updated all protobuf-java declarations to 4.33.6 in 39a428c. CI logs show the native failures are due to the v33.6 source archive missing from the Terrapin asset cache; the required cache onboarding cannot be performed from this PR runner. |
Validated protobuf:x64-linux overlay install end to end; release and tag archive hashes and patches pass.
|
CI update:
Could EngSys/1ES cache owner mirror this exact asset?
Once the probe returns 200, the failed vcpkg checks can be rerun. |
Description
Native and vcpkg
protocarchives tov33.6.6.33.6, including v33-compatible patches and tool naming.Packaging and CI
protobuf==6.33.6.Google.Protobuf/Google.Protobuf.Tools3.33.6.Binary Size
Measured Increase
The equivalent Android minimal build changed from:
.text.bss.data.rodataThe workflow measures the sum of all ELF sections except
.relro_padding, rather than the filesystem size.Attribution
Using identical Android NDK 28, Clang/LLD 19, MinSizeRel, ThinLTO, stripping, and section-GC settings, the linker maps attribute the source-level increase as follows:
The largest contributors include:
generated_message_tctable_lite.cc.o: about +49.5 KBProtobuf 21.12 retained code from only three Abseil archives in this minimal binary. Protobuf 33.6 retained code from 33 Abseil archives, including synchronization, formatting, time zones, Cord, logging, allocation, stacktrace, and strings.
Both builds use
libprotobuf-lite.a, not full Protobuf. The linker flags are also unchanged: ThinLTO,--gc-sections, function/data sections,-Os, and stripping are all active.The threshold of andriod CI binary size increase is not hiding a configuration regression. Roughly 87% of the growth comes directly from:
The new threshold leaves only
1,170bytes of headroom (1,583,982measured versus1,585,152allowed), so it accurately reflects current size but is quite tight. Reducing the increase would require changing or patching Protobuf’s lite runtime dependencies, particularly the logging/formatting/time/synchronization chain, rather than adjusting ORT linker settings.Motivation and Context
Newer Protobuf is required for static iOS integration so dependent libraries can share ONNX Runtime's Protobuf symbols without duplicate-symbol linker conflicts.