-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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 compiler version 22.3 doesn't match library version 4.22.3 in cmake #12539
Comments
The protoc and cmake version numbers should be WAI. See https://protobuf.dev/news/2022-05-06/#versioning -- I believe protoc only has the shared minor version (22.3) but CMake uses the C major version number (4.22.3) Are you encountering an actual error when using FindProtobuf? If so, what is the error? |
When I use cmake findprotobuf, I get the version 4.22.3 from 402203 in header filer common.h version dont match |
That tool is not owned by us and did not get updated when we made our versioning change. Versions "4.22.3" and "22.3" should match in a tool like this. I recommend filing a bug there. |
I meet the issue too with the version 4.22.3. I switch to protoc(3.21.12), and this issue does not arises. It's nessary to check why this issue arises。 |
I'm still running into this with Protobuf 4.24.3, i.e. "Protobuf compiler version 24.3 doesn't match library version 4.24.3" in CLIon, which uses CMake 3.26.4. Is there a workaround or do I have to wait for 3.27? protoc --version shows libprotoc 24.3 |
also seeing this issue when importing into cmake after a fresh build from source of v26.1. I am also not able to specify build steps:
cmake command to import:
warning when running cmake:
|
Have you solved this problem? |
Yes changing the find package line to the below solves the issue for me: find_package(Protobuf CONFIG REQUIRED) |
What version of protobuf and what language are you using?
Version: release v22.3
Language: C++
What operating system (Linux, Windows, ...) and version?
Ubuntu22.04
What runtime / compiler are you using (e.g., python version or gcc version)
gcc
What did you do?
Steps to reproduce the behavior:
What did you expect to see
cmake FindProtobuf work well.
maybe protoc --version is 4.22.3 is great.
What did you see instead?
When I use protoc --verision , answer is 22.3
but the version in common.h that cmake will use is 4.22.3
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
The text was updated successfully, but these errors were encountered: