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
error: no match for 'operator[]' (operand types are 'const google::protobuf::RepeatedField<long int>' and 'int') #18110
Comments
I reproduced the issue on Ubuntu 18.04 with protoc for official repository. |
Forgot to mention this but the same configuration works on Ubuntu 20.04 which has protoc 3.6.1. Installed 3.6.1 on 18.04 but the build still failed. |
@asmorkalov thanks for the confirm, do you have a fix? |
@abagali1 Not yet. |
Please provide information about used protobuf version.
This code should handle that:
This part has been refactored by #16985 (released with 3.4.11 / 4.4.0): |
I am packaging within docker containers and made sure I only had 1 version present at a time. I believe the 18.04 default is 3.0.0, but I also tried with 3.5.1, 3.6.1, and 3.10.0 |
How would I go about changing this in my build? Should I build the lastest protobuf and install it from source? While changing protobuf versions I encountered errors similar to those in opencv/opencv_contrib#2408 |
OpenCV uses protobuf 3.5.x.
At first, check which version of this file do you have.
OpenCV already has builtin protobuf sources with extra patches. Just remove extra "protobuf" related CMake options. |
Ok thank you, I will try again with protobuf 3.5.x and follow up.
Do you see any such flags in my issue description? |
Installation of protobuf 3.5.1 fixes this, maybe error in the original install process. Install steps
Thanks for all your help, closing. |
System information (version)
Detailed description
I was packaging OpenCV 4.3.0 for debian using the source here but when compiling I get this error
Reproduced this error using the OpenCV 4.3 Release using the same build flags. I have exhausted multiple different versions of
protoc
(default 3.0.0, 3.5.1, 3.10.0) and I tried settingDBUILD_PROTOC=ON
which also fails with a separate error (no file "sys/videoio.h"
).CMake Flags:
CMakeOutput.log
CMakeError.log
The text was updated successfully, but these errors were encountered: