Ask Your Question

Revision history [back]

Problem with compile opencv with cmake and mingw for android with x86, mips , … architectures

0

I'm compiling OpenCV for using in android with core module because app size increasing but compiling is successful just in armeabi-v7a architecture.

All of the other architectures like x86, MIPS, arm64-v8a, etc gives some different errors. my ndk is r16b and i tested r18b and r14b but not work.

Error in x86 architecture: ANDROID_ABI=x86

[ 49%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Half/half.cpp.o
[ 49%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Iex/IexBaseExc.cpp.o
[ 49%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Iex/IexThrowErrnoExc.cpp.o
[ 49%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/ImfAcesFile.cpp.o
In file included from G:\android-data\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include/random:50:0,
                 from G:\android-data\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include/bits/stl_algo.h:66,
                 from G:\android-data\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include/algorithm:62,
                 from G:\opencv-4.0.1\3rdparty\openexr\IlmImf\ImfAcesFile.cpp:45:
G:\android-data\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\x86\include/bits/opt_random.h:33:23: fatal error: x86intrin.h: No such file or directory
 #include <x86intrin.h>
                       ^
compilation terminated.
3rdparty\openexr\CMakeFiles\IlmImf.dir\build.make:100: recipe for target '3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/ImfAcesFile.cpp.o' failed
mingw32-make.exe[2]: *** [3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/ImfAcesFile.cpp.o] Error 1
CMakeFiles\Makefile2:460: recipe for target '3rdparty/openexr/CMakeFiles/IlmImf.dir/all' failed
mingw32-make.exe[1]: *** [3rdparty/openexr/CMakeFiles/IlmImf.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2