Skip to content

prost-build occasionally fails to compile protobuf C++ #653

@benesch

Description

@benesch

In v0.10, we're seeing prost-build occasionally fail to compile protobuf from source. We've now seen this in two projects with entirely different build systems (MaterializeInc/materialize and our internal cloud codebase), which makes me think it's not a bug in our build system. The only commonality is in that in both cases we're compiling inside of Docker. Here's two representative examples:

I have a few separate thoughts here!

  • Is CMake even supported for building protobuf on Unix machines? The docs seem to suggest that the CMake build system exists to support compilation on Windows.
  • In our protobuf-src crate, we use the autotools build system instead, because it seems to be the officially supported way to compile protobuf on Unix. That was stable in CI for us for several months, when we'd forked prost to use protobuf-src.
  • If you don't want to switch to the autotools system, is there some way to turn off compilation of the unit tests? That's what seems to fail most readily.
  • It'd be great to eventually have prost-build use protobuf-src rather than managing its own protoc compilation. That way projects that use protoc outside of prost only need to compile protobuf from source once. We'd be happy to transfer ownership of protobuf-src to Tokio if that's a supply chain concern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions