Hitting OpenCV error when running cmake on ready's CMakeLists

2,597 views
Skip to first unread message

kgmcn...@gmail.com

unread,
Apr 9, 2014, 3:57:33 AM4/9/14
to reaction-...@googlegroups.com
Hi,

I'm new to the group here! I'm trying to get ready compiled so I can experiment with Dan's Houdini plugin but I'm hitting an error and I'm hoping you guys might be able to help.

Error when trying 'sudo cmake CMakeLists.txt' in my ready directory:

CMake Error at TuringSpots/CMakeLists.txt:3 (FIND_PACKAGE):
  By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCV", but
  CMake did not find one.
  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:
    OpenCVConfig.cmake
    opencv-config.cmake
  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.

I have downloaded and compiled OpenCV 2.4.7 and added the following line to the CMakeLists.txt (pointing to where OpenCVConfig.cmake can be found):

set( OpenCV_DIR /home/kevin/opencv-2.4.7/cmake )

However, this does not fix the problem. Any ideas?

Thanks!
Kevin

Dan Wills

unread,
Apr 9, 2014, 10:01:31 AM4/9/14
to reaction-...@googlegroups.com
G'day Kevin,
I think you might be running the cmake from the wrong location. I was running it in the 'Ready' subdirectory of the checkout, under there there isn't even any TuringSpots (mentioned in the error).

I also checked a little about openCV and I have version 2.3.1 of the package installed through portage. In other words; I never had to build it myself. Hopefully you'll also be able to just install a package for it that is compatible with linux-mint (ie using dpkg/apt-get).

I hope that helps a little, it'll be great if someone else can build the plugin too!
Dan


--
You received this message because you are subscribed to the Google Groups "reaction-diffusion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reaction-diffus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kgmcn...@gmail.com

unread,
Apr 11, 2014, 1:41:28 AM4/11/14
to reaction-...@googlegroups.com
Ah, ok, my bad then. Then when I tried to cmake from the 'Ready' folder I got:

"VTK not found.  Set the VTK_DIR cmake cache entry to the directory containing VTKConfig.cmake."

So I set the VTK_DIR to "/usr/share/cmake-2.8/Modules". However, that didn't work because my files in that directory were named UseVTK40.cmake, UseVTKConfig40.cmake, and UseVTKBuildSettings40.cmake (all with 40 on the end). So I made copies of the three files and named them without the 40. Now I get this error:

CMake Error at /usr/share/cmake-2.8/Modules/UseVTKConfig40.cmake:34 (load_cache):
  load_cache Cannot load cache file from
  /usr/share/cmake-2.8/Modules/CMakeCache.txt
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindVTK.cmake:65 (include)
  CMakeLists.txt:237 (find_package)

I feel like I might be running off the rails a bit. Ideas?


CMake Error at CMakeLists.txt:260 (MESSAGE):
  You need to have VTK_USE_X

Dan Wills

unread,
Apr 16, 2014, 10:10:06 AM4/16/14
to reaction-...@googlegroups.com
Hmm.. I'm not sure what's up there Kevin.. a quick check revealed that I don't have a VTK_USE_X defined either (line 260) but that's probably a red herring anyway.. as I /think/ cmake will be using "find_package( VTK )" to get that info (not sure tho). On my gentoo I reckon I was able to install the vtk package and after that, it was found by cmake. Perhaps if you have built (and installed?) vtk yourself, then it might be worth trying a 'dev' (ie headers supplied) mint vtk package, if there is one. Hopefully that would install itself in such a way that it can get into the cmake.

Also, if it helps, this is what the path for that VTK_DIR variable ended up looking like in my CMakeCache.txt file:
VTK_DIR:PATH=/usr/lib64/vtk-5.10

Best of luck,
Dan


Reply all
Reply to author
Forward
0 new messages