Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588958 - kde-apps/libkface-16.04.3 doesn't compile with media-libs/opencv-3.1.0-r1
Summary: kde-apps/libkface-16.04.3 doesn't compile with media-libs/opencv-3.1.0-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-16 23:47 UTC by Siuchung Cheung (Clement)
Modified: 2016-08-20 19:23 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siuchung Cheung (Clement) 2016-07-16 23:47:57 UTC
Not sure why I'm the only one hitting this.

In file included from /var/tmp/portage/kde-apps/libkface-16.04.3/work/libkface-16.04.3/src/recognition-opencv-lbph/facerec_borrowed.cpp:41:0:
/var/tmp/portage/kde-apps/libkface-16.04.3/work/libkface-16.04.3/src/recognition-opencv-lbph/facerec_borrowed.h:144:46: error: ‘PredictCollector’ is not a member of ‘cv::face’
     void predict(cv::InputArray src, cv::Ptr<cv::face::PredictCollector> collector, const int state = 0) const override;
                                              ^
This is strange. Since we already have a patch for OpenCV 3.1. https://gitweb.gentoo.org/repo/gentoo.git/tree/kde-apps/libkface/files/libkface-15.12.2-opencv3.1.patch

Line 144 means we're in the else case where we're not OpenCV 3.1, which is wrong.

/usr/include/opencv2/core/version.hpp:
#define CV_VERSION_MAJOR    3
#define CV_VERSION_MINOR    1
#define CV_VERSION_REVISION 0

bliss kde-apps/libkface-16.04.3 # equery list -po opencv
 * Searching for opencv ...
[-P-] [  ] media-libs/opencv-2.4.11:0/2.4
[-P-] [  ] media-libs/opencv-2.4.12:0/2.4
[-P-] [  ] media-libs/opencv-2.4.12-r1:0/2.4
[-P-] [  ] media-libs/opencv-3.0.0:0/3.0
[IP-] [  ] media-libs/opencv-3.1.0-r1:0/3.1
[-P-] [  ] media-libs/opencv-3.1.0-r3:0/3.1
[-P-] [  ] media-libs/opencv-3.1.0-r4:0/3.1

The problem seems to be the definition of the macro.
src/libopencv.h.cmake.in:
#define OPENCV_MAKE_VERSION(major,minor,patch) (((major) << 16) | ((minor) << 8) | (patch))
#define OPENCV_VERSION                         OPENCV_MAKE_VERSION(CV_MAJOR_VERSION,CV_MINOR_VERSION,CV_SUBMINOR_VERSION)
#define OPENCV_TEST_VERSION(major,minor,patch) ( OPENCV_VERSION < OPENCV_MAKE_VERSION(major,minor,patch) )

OpenCV is 3.1.0 and OPENCV_TEST_VERSION(3,1,0) is asking for 3.1.0 < 3.1.0. Check fails.

It appears that this commit inverted the meaning of that macro:
https://github.com/KDE/libkface/commit/60b88b4cb278ec58b63c013ce8be29069258a5ae#diff-0caace9a1ca6f317cd61fdd9edd96510L52

We have to either patch libopencv.h.cmake.in back or invert the macro in our patches.


bliss /home/clement # emerge --info '=kde-apps/libkface-16.04.3::gentoo'
Portage 2.3.0_rc1 (python 2.7.11-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-4.9.3, glibc-2.22-r4, 4.4.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.6-gentoo-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-gentoo-2.2
KiB Mem:    16391632 total,  10759688 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 14 Jul 2016 09:15:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.4::gentoo, 3.5.1-r3::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.21::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /net/air.port0.org/portage
    sync-type: rsync
    sync-uri: rsync://rsync.us.gentoo.org/gentoo-portage
    priority: -1000

local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

sabayon
    location: /var/lib/layman/sabayon
    sync-type: laymansync
    sync-uri: git://github.com/Sabayon/for-gentoo.git
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sunrise-reviewed.git
    masters: gentoo
    priority: 50

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/rc.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="mirror://gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/net/air.port0.org/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aacs acl acpi aiglx alsa amd64 ao berkdb branding bs2b bzip2 cairo cap caps cdaudio cdda cdparanoia cdr cjk cleartype cli clucene cracklib cuda cxx dbus declarative designer device-mapper djbfft dri dts dvd dvdnav dvdr emacs encode exif faac faad fam ffmpeg firefox flickr fontconfig fortran frei0r g3dvl gdbm geolocation gif gimp git glamor glitz gmp gpm gpu gstreamer gtk gtk3 gudev hou ibus iconv icu immqt-bc inotify inquisitio ipv6 java jce jingle jpeg kde kdeenablefinal kdehiddenvisibility kdexdeltas kipi lapack lcms libnotify libsamplerate lm_sensors logrotate lzma mad metalink midi mmap mmx mmxext mng modules moodbar mozilla mp3 mp4 mpeg mplayer msn multilib musicbrainz mysql ncurses nepomuk networkmanager nls nptl nsplugin ntp ogg opencl openexr opengl openmp openssl oscar pam pango pch pcre pdf phonon plasma png policykit ppds pulseaudio python python-bindings qml qt3support qt4 qt5 rar rdesktop readline real resolvconf rtc rtsp ruby-bindings sdl seccomp semantic-desktop session smp sms sou spell sqlite sse sse2 ssh ssl startup-notification stream subversion svg symlink system-jpeg systemd tcpd threads tiff timidity tk truetype udev udisks unicode upower usb vaapi vdpau visibility vorbis vpx webkit webp widgets wmp wxwidgets wxwindows x264 xattr xcb xcomposite xinerama xml xmp xscreensaver xulrunner xv xvid zlib zsh-completion" ABI_X86="64 32" ALSA_CARDS="hda-intel usb-audio" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

bliss /home/clement # emerge -pqv '=kde-apps/libkface-16.04.3::gentoo'
[ebuild     U ] kde-apps/libkface-16.04.3 [15.12.1] USE="-debug"
Comment 1 Siuchung Cheung (Clement) 2016-07-16 23:50:38 UTC
Correction. We can't patch the macro because it breaks the other OpenCV 3.0 code from upstream. We have to fix our patch.
Comment 2 Andreas Sturmlechner gentoo-dev 2016-07-16 23:52:56 UTC
Upgrade to latest opencv-3.1.0. IIRC -r1 did not contain an actual 3.1-contrib tarball.
Comment 3 Siuchung Cheung (Clement) 2016-07-17 00:00:10 UTC
Wait. Our patch actually looks correct upon closer inspection. Somehow my /usr/include/opencv2/face.hpp has the older content but /usr/include/opencv2/core/version.hpp shows 3.1.0. Very strange...
Comment 4 Siuchung Cheung (Clement) 2016-07-17 00:00:30 UTC
Ah. That's why.
Comment 5 Siuchung Cheung (Clement) 2016-07-17 00:15:51 UTC
Yes, it fixes the problem. Thanks.

Reporting 3.1.0 when you're not sounds problematic. Maybe we need to either make libkface block opencv-3.1.0-r1 or retire that problematic version of opencv.
Comment 6 Andreas Sturmlechner gentoo-dev 2016-07-23 14:22:55 UTC
I think opencv-3.1.0-r1 was only brought back because incidentally it seemed to be less problematic than the following revbumps carrying the correct contrib tarball. Nothing to be fixed in kde-apps/libkface-16.04.3 imo, except maybe block the wrong opencv version?
Comment 7 Andreas Sturmlechner gentoo-dev 2016-08-20 19:23:06 UTC
Fixed by removal of opencv-3.1.0-r1: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54a9336fdc365eb41512e0bc17e35867e6713b8a