Help with build errors, 2.4.4, MacOSX Mountain Lion

asked 2013-03-03 08:51:53 -0500

Blatwurst gravatar image

updated 2013-03-03 10:16:08 -0500

I'm using the unix source package: OpenCV-2.4.4.tar.bz2

I'm using:

  • cmake version
  • GNU Make 3.81
  • i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

My first error was regarding unknown link option "-whole-archive", which doesn't seem to be recognized by ML's gcc, so I took both -whole-archive and -no-whole-archive directives out of link line in "build/modules/java/CMakeFiles/opencv_java.dir/link.txt". That let my build proceed.

Now, I get through all the module builds, including java, but then hit:

[ 85%] Build Java tests
Buildfile: /usr/dist/OpenCV-2.4.4/build/modules/java/test/.build/build.xml


    [javac] Compiling 104 source files to



The following error occurred while executing this line: /usr/dist/OpenCV-2.4.4/build/modules/java/test/.build/build.xml:19: /usr/dist/OpenCV-2.4.4/build/modules/java/test/.build/lib does not exist.

Total time: 0 seconds
make[2]: *** [modules/java/test/.build/build/jar/opencv-test.jar]

Error 1 make[1]: * [modules/java/test/CMakeFiles/opencv_test_java.dir/all] Error 2 make: * [all] Error 2

Can anyone offer any advice at getting past this? I want to use the Java bindings. Are they fully built and useable by now? Would still prefer that the whole build succeeds.

TIA for any help!


UPDATE: I figured out how to get the build working. I created the dir 'build/modules/java/test/.build/lib' and added the file junit-4.10.jar to it. That fixed it. Why didn't cmake not deal with this? (I would have posted this as an answer, but I'm not allowed to do that for 2 days and will probably forget)

edit retag flag offensive close merge delete