Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf v28.2 and Protoc 28.2 are incompatible #18631

Closed
ElliotDunk opened this issue Oct 5, 2024 · 0 comments
Closed

Protobuf v28.2 and Protoc 28.2 are incompatible #18631

ElliotDunk opened this issue Oct 5, 2024 · 0 comments
Labels
untriaged auto added to all issues by default when created.

Comments

@ElliotDunk
Copy link

When compiling both Protobuf v28.2 and Protoc 28.2 from source, the generated protoc files are incompatible with the runtime and will fail on compilation with error "#error "Protobuf C++ gencode is built with an incompatible version of"". The line of code that causes the error is the following - "#if PROTOBUF_VERSION != 5026001
#error "Protobuf C++ gencode is built with an incompatible version of"
#error "Protobuf C++ headers/runtime. See"
#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
#endif"

What version of protobuf and what language are you using?
Protobuf v28.2 and Protoc 28.2 with C++.

What operating system (Linux, Windows, ...) and version?
MacOS 13.6.9 with Apple Clang 15.0.0

What runtime / compiler are you using (e.g., python version or gcc version)
Apple Clang 15.0.0 and CMake 3.30.4

What did you do?
Compiling Protobuf v28.2 from source from both the git releases section and the main repository using CMake and Apple Clang.

What did you expect to see
Both the generated protoc files and protobuf runtime should be compatible and compile.

What did you see instead?
When trying to compile with generated C++ files from protoc 28.2 thats been compiled from source and the protobuf runtime v28.2 thats been compiled from source wont link and give these errors -
error: "Protobuf C++ gencode is built with an incompatible version of"
error: "Protobuf C++ headers/runtime.

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment
#if PROTOBUF_VERSION != 5026001
#error "Protobuf C++ gencode is built with an incompatible version of"
#error "Protobuf C++ headers/runtime. See"
#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
#endif

@ElliotDunk ElliotDunk added the untriaged auto added to all issues by default when created. label Oct 5, 2024
@ElliotDunk ElliotDunk closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged auto added to all issues by default when created.
Projects
None yet
Development

No branches or pull requests

1 participant