1,105,585 Community Members

Installing OpenCv Error

Member Avatar
singularity~
Junior Poster in Training
51 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I am installing OpenCv using these steps:

Building OpenCV from Source Using CMake, Using the Command Line
Create a temporary directory, which we denote as <cmake_binary_dir>, where you want to put the generated Makefiles, project files as well the object files and output binaries.

Enter the <cmake_binary_dir> and type

cmake [<some optional parameters>] <path to the OpenCV source directory>
For example

cd ~/opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
Enter the created temporary directory (<cmake_binary_dir>) and proceed with:

make **<--- Errors here**
sudo make install

**

Once I type "make" I get this error:

**

[ 87%] Build Java tests
Buildfile: /home/svenson/CSci591/OpenCV-2.4.4/release/modules/java/test/.build/build.xml

build:

compile:
    [javac] Compiling 104 source files to /home/svenson/CSci591/OpenCV-2.4.4/release/modules/java/test/.build/build/classes

BUILD FAILED
/home/svenson/CSci591/OpenCV-2.4.4/release/modules/java/test/.build/build.xml:55: The following error occurred while executing this line:
/home/svenson/CSci591/OpenCV-2.4.4/release/modules/java/test/.build/build.xml:19: /home/svenson/CSci591/OpenCV-2.4.4/release/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

I am stuck. Please help.

Member Avatar
rubberman
Senior Poster
3,999 posts since Mar 2010
Reputation Points: 513 [?]
Q&As Helped to Solve: 501 [?]
Skill Endorsements: 87 [?]
 
0
 

You need to create this file: /home/svenson/CSci591/OpenCV-2.4.4/release/modules/java/test/.build/lib
The configuration and make tools should have created it, but see what happens when you create it yourself, then try make again.

Member Avatar
singularity~
Junior Poster in Training
51 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Okay I created that directory. Now I get a compilation error.

BUILD FAILED
/home/svenson/CSci591/OpenCV-2.4.4/release/modules/java/test/.build/build.xml:55: The following error occurred while executing this line:
/home/svenson/CSci591/OpenCV-2.4.4/release/modules/java/test/.build/build.xml:19: Compile failed; see the compiler error output for details.

Total time: 1 second
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
gregab
Newbie Poster
1 post since Feb 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
Unverified Member
 
0
 

I'm encountering this same error. After creating that directory, the error make spits out is that for some reason the java tests can't find junit:

[javac] /Users/greg/Downloads/OpenCV-2.4.4/build/modules/java/test/.build/src/org/opencv/test/OpenCVTestCase.java:16: package junit.framework does not exist

I've tried downloading junit and adding it to my classpath to no avail. I've also looked for a cmake flag to skip building the java tests, but I can't find one. It seems like the answer may be altering the build.xml file in someway, but I know nearly nothing about java build schemes, so I don't really know where to start.

Member Avatar
deniscass
Newbie Poster
1 post since Feb 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi Guys, i get same issue here. But i can resolv this, downloading and copying junit latest version jar in OpenCV-2.4.4/build/modules/java/test/.build/lib and OpenCV-2.4.4/build/modules/java/lib. Works fine and now i can use java to work in my project!

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: