Description of problem: We are trying to recompile libkface with OpenCV 3.0.0. It seems, that OpenCV did some changes in Alogrithm class. The CV_INIT_ALGORITHM was completely removed. More details are described in OpenCV Transition Guide. http://docs.opencv.org/master/db/dfa/tutorial_transition_guide.html Complete build log is available in copr repository. https://copr-be.cloud.fedoraproject.org/results/sergiomb/opencv/fedora-22-x86_64/libkface-15.04.0-1.fc22/build.log.gz The upstream is already tracking this bug. I have started with development of the patch, but is seems I am not able to finish it in reasonable time. It is attached in upstream bugzilla. https://bugs.kde.org/show_bug.cgi?id=349601
Maybe we need an opencv2 compat package? (But I'd rather have things ported to OpenCV 3 if possible.)
Heads up! There is a patch [1] from kungfujesus06 at KDE bugtracker [2]. I have tested it with our testing copr repository [3]. The libkface build succeeded. [1] https://bugsfiles.kde.org/attachment.cgi?id=94088 [2] https://bugs.kde.org/show_bug.cgi?id=349601 [3] http://copr.fedoraproject.org/coprs/sergiomb/opencv/monitor/
Created attachment 1064375 [details] libkface-15.04.2-opencv3.patch I created a patch in parallel with kungfujesus06 and found an additional mistake. Details are following...
https://bugzilla.redhat.com/attachment.cgi?id=1064375&action=diff#libkface-15.04.2/libkface/facedetector.cpp.opencv3_sec1 The haarcascade files are located in /usr/share/OpenCV/haarcascades, which can be seen by running: rpm -ql opencv If you have opencv version 3 installed. However the original ${OpenCV_DIR} points to the base of the OpenCV library directory. As described here: http://code.opencv.org/attachments/196/FindOpenCV.cmake Specifically /usr/lib64/OpenCV Instead, {OpenCV_SHARED} should be used which points to /usr/share/OpenCV as described here: https://github.com/Itseez/opencv/blob/master/cmake/OpenCVConfig.cmake The values of these variables can be verified after building by looking at CMake Cache.txt Additionally I changed the minimum required version to 3.0.0 because I am not sure if the changes also build for OpenCV version 2.4, this needs to be checked. https://bugzilla.redhat.com/attachment.cgi?id=1064375&action=diff#libkface-15.04.2/CMakeLists.txt.opencv3_sec1 And lastly I included face.hpp instead of face/facerec.hpp but they include each other so it's the same. https://bugzilla.redhat.com/attachment.cgi?id=1064375&action=diff#libkface-15.04.2/libkface/libopencv.h.cmake.in.opencv3_sec2 The successful build with these changes can be seen here: https://copr.fedoraproject.org/coprs/vjancik/opencv3-deps/build/109623/
Comment on attachment 1064375 [details] libkface-15.04.2-opencv3.patch Putting a review flag on an entire SIG isn't that great an idea, as nobody feels responsible. ;-) I'd say let's use this patch, can't be worse than a complete FTBFS, and it doesn't look too wrong. The only thing that worries me is the commenting out of the oldCascade workaround with no replacement.
It was the default reportee for libkface, I just left it like that. If you look at the upstream bug tracker conversation, the latest patch (with the only change being the directory of the haarcascade files) doesn't crash, but it's not certain if the face detection feature in Digikam works properly. Unless that is critical to us, I think having OpenCV 3 in Fedora outweights this error for now and we should apply the patch.
(removing the redundant CC, I'm already on kde-sig, I don't need to get the bug mail twice ;-) ) The thing is, face recognition is the one thing Digikam uses OpenCV to begin with. That said, the upstream report: https://bugs.kde.org/show_bug.cgi?id=349601#c23 actually says that it seems to be working. But he hasn't tried with OpenCV 2, so we have no comparison on whether anything regressed. In particular, the false positives may or may not be a regression.
i full agree with kevin that we just use the patch, it is always better than a complete FTBFS.
A fix for this issue was released with Digikam version 4.14.0. Could you update Libkface to the version bundled with Digikam 4.14.0 in Rawhide? Reportedly, there is information on a new compile option in the libkface README.txt file, which let's you choose between OpenCV3 and OpenCV2 for backwards compatibility.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
The supplied patch FTBFS :( http://koji.fedoraproject.org/koji/taskinfo?taskID=13767569 That said, we could consider retiring (kde4) libkface, looks like the only thing needing it anymore is kphotoalbum, and there it is an optional dependency.
updating target, summary. I'll move to retire this in f25+
Done, libkface is retired in f25+ http://pkgs.fedoraproject.org/cgit/rpms/libkface.git/commit/?id=a1a24616eca0ef986ac99b4bd58d4709fa47948c