Bug #598

OpenCV build fails with compiler error, because incompatible protoc is used

Added by Robert Haschke 2 months ago.

Status:NewStart date:2021-07-12
Priority:HighDue date:
Assignee:Thorben Markmann% Done:


Category:RecipeSpent time:-
Target version:-


Recently Thorben Markmann changed cmake options for opencv-plus-contrib-cuda to BUILD_PROTOBUF=OFF.
This requires an external, up-to-date protobuf compiler (OpenCV uses protoc 3.5.2 internally by default otherwise).

However, Ubuntu 18.04 ships with 3.0.0 only. Hence, with that option enabled, I get the following compiler error:
error: no match for ‘operator[]’ (operand types are ‘const google::protobuf::RepeatedField<long int>’ and ‘int’)

Probably, Thorben, you use your own (newer) version of protoc.
If so, please configure the cmake option locally for your distro instead of breaking all other existing distros.

Also available in: Atom PDF