Ask Your Question
1

Installing JavaCV on OS X 10.9.1

asked 2014-01-02 17:26:11 -0600

tstew gravatar image

updated 2014-01-03 03:00:38 -0600

jensenb gravatar image

I am trying to install JavaCV on OS X 10.9.1. It says I need OpenCV 2.6.4.x, so downloaded OpenCV 2.6.4.1 and tried to compile and install using these instructions. When I run the command make -j8. I get an error at 61%:

[ 61%] Building CXX object modules/legacy/CMakeFiles/opencv_legacy.dir/src/enmin.cpp.o
/Users/TimothySteward/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:164:19: error: multiple unsequenced modifications to 'temp3' [-Werror,-Wunsequenced]
            if( ( CV_IMAX3( srcdata1[j-3], srcdata1[j-2], srcdata1[j-1] ) -
                  ^
/Users/user/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:79:33: note: expanded from macro 'CV_IMAX3'
#define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c)))
                                ^
/Users/user/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:169:19: error: multiple unsequenced modifications to 'temp3' [-Werror,-Wunsequenced]
            if( ( CV_IMAX3( srcdata2[j+3], srcdata2[j+2], srcdata2[j+1] ) -
                  ^
/Users/user/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:79:33: note: expanded from macro 'CV_IMAX3'
#define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c)))
                                ^
/Users/user/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:322:19: error: multiple unsequenced modifications to 'temp3' [-Werror,-Wunsequenced]
            if( ( CV_IMAX3( src1[(y-1)*widthStep+x], src1[y*widthStep+x],
                  ^
/Users/user/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:79:33: note: expanded from macro 'CV_IMAX3'
#define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c)))
                                ^
3 errors generated.
make[2]: *** [modules/legacy/CMakeFiles/opencv_legacy.dir/src/dpstereo.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 61%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/stereo_csbp.cpp.o
Linking CXX shared library ../../lib/libopencv_contrib.dylib
[ 61%] Built target opencv_contrib
[ 61%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/stereobm.cpp.o
[ 61%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/stereobp.cpp.o
[ 61%] [ 61%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/tvl1flow.cpp.o
Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/kernels.cpp.o
make[1]: *** [modules/legacy/CMakeFiles/opencv_legacy.dir/all] Error 2
Linking CXX shared library ../../lib/libopencv_ocl.dylib
[ 61%] Built target opencv_ocl
make: *** [all] Error 2

What is wrong? Is there a workaround?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-03 02:59:07 -0600

jensenb gravatar image

I see two potential solutions here. The first and simplest is to disable the legacy module by turning off "BUILD_opencv_legacy" in the CMake GUI and then rebuilding.

The second option would be to use a newer version of OpenCV. OpenCV 2.4.7.2 for example doesn't have the errors you posted. I don't know if this is supported by JavaCV though.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-02 17:26:11 -0600

Seen: 995 times

Last updated: Jan 03 '14