Bug 1329790 - kf5-libkface FTBFS against opencv3
Summary: kf5-libkface FTBFS against opencv3
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kf5-libkface
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: opencv3
TreeView+ depends on / blocked
 
Reported: 2016-04-23 01:39 UTC by Rex Dieter
Modified: 2016-04-28 11:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-28 10:53:17 UTC
Type: Bug


Attachments (Terms of Use)
this fix build for me - by default opencv 3 is not used (570 bytes, patch)
2016-04-25 09:29 UTC, Pavel Kajaba
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 358910 0 None None None 2016-04-23 01:41:09 UTC

Description Rex Dieter 2016-04-23 01:39:18 UTC
kf5-libkface-16.04.0 build fails pretty early on...

-- First try at finding OpenCV...
CMake Error at /usr/lib64/OpenCV/OpenCVConfig.cmake:232 (message):
  opencv_contrib is required but was not found
Call Stack (most recent call first):
  cmake/modules/MacroOpenCV.cmake:27 (find_package)
  CMakeLists.txt:97 (DETECT_OPENCV)
-- Configuring incomplete, errors occurred!

Comment 1 Rex Dieter 2016-04-23 01:57:17 UTC
Hrm, using the proposed patch,
https://git.reviewboard.kde.org/r/126833
seems to fail the same way

Comment 2 Sergio Basto 2016-04-23 02:15:35 UTC
(In reply to Rex Dieter from comment #0)
> kf5-libkface-16.04.0 build fails pretty early on...
> 
> -- First try at finding OpenCV...
> CMake Error at /usr/lib64/OpenCV/OpenCVConfig.cmake:232 (message):
>   opencv_contrib is required but was not found

we have opencv-contrib-3.1.0-2.fc25 , may need be a 
BuildRequires:opencv-contrib, looking to kf5-libkface.spec seems to me that is missing ...

Comment 3 Rex Dieter 2016-04-23 02:25:52 UTC
Why does opencv-devel not pull it in already ?

Comment 4 Rex Dieter 2016-04-23 02:30:04 UTC
Looks like opencv3 doesn't have a
/usr/lib64/libopencv_contrib.so

like opencv(2) had, so the opencv3 patch may need more work.

Comment 5 Sergio Basto 2016-04-23 02:31:20 UTC
(In reply to Rex Dieter from comment #3)
> Why does opencv-devel not pull it in already ?

Should pull it ? 

opencv still not in mirrors I still can't use dnf repoquery to make some checks ...

Comment 6 Rex Dieter 2016-04-23 02:35:02 UTC
I can tell from opencv.spec:

%package        devel
Summary:        Development files for using the OpenCV library
Group:          Development/Libraries
Requires:       opencv%{_isa} = %{version}-%{release}


-devel only depends on the main package currently.

It probably needs (at least):
Requires: %{name}-core{_isa} = %{version}-%{release}
Requires: %{name}-contrib%{_isa} = %{version}-%{release}

too.

Comment 7 Rex Dieter 2016-04-23 02:36:26 UTC
Interestingly, the main package also has

Requires:       opencv-core%{_isa} = %{version}-%{release}

So, strictly speaking, only the added -contrib is needed

Comment 8 Sergio Basto 2016-04-23 15:51:18 UTC
http://answers.opencv.org/question/93533/libopencv_contribso-with-opencv-31/?answer=93543#post-id-93543

we already built as opencv_contrib readme says ...

Comment 9 Sergio Basto 2016-04-24 05:59:59 UTC
opencv-3.1.0-3 updated in rawhide :

- Enable build with Qt5.
- VTK support is disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.6.2.0 + Qt4

Comment 10 Pavel Kajaba 2016-04-25 09:29:16 UTC
Created attachment 1150322 [details]
this fix build for me - by default opencv 3 is not used

Comment 11 Rex Dieter 2016-04-25 11:58:24 UTC
Sorry, silly me for not noticing that simple cmake flag.

Comment 12 Rex Dieter 2016-04-25 12:14:38 UTC
A little further, then fails a new way:

/builddir/build/BUILD/libkface-16.04.0/src/recognition-opencv-lbph/facerec_borrowed.cpp: In static member function 'static cv::Ptr<KFaceIface::LBPHFaceRecognizer> KFaceIface::LBPHFaceRecognizer::create(int, int, int, int, double, KFaceIface::LBPHFaceRecognizer::PredictionStatistics)':
/builddir/build/BUILD/libkface-16.04.0/src/recognition-opencv-lbph/facerec_borrowed.cpp:516:115: error: invalid new-expression of abstract class type 'KFaceIface::LBPHFaceRecognizer'
     LBPHFaceRecognizer* const fr = new LBPHFaceRecognizer(radius, neighbors, grid_x, grid_y, threshold, statistics);
                                                                                                                   ^
In file included from /builddir/build/BUILD/libkface-16.04.0/src/recognition-opencv-lbph/facerec_borrowed.cpp:39:0:
/builddir/build/BUILD/libkface-16.04.0/src/recognition-opencv-lbph/facerec_borrowed.h:51:7: note:   because the following virtual functions are pure within 'KFaceIface::LBPHFaceRecognizer':
 class LBPHFaceRecognizer : public cv::face::FaceRecognizer

Comment 13 Pavel Kajaba 2016-04-25 13:28:00 UTC
This is strange, because I can build it in mock and copr too.

https://copr.fedorainfracloud.org/coprs/sergiomb/opencv/build/180502/

at least for x86_64

Comment 14 Pavel Kajaba 2016-04-26 06:13:20 UTC
https://copr.fedorainfracloud.org/coprs/sergiomb/opencv/build/180554/ There is better link for a build.

Comment 15 Pavel Kajaba 2016-04-28 07:06:40 UTC
any update on this?

Comment 16 Rex Dieter 2016-04-28 10:53:17 UTC
incorporating opencv-3.1-support.patch now,
http://koji.fedoraproject.org/koji/taskinfo?taskID=13834727

I'll assume it'll work.

Silly me, I'd only previously tried this patch *or* -DENABLE_OPENCV3=ON, but not both

Comment 17 Pavel Kajaba 2016-04-28 11:07:49 UTC
great job, thanks a lot!


Note You need to log in before you can comment on or make changes to this bug.