Ask Your Question
1

OpenCV 2.4.5 failed to build android-x86 version with ubuntu.

asked 2013-06-07 01:47:56 -0600

Kevin.G gravatar image

updated 2013-06-07 01:49:46 -0600

All, I failed to build OpenCV 2.4.5 for android-x86 version on Ubuntu. The error is:


[ 10%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/cpu-features/cpu-features.c.o
[ 10%] [ 10%] Built target opencv_highgui_pch_dephelp
Built target opencv_test_core_pch_dephelp
[ 10%] Built target opencv_imgproc_pch_dephelp
/home/b679/codes/opencv/3rdparty/libwebp/cpu-features/cpu-features.c:61:34: fatal error: machine/cpu-features.h: No such file or directory
compilation terminated.
make[2]: *** [3rdparty/libwebp/CMakeFiles/libwebp.dir/cpu-features/cpu-features.c.o] Error 1
make[1]: *** [3rdparty/libwebp/CMakeFiles/libwebp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

But, I could passed the build with 2.4.5 for arm version. My android NDK version is r8d. From NDK's include, there is cpu-features.c for arm, but not for x86.

Also, I checked file "3rdparty/libwebp/cpu-features/cpu-features.c" I found:


 60 #ifdef __arm__
 61 #include <machine cpu-features.h="">
 62 #endif

I don't know why the macro __arm__ take effect. Anyone who know the reason? Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-06-14 09:51:03 -0600

Andrey Pavlenko gravatar image

webp was added into the master branch while 2.4.5 release is made from 2.4 one. I suggest you use 2.4 branch or even 2.4.5 tag, not master.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-06-07 01:47:56 -0600

Seen: 1,238 times

Last updated: Jun 14 '13