-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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 produces non-compilable C++ code in simple case #7137
Comments
Possible duplicate of #7107 |
The problem (for me) seems to lie in a bad version of libprotobuf that is installed by The version of libprotobuf used is the one I installed by using
Next, if I
I don't know to whom I should reach out in order to fix the |
My guess is the protoc you used to compile temp5.proto into was built from the master branch, but libprotobuf uses 3.11.2 which is currently behind the master branch. Can you try using a protoc built from the 3.11.x branch to compile temp5.proto? |
The 3.11.x branch seems to successfully compile temp5.proto also, unless I've made a silly mistake... I performed this fresh install...
Then followed the
Hmmm.... there's something I'm missing here. The master branch uses
but |
Duplicate #7103 We used same sample proto code to generate the same error. Only difference seems to be #7103 rolled back to last working version of libprotobuf (3.9.2). Here, the most recent version of current version (?) (3.11.2) on the master branch of git repo was used to get correct response. Seems odd that other released versions of 3.11.2 don't work. |
This issue is fixed in newest versions. Specializing ReadVarint for int32 |
What version of protobuf and what language are you using?
Version: master/v3.6.0/v3.5.0 etc.
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
I am using version 3.11.2 of protobuf with C++:
What runtime / compiler are you using (e.g., python version or gcc version)
The version of g++ I'm using is 7.4.0:
What operating system (Linux, Windows, ...) and version?
My OS is Ubuntu 18.04:
What did you do?
I created the following simple example of protobuf code:
However, when I compiled the
protobuf
code inC++
, theC++
code wouldn't compile.The code that was produced (i.e. the non-compilable code) was:
I created this sample, because I was trying to bulid Caffe. Its
make
process failed wth the same message, and this protobuf code was my attempt to recreate the error I was seeing in the simplest way possible.The text was updated successfully, but these errors were encountered: