Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405983 - media-libs/opencv-2.3.1a-r1 USE=ipp - CMake Error at OpenCVFindIPP.cmake:184 (message): IPP IA32 libraries not found
Summary: media-libs/opencv-2.3.1a-r1 USE=ipp - CMake Error at OpenCVFindIPP.cmake:184 ...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
Depends on: 347375
Blocks:
  Show dependency tree
 
Reported: 2012-02-27 05:53 UTC by Patrick McMunn
Modified: 2012-07-23 19:15 UTC (History)
2 users (show)

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


Attachments
build.log (opencv-2.3.1a-r1_build.log,11.77 KB, text/plain)
2012-02-27 05:59 UTC, Patrick McMunn
Details
files/patch (opencv.patch,533 bytes, patch)
2012-03-23 14:08 UTC, Ian Delaney (RETIRED)
Details | Diff
files/OpenCV-2.3.1-OpenCVFindIPP.cmake.patch (OpenCV-2.3.1-OpenCVFindIPP.cmake.patch,1.20 KB, text/plain)
2012-07-23 19:12 UTC, Patrick McMunn
Details
files/OpenCV-2.4.2-OpenCVFindIPP.cmake.patch (OpenCV-2.4.2-OpenCVFindIPP.cmake.patch,1.47 KB, patch)
2012-07-23 19:15 UTC, Patrick McMunn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McMunn 2012-02-27 05:53:19 UTC
I have dev-lang/icc-11.1.071-r1 and sci-libs/ipp-11.1.072 from mainline portage installed. OpenCV's configure can find the ipp installation at /opt/intel/Compiler/11.1/072/ipp but not the IA32 libraries. Configure fails and it does not proceed with compilation. OpenCV will configure and compile just fine if the ipp use flag is not enabled.

Reproducible: Always

Steps to Reproduce:
1. Emerge media-libs/opencv-2.3.1a-r1 with ipp use flag enabled
Actual Results:  
Configure fails to find IPP's IA32 libs, configure stops, and compilation does not take place

Expected Results:  
Configure should find IPP's IA32, complete and proceed with compilation

Portage 2.3.2-r2 (default/linux/x86/2008.0/desktop, gcc-4.6.2, glibc-2.14.1-r2, 3.2.5-gentoo i686)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.2.5-gentoo-i686-AMD_Athlon-TM-_XP_2200+-with-gentoo-2.1.8
Timestamp of tree: Sun, 26 Feb 2012 07:00:01 +0000
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3::paddymac, 3.0.1::progress, 3.1.4-r3::paddymac, 3.2.2::paddymac
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1.8-r3
sys-apps/openrc:          0.8.3-r5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.6.3-r1::funtoo, 1.7.9-r2, 1.8.5-r4::funtoo, 1.9.6-r3, 1.10.3, 1.11.3
sys-devel/binutils:       2.22-r1::paddymac
sys-devel/gcc:            4.4.5::gentoocvs, 4.5.3-r1::paddymac, 4.6.1-r2::paddymac, 4.6.2
sys-devel/gcc-config:     1.5
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2::paddymac (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2::paddymac
Repositories: bibletime gamerlay-stable kde Loux-s-Portage ruby x11 systemd desktop-effects perl-experimental gentoo-haskell gentoo-guis iElectric mysql moonrise calculate qt java-overlay x-pythonhead progress sunrise ubuntu vdr-devel lua flora seden multimedia maggu2810-overlay science Funtoo gentoo paddymac gentoocvs
Installed sets: 
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -ftree-vectorize -march=athlon-xp -pipe -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/entropy /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -ftree-vectorize -march=athlon-xp -pipe -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block"
DISTDIR="/var/src/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles mini-manifest multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US UTF-8"
MAKEOPTS="-j2"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage"
PORTDIR_OVERLAY="/var/lib/layman/bibletime /var/lib/layman/gamerlay /var/lib/layman/kde /var/lib/layman/planeshift /var/lib/layman/ruby /var/lib/layman/x11 /var/lib/layman/systemd /var/lib/layman/desktop-effects /var/lib/layman/perl-experimental /var/lib/layman/haskell /var/lib/layman/gentoo-guis /var/lib/layman/iElectric /var/lib/layman/mysql /var/lib/layman/moonrise /var/lib/layman/calculate /var/lib/layman/qt /var/lib/layman/java-overlay /var/lib/layman/pythonhead /var/lib/layman/progress /var/lib/layman/sunrise /var/lib/layman/ubuntu /var/lib/layman/vdr-devel /var/lib/layman/lua /var/lib/layman/flora /var/lib/layman/seden /var/lib/layman/multimedia /var/lib/layman/maggu2810-overlay /var/lib/layman/science /var/lib/layman /var/cache/portage /var/lib/layman/paddymac /var/lib/layman/gentoocvs"
SYNC="git://github.com/funtoo/portage-mini-2011.git"
SYNC_USER="root"
USE="/ 3dnow 3dnowext R X a52 aac acl acpi alac alsa avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cleartype cli clucene consolekit cracklib crypt cups curl cxx dbus dirac directfb dri dts dvd dvdr dvdread emboss encode exif faac faad fam fbcon ffmpeg firefox flac fortran ftp funtoo fuse gallium gdbm gdu ggi gif glitz gnutls gpm gstreamer gtk handbook iconv icu id3tag imagemagick imap ipv6 jack java javascript jpeg jpeg2k kde lame lcms ldap libnotify lm_sensors lv2 lzma mad mca mce midi mmap mmx mmxext mng modplug modules mp3 mp4 mpeg mudflap multimedia musepack music ncurses networkmanager nls nptl nptlonly nsplugin ogg openal openexr opengl openmedia openmp openssl oss oss4 packagekit pam pango pch pcre pdf perl phonon plasma png policykit posix ppds ppp pppd python qt3 qt3support qt4 rar raw readline resolvconf samba sasl scanner schroedinger sdl sdl-sound semantic-desktop session sndfile/ sound speex spell sse ssh ssl startup-notification svg svga sysfs taglib tcl tcpd theora threads thumbnail tiff timidity tk truetype udev unicode usb v4l v4l2 vaapi vcd vga video vorbis wav wavpack webkit wifi win32codecs wxwidgets x264 x86 xattr xcb xinerama xml xorg xpm xulrunner xv xvid zeroconf zip zlib zsh-completion" ALSA_CARDS="cmipci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="evdev joystick keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US UTF-8" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386" QEMU_USER_TARGETS="i386" RUBY_TARGETS="ruby18" SANE_BACKENDS="pixma" USERLAND="GNU" VIDEO_CARDS="fbdev nouveau radeon" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, SYNC_UMASK

=================================================================
                        Package Settings
=================================================================

media-libs/opencv-2.3.1a-r1 was built with the following:
USE="eigen ffmpeg gstreamer gtk jpeg jpeg2k openexr opengl png python qt4 sse tiff v4l xine -cuda -doc -examples -ieee1394 -ipp -sse2 -sse3 -ssse3"
Comment 1 Patrick McMunn 2012-02-27 05:59:59 UTC
Created attachment 303451 [details]
build.log
Comment 2 Chris Reffett (RETIRED) gentoo-dev Security 2012-03-11 00:19:12 UTC
From looking at the CMake files, the ebuild is detecting the IPP directory as "/opt/intel/Compiler/11.1/072/ipp" and then failing on either not finding ../ia32/ or lib/ia32 from there (probably the former, the CMake file has a conditional and I'm not sure which path it's taking). Can you confirm whether one of these exists?
Comment 3 Patrick McMunn 2012-03-12 04:30:05 UTC
I have /opt/intel/Compiler/11.1/072/ipp/ia32/lib/
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2012-03-23 14:08:57 UTC
Created attachment 306425 [details, diff]
files/patch

ok; this should do it.  My system isn't finding the icc compiler for some reason so I can't actually emerge it.  From the above, this line in the file OpenCVFindIPP.cmake is erroneous.  If you don't know. add it to files/, then add it to the ebuild with epatch "${FILESDIR}"/opencv.patch in src_prepare().

It has two bites of the cherry and it got them both wrong.  This makes it match your path you gave.  Test, re-post
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2012-05-04 22:15:59 UTC
Cant test this because I cannot emerge icc right now (version in portage does not fetch)
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2012-05-25 21:03:34 UTC
Use flag has been masked, for lack of better options.
Comment 7 Patrick McMunn 2012-07-17 01:07:44 UTC
It appears the problem is not with OpenCV's ebuild. The environment variables which specify the library paths for ipp are installed incorrectly - at least with sci-libs/ipp-11.1.072. Please see https://bugs.gentoo.org/show_bug.cgi?id=426932 Setting the correct environment variables allows OpenCV's ebuild to find the libraries with no trouble.
Comment 8 Patrick McMunn 2012-07-23 19:12:30 UTC
Created attachment 319014 [details]
files/OpenCV-2.3.1-OpenCVFindIPP.cmake.patch

After a couple of days of revamped effort, I have solved the issue. The only environment variable which is actually checked is $IPPROOT. The other environment variables specifying the locations of the libraries appear to be ignored. The original patch did not address a secondary issue which caused a compile failure at 23% completion. I have corrected this secondary issue as well.

There are two potential areas of concern. The first is that I have only confirmed that this works on my x86 system. I have not confirmed that it works on an amd64 system. The second is that my testing has only been done with sci-libs/ipp-11.1.072 which is in the 6.x series of IPP libraries. OpenCV's cmake script uses a different method of locating the IPP libraries depending on whether IPP is >=7.0, and my patch only affects the portion for <7.0. Therefore I do not know whether cmake will successfully find the libraries for IPP 7.0 or greater.
Comment 9 Patrick McMunn 2012-07-23 19:15:22 UTC
Created attachment 319016 [details, diff]
files/OpenCV-2.4.2-OpenCVFindIPP.cmake.patch

This is the same patch as above tailored to media-libs/opencv-2.4.2