We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,470 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Installing OpenCv Error

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.

4
Contributors
4
Replies
1 Week
Discussion Span
3 Months Ago
Last Updated
19
Views
singularity~
Light Poster
39 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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.

rubberman
Posting Maven
2,691 posts since Mar 2010
Reputation Points: 378
Solved Threads: 316
Skill Endorsements: 53

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
singularity~
Light Poster
39 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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.

gregab
Newbie Poster
1 post since Feb 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 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!

deniscass
Newbie Poster
1 post since Feb 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.1157 seconds using 2.74MB