Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554490 - media-libs/libkface fails to build with >=media-libs/opencv-3
Summary: media-libs/libkface fails to build with >=media-libs/opencv-3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
: 557096 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-11 12:01 UTC by Jure Repinc
Modified: 2015-10-22 13:20 UTC (History)
32 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libkface-4.10.0-libopencv.h.patch (libkface-4.10.0-libopencv.h.patch,439 bytes, patch)
2015-07-18 12:33 UTC, Juergen Rose
Details | Diff
libkface-4.10.0.ebuild, which uses libkface-4.10.0-libopencv.h.patch (libkface-4.10.0.ebuild,737 bytes, text/plain)
2015-07-18 12:37 UTC, Juergen Rose
Details
This allows kface to build with opencv3 (kface3.patch,9.04 KB, patch)
2015-08-20 02:01 UTC, Adam Stylinski
Details | Diff
info.txt (info.txt,6.05 KB, text/plain)
2015-08-26 12:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,293.02 KB, text/plain)
2015-08-26 12:21 UTC, Toralf Förster
Details
media-libs:libkface-4.12.0:20150825-205902.log (media-libs:libkface-4.12.0:20150825-205902.log,24.54 KB, text/plain)
2015-08-26 12:21 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jure Repinc 2015-07-11 12:01:06 UTC
Recently OpenCV was updated to version 3.0.0 and this broke compiling libkface-4.10.0 which requires older version of OpenCV.
Comment 1 Juergen Rose 2015-07-11 13:52:18 UTC
'MAKEOPTS=-j1 emerge -v1 libkface' fails here with:
...
cd /var/tmp/portage/media-libs/libkface-4.10.0/work/libkface-4.10.0_build/libkface && /usr/bin/x86_64-pc-linux-gnu-g++  -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=69 -DKDE_DEFAULT_DEBUG_AREA=51005 -DKDE_DEPRECATED_WARNINGS -DMAKE_KFACE_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_SVG_LIB -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_XML_LIB -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_REENTRANT -D_XOPEN_SOURCE=500  -DQT_NO_DEBUG -DNDEBUG -march=amdfam10 -O2 -pipe  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -I/var/tmp/portage/media-libs/libkface-4.10.0/work/libkface-4.10.0_build/libkface -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/database -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/detection -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/recognition-opencv-lbph -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/alignment-congealing -I/usr/include/KDE -I/usr/include/qt4/QtXmlPatterns -isystem /usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -isystem /usr/include/qt4/QtSvg -isystem /usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtMultimedia -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -isystem /usr/include/qt4/QtDBus -I/usr/include/qt4/QtAssistant -I/usr/include/qt4/Qt3Support -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtCore -I/usr/include/qt4/Qt -isystem /usr/share/qt4/mkspecs/default -isystem /usr/include/qt4 -I/usr/include/opencv    -fexceptions -UQT_NO_EXCEPTIONS -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o CMakeFiles/kface.dir/facedetector.o -c /var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/facedetector.cpp
In file included from /var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/detection/opencvfacedetector.h:40:0,
                 from /var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/facedetector.cpp:29:
/var/tmp/portage/media-libs/libkface-4.10.0/work/libkface-4.10.0_build/libkface/libopencv.h:55:37: fatal error: opencv2/core/internal.hpp: No such file or directory
 #include <opencv2/core/internal.hpp>
Comment 2 J.O. Aho 2015-07-12 08:59:29 UTC
It seems that opencv2/core/internal.hpp was renamed to opencv2/core/private.hpp

https://github.com/Itseez/opencv/commit/517062039e2078e86babdd87c7dfd2992e029c78

