I am trying to build OpenCV from source on Ubuntu to within a Java application, but when during processing make commanded, when it reaches to generate Java bindings it fails with the following error:
[ 90%] Generate files for Java bindings Traceback (most recent call last): File "/home/adil/Desktop/opencv/opencv/modules/java/generator/../generator/gen_java.py", line 1093, in copy_java_files(java_files_dir, target_path) File "/home/adil/Desktop/opencv/opencv/modules/java/generator/../generator/gen_java.py", line 1042, in copy_java_files package_path = 'org/opencv/' + module NameError: global name 'module' is not defined modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/build.make:430: recipe for target 'CMakeFiles/dephelper/gen_opencv_java_source' failed make[2]: * [CMakeFiles/dephelper/gen_opencv_java_source] Error 1 CMakeFiles/Makefile2:2799: recipe for target 'modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/all' failed make[1]: * [modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: * [all] Error 2
I have installed every possible lib suggested on the Google and OpenCV website, nothing was solved the problem.
So what causes this error, and how solve?
Note: I have Java-9 installed on my machine.