Hi.
I'm trying to build opencv from sources (https://github.com/opencv/opencv > master) with opencv_contrib which I locally cloned. I've prior installed protobuf 3.6.1 (https://github.com/protocolbuffers/protobuf) and caffe (https://github.com/BVLC/caffe) the same way.
But I've got many thousands (!!) of errors like:
/opt/opencv/modules/dnn/misc/caffe/opencv-caffe.pb.cc:33983:30: error: ‘GOOGLE_PREDICT_TRUE’ was not declared in this scope
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
ending in:
modules/dnn/CMakeFiles/opencv_dnn.dir/build.make:91: recipe for target 'modules/dnn/CMakeFiles/opencv_dnn.dir/misc/caffe/opencv-caffe.pb.cc.o' failed
make[2]: *** [modules/dnn/CMakeFiles/opencv_dnn.dir/misc/caffe/opencv-caffe.pb.cc.o] Error 1
CMakeFiles/Makefile2:3756: recipe for target 'modules/dnn/CMakeFiles/opencv_dnn.dir/all' failed
make[1]: *** [modules/dnn/CMakeFiles/opencv_dnn.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
So, I wonder how to install opencv (from master branch) with the latest version of protobuf (3.6.1) as well?
Note that I set the Build_Protobuf option to Off during configuration with cmake and make the protobuf libraries pointing directly to the freshly installed ones in /usr/local/.
I also compiled caffe using protobuf 3.6.1 and everything went fine there.
Thanks.