Ask Your Question
0

[Solved] cmake/make build of opencv320 for android in Windows 10

asked 2017-05-17 04:07:23 -0600

jordiCP gravatar image

updated 2017-05-26 08:16:09 -0600

( I don't know if it is the right place to post it, so please point me in the right direction if not so.)

Has anyone succeeded to build openCV for android in Windows 10 with cmake/make in a clean manner? My goal is to generate libopencv_java3.so and the java classes.

I succeeded with the official 3.20 package, but only after some errors here and there, having to figure how to prevent the error shown, sometimes in source code, ... So it is ok since now I have it working, but in the future I will need to customize quite often the C code, and build the libs again. I would like to be able to do this process without intermediate errors.

On the other hand, I read posts of people that have been able to build it totally "clean" just following the same process than me (build opencv from trunk)

For instance, one of the errors I am getting now in the make process is (after git cloning opencv and trying with different commits)

  • C:\Develop\git\opencv_320\build4>cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\platforms\android\android.toolchain.cmake .. (this works ok)
  • C:\Develop\git\opencv_320\build4>make (always stops at about 85%, with this error)

....
[ 85%] Generating jni/photo.cpp
[ 85%] Generating jni/video.cpp
[ 85%] Generating jni/imgcodecs.cpp
[ 85%] Generating jni/videoio.cpp
[ 86%] Generating jni/features2d.cpp
[ 86%] Generating OpenCV Android library project. SDK target: android-23
make[2]: * [build.xml] Error 2
make[1]:
[modules/java/CMakeFiles/opencv_java.dir/all] Error 2
make: *
* [all] Error 2

In short, is it possible that the success of the cmake/make process (in Windows 10) could depend on the versions of the installed tools (cmake, make, NDK, ...., and the ENV variables)? It would be of great help, in order to be able to compare and have a known starting point, to have a checklist of a "working set" of tools (cmake, make, ndk, whatever...) I mean its versions, System environment variables, and whatever can affect the build process.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-26 08:18:15 -0600

jordiCP gravatar image

Solved. I post the solution here in case someone faces the same issue.

My fault, I had installed Simplicity Studio which also had Make and ARM utilities. Even if it was at a lower position in my path, somehow it was affecting. I cleant it and worked normally as expected.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-05-17 04:07:23 -0600

Seen: 918 times

Last updated: May 26 '17