Version: 2.0.0 (using KDE 4.5.95)
Since a few days the opencv-check does not work anymore althought it did before.
-- Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path
CMake Error at extra/libkface/cmake/modules_opencv/FindOpenCV.cmake:237
OpenCV required but some headers or libs not found. Please specify it's
location with OpenCV_ROOT_DIR env. variable.
Call Stack (most recent call first):
The reason is that on some distros there were issues finding opncv.
"A short notice about OpenCV: Apparently, there are two versions of
FindOpenCV.cmake in the wild. If the one shipped with this software
does not find your OpenCV installation, specify
-DKFACE_EXTERNAL_FINDOPENCV:BOOL=TRUE as an argument to cmake to use
the FindOpenCV.cmake which is installed on your system."
The question is why the finding had to be broken for those distros that got it right and where it did work before.
The result is that using scripts like the cmakekde one from techbase (which compiles more than one module at a time) is no longer possible with digikam2 because it now requires some extra options which is completely unnecessary for most distros.
Expected behaviour: force only those distros to add some extra where it did not work before.
Does somebody know which commit broke this? It would be helpful to revert it and find a better solution.
This one, from Michael (he is copy) :
that commit is from november 2010. however it only started to fail building one or two weeks ago.
actually the commit in question should be this one:
Of course, we can change the behavior to first try the distro-provided FindOpenCV, and if that does not work, use the internally provided one.
A fallback in case nothing was found makes more sense IMHO.
Sven, which distribution and version are you on? Everyone else who is listening and also has to specify -DKFACE_EXTERNAL_FINDOPENCV:BOOL=TRUE please let me know your distribution and its version.
When the compiling broke I was on openSUSE 11.3 and KDE 4.5. Compiling worked perfectly regarding opncv before the change.
In the meantime I updated to KDE 4.6.
The autoamtic packaging on opensuse's buildserver also failed because of this change.
Why not use the old way and simply fall back to the new one if it returns an empty path? Why did that working system have to be broken and not just a fallback added?
Thanks for the info. I'll try to implement a fallback mechanism.
SVN commit 1217507 by mghansen:
Implement a fallback mechanism for OpenCV detection: If FIND_PACKAGE(OpenCV) can not find OpenCV, try to find it again using another version of FindOpenCV.cmake which is shipped with libkface and can still find OpenCV on some systems.
Tested under debian sid:
Normal installation of OpenCV via apt-get: OpenCV is found at the first try.
Remove /usr/share/opencv/OpenCVConfig.cmake: First try fails, but the FindOpenCV.cmake shipped with libkface still finds OpenCV at the second try.
If no OpenCV is installed at all, CMake stops after the second attempt, as it should be.
M +0 -7 CMakeLists.txt
M +4 -8 README
M +19 -6 extra/libkface/CMakeLists.txt
WebSVN link: http://websvn.kde.org/?view=rev&revision=1217507
Seems to work on openSUSE 11.3 as well. Thanks a lot!
Good to hear ;-) IIRC the FindOpenCV.cmake that we ship was mostly required under Windows, so maybe somebody could give it a try there, too?
Tested under windows. all work fine.
While testing OpenCV against beta6 I discovered a bug in the OpenCV cmake build files that will is now fixed in the 2.3 branch of OpenCV and the trunk:
Maybe that will improve finding OpenCV in the future.