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/TimothySteward/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/TimothySteward/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/TimothySteward/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/TimothySteward/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/TimothySteward/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?