Ask Your Question

Blatwurst's profile - activity

2013-03-03 08:54:35 -0600 received badge  Editor (source)
2013-03-03 08:51:53 -0600 asked a question Help with build errors, 2.4.4, MacOSX Mountain Lion

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

I'm using:

  • cmake version 2.8.10.1
  • 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

build:

compile:
    [javac] Compiling 104 source files to

/usr/dist/OpenCV-2.4.4/build/modules/java/test/.build/build/classes

BUILD FAILED
/usr/dist/OpenCV-2.4.4/build/modules/java/test/.build/build.xml:55:

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!

Blat

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)