cannot find opencv automatically by cmake modules (Bug #4341)


Added by An Tran almost 10 years ago. Updated over 9 years ago.


Status:Cancelled Start date:2015-05-15
Priority:Normal Due date:
Assignee:Maksim Shabunin % Done:

10%

Category:build/install
Target version:-
Affected version:branch '2.4' (2.4-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

Hi,
https://github.com/gnebehay/STRUCK
I downloaded this above code and try to compile with opencv 2.4.11. Its CMakeLists.txt need to find OpenCV automatically via cmake modules. However, it failed to find due to some errors. It happened to me many times. The error report is in the following:

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:120 (message):
The imported target "opencv_java" references the file

"/usr/local/share/OpenCV/java/libopencv_java2411.so"
but this file does not exist.  Possible reasons include:
  • The file was deleted, renamed, or moved to another location.
  • An install or uninstall procedure did not complete successfully.
  • The installation package was faulty and contained

    "/usr/local/share/OpenCV/OpenCVModules.cmake"

but not all the files it references.

Call Stack (most recent call first):
/usr/local/share/OpenCV/OpenCVConfig.cmake:71 (include)
CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/beahacker/Desktop/workspace/Tracking/STRUCK/build/CMakeFiles/CMakeOutput.log".


History

Updated by Maksim Shabunin almost 10 years ago

It seems not to be OpenCV issue.

Please, make sure you have installed libopencv_java libraries. Probably the following construction should be used to import only needed OpenCV libraries via cmake:

find_package(OpenCV REQUIRED core videoio)
(for core and videoio).

  • Status changed from New to Cancelled
  • Assignee set to Maksim Shabunin
  • Category set to build/install
  • Difficulty deleted (Hard)

Updated by An Tran over 9 years ago

Maksim Shabunin wrote:

It seems not to be OpenCV issue.

Please, make sure you have installed libopencv_java libraries. Probably the following construction should be used to import only needed OpenCV libraries via cmake: [...] (for core and videoio).

I thought libopencv_java is in OpenCV libraries.

Also available in: Atom PDF