Seems that the dependency has been removed in the libkface master git branch
Comment 3 Juergen Rose 2015-07-18 12:24:32 UTC
(In reply to J.O. Aho from comment #2)
> It seems that opencv2/core/internal.hpp was renamed to
> opencv2/core/private.hpp
> 
> https://github.com/Itseez/opencv/commit/
> 517062039e2078e86babdd87c7dfd2992e029c78
> 
> Seems that the dependency has been removed in the libkface master git branch

If I try to patch libkface by substituting opencv2/core/internal.hpp by opencv2/core/private.hpp in .../digikam-4.10.0/extra/libkface/libkface/libopencv.h.cmake.in, 'emerge -v1 libkface' fails with:



cd /var/tmp/portage/media-libs/libkface-4.10.0/work/libkface-4.10.0_build/libkface && /usr/bin/x86_64-pc-linux-gnu-g++  -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=69 -DKDE_DEFAULT_DEBUG_AREA=51005 -DKDE_DEPRECATED_WARNINGS -DMAKE_KFACE_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_SVG_LIB -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_XML_LIB -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_REENTRANT -D_XOPEN_SOURCE=500  -DQT_NO_DEBUG -DNDEBUG -march=amdfam10 -O2 -pipe  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -I/var/tmp/portage/media-libs/libkface-4.10.0/work/libkface-4.10.0_build/libkface -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/database -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/detection -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/recognition-opencv-lbph -I/var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/alignment-congealing -I/usr/include/KDE -I/usr/include/qt4/QtXmlPatterns -isystem /usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -isystem /usr/include/qt4/QtSvg -isystem /usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtMultimedia -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -isystem /usr/include/qt4/QtDBus -I/usr/include/qt4/QtAssistant -I/usr/include/qt4/Qt3Support -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtCore -I/usr/include/qt4/Qt -isystem /usr/share/qt4/mkspecs/default -isystem /usr/include/qt4 -I/usr/include/opencv    -fexceptions -UQT_NO_EXCEPTIONS -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o CMakeFiles/kface.dir/recognition-opencv-lbph/opencvlbphfacerecognizer.o -c /var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp
In file included from /var/tmp/portage/media-libs/libkface-4.10.0/work/libkface-4.10.0_build/libkface/libopencv.h:58:0,
                 from /var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/detection/opencvfacedetector.h:40,
                 from /var/tmp/portage/media-libs/libkface-4.10.0/work/digikam-4.10.0/extra/libkface/libkface/facedetector.cpp:29:
/usr/include/opencv2/core/private.hpp:48:4: error: #error this is a private header which should not be used from outside of the OpenCV library
 #  error this is a private header which should not be used from outside of the OpenCV library
    ^
/usr/include/opencv2/core/private.hpp:52:22: fatal error: cvconfig.h: No such file or directory
 #include "cvconfig.h"
                      ^
compilation terminated.


Any hint is apprecieated.
Comment 4 Juergen Rose 2015-07-18 12:33:53 UTC
Created attachment 407074 [details, diff]
libkface-4.10.0-libopencv.h.patch
Comment 5 Juergen Rose 2015-07-18 12:37:12 UTC
Created attachment 407076 [details]
libkface-4.10.0.ebuild, which uses libkface-4.10.0-libopencv.h.patch
Comment 6 Juergen Rose 2015-07-18 18:43:14 UTC
It looks, if there are several other files not available for opencv-3.0.0, e.g. :
opencv2/contrib/contrib.hpp
opencv2/legacy/compat.hpp

It looks, if there are header files or class definitions, respectively, in opencv-2.4.10, which are no more available in opencv-3.0.0, e.g. FaceRecognizer:


root@caiman:/usr/local/portage/net-print/cups-filters(81)# find  /home_caiman/rose/Txt/projects/OpenCV/opencv-2.4.10__include/ -type f -exec grep FaceRecognizer {} \; -print
    class CV_EXPORTS_W FaceRecognizer : public Algorithm
        virtual ~FaceRecognizer() {}
        // Trains a FaceRecognizer.
        // Updates a FaceRecognizer.
        // Gets a prediction from a FaceRecognizer.
    CV_EXPORTS_W Ptr<FaceRecognizer> createEigenFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
    CV_EXPORTS_W Ptr<FaceRecognizer> createFisherFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
    CV_EXPORTS_W Ptr<FaceRecognizer> createLBPHFaceRecognizer(int radius=1, int neighbors=8,



root@caiman:/usr/local/portage/net-print/cups-filters(85)# find /usr/include/opencv  -type f -exec grep -i FaceRecognizer {} \; -print
root@caiman:/usr/local/portage/net-print/cups-filters(86)# find /usr/include/opencv2  -type f -exec grep -i FaceRecognizer {} \; -print
root@caiman:/usr/local/portage/net-print/cups-filters(87)# 

In http://opencv.org/opencv-3-0.html it is emphasized, that there is a opencv_contrib repository. Is there an opencv_contrib package for gentoo?
Comment 7 J.O. Aho 2015-07-18 21:26:38 UTC
No, it's not just such easy change as picking another name for the header file, as far as I could understand the private.hpp file ain't meant to be included of other projects, just internally in opencv.

I do suggest building the latest version of libkface (get it from git), which has been modified to build against opencv 3. There are other packages which are broken by the opencv 3 update, at least funtoo has masked opencv 3 until all packages has a version which builds against the new version.
Comment 8 Juergen Rose 2015-07-19 08:09:27 UTC
(In reply to J.O. Aho from comment #7)
> No, it's not just such easy change as picking another name for the header
> file, as far as I could understand the private.hpp file ain't meant to be
> included of other projects, just internally in opencv.
> 
> I do suggest building the latest version of libkface (get it from git),
> which has been modified to build against opencv 3. There are other packages
> which are broken by the opencv 3 update, at least funtoo has masked opencv 3
> until all packages has a version which builds against the new version.

Where is the git repository for libkface? If I do 'eix libkface', I see only
"Homepage: http://www.digikam.org/".
Comment 9 Andreas Sturmlechner gentoo-dev 2015-07-19 08:27:21 UTC
http://quickgit.kde.org/?p=libkface.git

Hm, I don't see any commit that wouldn't already be shipped with libkface-4.10.0/15.04.3
Comment 10 Michael Palimaka (kensington) gentoo-dev 2015-07-19 08:29:52 UTC
15.04.3 fails to build too
Comment 11 Juergen Rose 2015-07-19 12:22:10 UTC
(In reply to Michael Palimaka (kensington) from comment #10)
> 15.04.3 fails to build too

At least 'cmake .' says:
...
-- First try at finding OpenCV...
CMake Warning at /usr/share/opencv/OpenCVConfig.cmake:219 (message):
  opencv_contrib is required but was not found
Call Stack (most recent call first):
  cmake/modules/MacroOpenCV.cmake:27 (find_package)
  CMakeLists.txt:32 (DETECT_OPENCV)


CMake Warning at /usr/share/opencv/OpenCVConfig.cmake:219 (message):
  opencv_legacy is required but was not found
Call Stack (most recent call first):
  cmake/modules/MacroOpenCV.cmake:27 (find_package)
  CMakeLists.txt:32 (DETECT_OPENCV)


-- Great, found OpenCV on the first try.
-- OpenCV Root directory is: /usr/share/opencv
-- OpenCV: Found version 3.0.0 (required: 2.4.9)
-- OpenCV headers: /usr/include/opencv;/usr/include
-- OpenCV libs   : opencv_core;opencv_highgui;opencv_objdetect;opencv_imgproc
-- Configuring done
CMake Warning (dev) in libkface/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "kface" has an INTERFACE_LINK_LIBRARIES property which differs from
  its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    KDE4__kdecore;KDE4__kdeui;Qt4::QtGui;Qt4::QtXml;Qt4::QtSql;opencv_core;opencv_highgui;opencv_objdetect;opencv_imgproc

  LINK_INTERFACE_LIBRARIES:

    

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /usr/src/Libkface/libkface-15.04.3


And the subsequent 'make' fails here as well, with:

In file included from /usr/src/Libkface/libkface-15.04.3/libkface/detection/opencvfacedetector.h:40:0,
                 from /usr/src/Libkface/libkface-15.04.3/libkface/facedetector.cpp:29:
/usr/src/Libkface/libkface-15.04.3/libkface/libopencv.h:55:37: fatal error: opencv2/core/internal.hpp: No such file or directory
 #include <opencv2/core/internal.hpp>
                                     ^
compilation terminated.
libkface/CMakeFiles/kface.dir/build.make:77: recipe for target 'libkface/CMakeFiles/kface.dir/facedetector.o' failed
make[2]: *** [libkface/CMakeFiles/kface.dir/facedetector.o] Error 1
Comment 12 Juergen Rose 2015-07-19 13:15:35 UTC
The fedora people seem to have the same issues:

https://bugzilla.redhat.com/show_bug.cgi?id=1230078
Comment 13 David Brooke 2015-07-20 12:01:26 UTC
I too am having the same issue.
Comment 14 Andrés Becerra Sandoval 2015-07-23 21:36:22 UTC
Upstream url:
https://bugs.kde.org/show_bug.cgi?id=349601
Comment 15 Juergen Rose 2015-07-24 06:24:07 UTC
(In reply to Andrés Becerra Sandoval from comment #14)
> Upstream url:
> https://bugs.kde.org/show_bug.cgi?id=349601

I tried to apply the patch from https://bugs.kde.org/show_bug.cgi?id=349601. Patching works with libkface-4.11.0. But the subsequent 'emerge -v1 libkface' failed with:

In file included from /var/tmp/portage/media-libs/libkface-4.11.0/work/digikam-4.11.0/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.h:35:0,
                 from /var/tmp/portage/media-libs/libkface-4.11.0/work/digikam-4.11.0/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp:30:
/var/tmp/portage/media-libs/libkface-4.11.0/work/libkface-4.11.0_build/libkface/libopencv.h:54:36: fatal error: opencv2/face/facerec.hpp: No such file or directory
 #include <opencv2/face/facerec.hpp>
                                    ^


The line 
#include <opencv2/face/facerec.hpp>
was inserted by the patch. But I do not have a /usr/include/opencv2/face directory with opencv-3.0.0.
Comment 16 Juergen Rose 2015-07-24 06:46:24 UTC
(In reply to Juergen Rose from comment #15)
> (In reply to Andrés Becerra Sandoval from comment #14)
> > Upstream url:
> > https://bugs.kde.org/show_bug.cgi?id=349601
> 
> I tried to apply the patch from https://bugs.kde.org/show_bug.cgi?id=349601.
> Patching works with libkface-4.11.0. But the subsequent 'emerge -v1
> libkface' failed with:
> 
> In file included from
> /var/tmp/portage/media-libs/libkface-4.11.0/work/digikam-4.11.0/extra/
> libkface/libkface/recognition-opencv-lbph/lbphfacemodel.h:35:0,
>                  from
> /var/tmp/portage/media-libs/libkface-4.11.0/work/digikam-4.11.0/extra/
> libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp:30:
> /var/tmp/portage/media-libs/libkface-4.11.0/work/libkface-4.11.0_build/
> libkface/libopencv.h:54:36: fatal error: opencv2/face/facerec.hpp: No such
> file or directory
>  #include <opencv2/face/facerec.hpp>
>                                     ^
> 
> 
> The line 
> #include <opencv2/face/facerec.hpp>
> was inserted by the patch. But I do not have a /usr/include/opencv2/face
> directory with opencv-3.0.0.



I suppose the the opencv_contrib repo https://github.com/itseez/opencv_contrib is needed for opencv2/face/facerec.hpp. Is there any attempt to install this repo under gentoo?
Comment 17 Geoff Madden 2015-07-26 11:21:11 UTC
I have just downgraded opencv to 2.4.10 & libkface-4.10 compilrd up just fine.
Digikam is now completing
Comment 18 Johannes Huber (RETIRED) gentoo-dev 2015-08-09 09:05:50 UTC
*** Bug 557096 has been marked as a duplicate of this bug. ***
Comment 19 Adam Stylinski 2015-08-20 02:01:18 UTC
Created attachment 409526 [details, diff]
This allows kface to build with opencv3

I've been working with upstream on this, the following patch works (I've done some preliminary testing) and can be applied against the sources pulled down in the ebuild.
Comment 20 Juergen Rose 2015-08-20 20:27:23 UTC
(In reply to Adam Stylinski from comment #19)
> Created attachment 409526 [details, diff] [details, diff]
> This allows kface to build with opencv3
> 
> I've been working with upstream on this, the following patch works (I've
> done some preliminary testing) and can be applied against the sources pulled
> down in the ebuild.

Thanks for the patch. But even with this patch it still fails with:

...
 cd /var/tmp/portage/media-libs/libkface-4.12.0/work/libkface-4.12.0_build/libkface && /usr/bin/x86_64-pc-linux-gnu-g++  -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=69 -DKDE_DEFAULT_DEBUG_AREA=51005 -DKDE_DEPRECATED_WARNINGS -DMAKE_KFACE_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_SVG_LIB -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_XML_LIB -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_REENTRANT -D_XOPEN_SOURCE=500  -DQT_NO_DEBUG -DNDEBUG -march=native -O2 -pipe  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -I/var/tmp/portage/media-libs/libkface-4.12.0/work/libkface-4.12.0_build/libkface -I/var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface -I/var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/database -I/var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/detection -I/var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/recognition-opencv-lbph -I/var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/alignment-congealing -I/usr/include/KDE -I/usr/include/qt4/QtXmlPatterns -isystem /usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -isystem /usr/include/qt4/QtSvg -isystem /usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtMultimedia -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -isystem /usr/include/qt4/QtDBus -I/usr/include/qt4/QtAssistant -I/usr/include/qt4/Qt3Support -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtCore -I/usr/include/qt4/Qt -isystem /usr/share/qt4/mkspecs/default -isystem /usr/include/qt4 -I/usr/include/opencv    -fexceptions -UQT_NO_EXCEPTIONS -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o CMakeFiles/kface.dir/recognitiondatabase.o -c /var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/recognitiondatabase.cpp
In file included from /var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/detection/opencvfacedetector.h:40:0,
                 from /var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/facedetector.cpp:29:
/var/tmp/portage/media-libs/libkface-4.12.0/work/libkface-4.12.0_build/libkface/libopencv.h:54:28: fatal error: opencv2/face.hpp: No such file or directory
 #include <opencv2/face.hpp>
                            ^
compilation terminated.
libkface/CMakeFiles/kface.dir/build.make:86: recipe for target 'libkface/CMakeFiles/kface.dir/facedetector.o' failed
make[2]: *** [libkface/CMakeFiles/kface.dir/facedetector.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/recognition-opencv-lbph/opencvlbphfacerecognizer.h:35:0,
                 from /var/tmp/portage/media-libs/libkface-4.12.0/work/digikam-4.12.0/extra/libkface/libkface/recognitiondatabase.cpp:31:
/var/tmp/portage/media-libs/libkface-4.12.0/work/libkface-4.12.0_build/libkface/libopencv.h:54:28: fatal error: opencv2/face.hpp: No such file or directory
 #include <opencv2/face.hpp>
                            ^
compilation terminated.
libkface/CMakeFiles/kface.dir/build.make:158: recipe for target 'libkface/CMakeFiles/kface.dir/recognitiondatabase.o' failed
make[2]: *** [libkface/CMakeFiles/kface.dir/recognitiondatabase.o] Error 1
Comment 21 Juergen Rose 2015-08-20 20:32:17 UTC
There is not any face.hpp under /usr/include/opencv2:

root@cheetahnew:/usr/local/portage/media-libs(48)# find /usr/include/opencv2 -name face.hpp
root@cheetahnew:/usr/local/portage/media-libs(49)# 


opencv was installed with the following USE flags:

root@cheetahnew:/usr/local/portage/media-libs(49)# emerge -pvD opencv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-libs/opencv-3.0.0:0/3.0::gentoo  USE="doc eigen examples ffmpeg gstreamer gtk java jpeg jpeg2k openexr opengl openmp png python qt5 threads tiff v4l vtk xine -contrib -cuda -ieee1394 (-ipp) -libav -opencl -pch -qt4 -testprograms" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_4 -python3_3" 0 KiB
Comment 22 Toralf Förster gentoo-dev 2015-08-26 12:21:25 UTC
Created attachment 410328 [details]
info.txt

confirmed
  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named amd64-kde-unstable_20150820-150929) at a hardened host acting as a tinderbox.

  Portage 2.2.20.1 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3, glibc-2.21-r1, 4.1.6-hardened x86_64)
=================================================================
System uname: Linux-4.1.6-hardened-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
Comment 23 Toralf Förster gentoo-dev 2015-08-26 12:21:33 UTC
Created attachment 410330 [details]
emerge-history.txt
Comment 24 Toralf Förster gentoo-dev 2015-08-26 12:21:37 UTC
Created attachment 410332 [details]
media-libs:libkface-4.12.0:20150825-205902.log
Comment 25 Markus Walter 2015-08-27 16:46:34 UTC
What about a patch for libkface-4.12.0? The attached patch fails there for me. Thanks in advance.
Comment 26 Jason A. Donenfeld gentoo-dev 2015-08-28 09:06:46 UTC
None of the above patches work with 4.12.0. Please take care of this bug. It's been breaking builds for far too long now.
Comment 27 Jason A. Donenfeld gentoo-dev 2015-08-28 09:45:40 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0459bae45e0a5efc3717bd1a09222bfd44b9dc39

As a stop gap measure until somebody fixes this properly.
Comment 28 Michael Palimaka (kensington) gentoo-dev 2015-08-28 15:21:14 UTC
(In reply to Jason A. Donenfeld from comment #26)
> None of the above patches work with 4.12.0. Please take care of this bug.
> It's been breaking builds for far too long now.

Patches welcome.
Comment 29 Andreas Sturmlechner gentoo-dev 2015-10-16 22:31:19 UTC
Please test: https://github.com/gentoo/gentoo/pull/240
Comment 30 Michael Palimaka (kensington) gentoo-dev 2015-10-22 13:20:55 UTC
Thanks, this is fixed in git now by Andreas.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae35d2f35fb179e18cda21c9caccbd0990773e87