Skip to content

Java wrappers for modules, which use protobuf, are not generated properly  #8849

@abratchik

Description

@abratchik
System information (version)
  • OpenCV => 3.2 master (fdba548)
  • Operating System / Platform => OSX El Capitain 10.11.6 (15G1421)
  • Compiler => Xcode Version 8.1 (8B62)
Detailed description

Java wrappers are not generated for dnn module. Enabling java for dnn leads to compilation errors related to the following issues:

  1. Google protobuf library headers are not visible to java cmake scripts so building dnn with java leads to errors like below:
fatal error: google/protobuf/stubs/common.h: No such file or directory
compilation terminated.

  1. Some constants are defined using cross-references to constants in other namespace, which is not interpreted properly by java generator. Example:
    CONST DataType_INT_MIN_SENTINEL_DO_NOT_USE_=::google::protobuf::kint32min

  2. CMake generates a lot of warnings when building dnn with java support. These warnings are harmless (ex non-used variable in protobuf headers) and can be skipped to ensure clean logs

Steps to reproduce
  1. Enable contrib modules
  2. Enable java wrappers generation for dnn module
  3. build opencv

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions