Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Java wrappers for dnn module - missing protobuf headers?

Dear OpenCV team, need your help.

I'm trying to generate java wrappers for dnn module. I was able to overcome some of the issues but this one is really cumbersome. I get the following exception during compilation of java wrappers:

 In file included from /opencv/build/modules/java/gen/dnn.cpp:17:
/opencv_contrib/modules/dnn/misc/tensorflow/attr_value.pb.h:9:10: fatal error: 'google/protobuf/stubs/common.h' file not found
#include <google/protobuf/stubs/common.h>

It seems like the issue is somehow related to 3rdparty protobuf library, which is building from sources along with OpenCV (BUILD_PROTOBUF=ON). I can find the missing header in the folder /opencv/build/3rdparty/protobuf/protobuf-3.1.0/src/google/protobuf/stubs/common.h but this path seems to be non-visible for the compiler.

Please kindly advise what would be the correct approach to fix this problem.