Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383847 - media-libs/opencv-2.3.0 fails to build with cuda useflag
Summary: media-libs/opencv-2.3.0 fails to build with cuda useflag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 17:13 UTC by optiluca@gmail.com
Modified: 2011-09-26 22:39 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,73.84 KB, text/plain)
2011-09-20 17:14 UTC, optiluca@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description optiluca@gmail.com 2011-09-20 17:13:45 UTC
Title says it all.  The ebuild still fails, albeit at a different point.  May or may not be related

Reproducible: Always




emerge --info opencv
Portage 2.2.0_alpha59 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.0.4-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.0.4-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_820_@_1.73GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 20 Sep 2011 16:30:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.6-r1, 4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo sunrise ikelos lcd-filtering benf bitcoin vmware powerman v-fox LOCAL
Installed sets: 
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/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/etc/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://mirror.bytemark.co.uk/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1"
LINGUAS="en_GB it"
MAKEOPTS="-j8"
PKGDIR="/etc/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/ikelos /var/lib/layman/lcd-filtering /var/lib/layman/benf /var/lib/layman/bitcoin /var/lib/layman/vmware /var/lib/layman/powerman /var/lib/layman/v-fox /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr apm avi bash-completion berkdb bluetooth branding bzip2 cairo caps cdaudio cdda cddb cdr chm cleartype cli consolekit cracklib crypt css cuda cups cxx dbus declarative dhcp dri dts dv dvb dvd dvdr dvdread editor emboss emovix encode exif faac faad fam fame fbcondecor fbsplash ffmpeg firefox flac foomaticdb fortran gcj gd gdbm gdu gif git glitz glx gphoto2 gpm gps gstreamer hdaps iconv id3tag ieee1394 imagemagick inotify ipod ipv6 it jack java java6 joystick jpeg kde kickoff kipi ladspa lastfm lcms ldap libnotify libsamplerate libv4l2 lm_sensors mad matroska mbrola mikmod mmx mng modules mp2 mp3 mp4 mpeg mplayer msn mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pango pcre pdf perl phonon plasma pmu png policykit ppds pppd python qt qt3support qt4 quicktime readline rtc samba scanner sdl semantic-desktop session skype slp smp snmp spell sse sse2 sse3 ssl ssse3 startup-notification subtitles subversion svg sysfs tcpd theora threads tiff truetype twolame udev unicode usb v4l v4l2 vdpau vorbis wicd wifi wma-fixed x264 xcb xcomposite xine xinerama xml xorg xscreensaver xulrunner xv xvid zeroconf zlib" ALSA_CARDS="hda-intel" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB it" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 optiluca@gmail.com 2011-09-20 17:14:33 UTC
Created attachment 287185 [details]
build.log
Comment 2 Rafał Mużyło 2011-09-20 17:52:27 UTC
/opt/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.5 and up are not supported!

...well, doesn't look libpng related in any reasonable way.

I'd say INVALID.
Comment 3 optiluca@gmail.com 2011-09-20 19:21:04 UTC
Disabling cuda use flag makes the ebuild compile successfully, as you noticed.  Unrelated issue to the libpng bug then...
Comment 4 Navid Zamani 2011-09-23 22:41:18 UTC
(In reply to comment #2)
> /opt/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version!
> gcc 4.5 and up are not supported!
> I'd say INVALID.

I think you agree that if there is a USE flag, then enabling it must also be supported. Otherwise wouldn’t it be better to just remove the flag and functionality?
But the normal Gentoo way certainly is to make functionality that the upstream package contains available on Gentoo too. 

So just shoving it away with a quick “INVALID” is a bit out of line, I guess. ;)
Maybe I misunderstood…
Comment 5 Siuchung Cheung (Clement) 2011-09-25 05:41:16 UTC
Same problem here. The problem actually lies with nvidia-cuda-toolkit, not opencv or the ebuild. Even the latest 4.0 is failing. So I'm not sure there's anything the gentoo devs can do about it until Nvidia finally release a newer version that works. This GCC is simply not supported upstream.

To make matters worse, gcc-config downgrade does *NOT* work because symbol versioning will break a lot of executables, including cmake:
cmake: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.6/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by cmake)

I actually managed to recompile cmake using the older gcc and then compile opencv and then go back to the new gcc. But turning off the cuda flag is probably the easiest way out for most people.
Comment 6 Navid Zamani 2011-09-25 21:17:50 UTC
(In reply to comment #5)
> The problem actually lies with nvidia-cuda-toolkit, not
> opencv or the ebuild. Even the latest 4.0 is failing. So I'm not sure there's
> anything the gentoo devs can do about it until Nvidia finally release a newer
> version that works. This GCC is simply not supported upstream.

Agreed. If nVidia has a bug tracker, we should put it in there, link this bug to it, and put it in some “Waiting for upstream” mode.

> To make matters worse, gcc-config downgrade does *NOT* work because symbol
> versioning will break a lot of executables […].

Interesting. Thanks for that info. That’s bad news.

> But turning off the cuda flag is
> probably the easiest way out for most people.

The problem is, that it will still cause the ebuild to fail for people. How about we force the flag to off for all systems where gcc ≥4.5 is installed? Or some kind of conditional masking?

I have the additional problem, that any form of
# echo 'dev-libs/opencv -cuda' >> /etc/portage/package.use/bugs
seems to be ignored.
Comment 7 Mike Gilbert gentoo-dev 2011-09-26 02:02:42 UTC
(In reply to comment #6)
> I have the additional problem, that any form of
> # echo 'dev-libs/opencv -cuda' >> /etc/portage/package.use/bugs
> seems to be ignored.

media-libs/opencv, not dev-libs/opencv.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2011-09-26 22:39:11 UTC
The ebuild now prints an ewarn and disables cuda if cuda is requested and >=gcc-4.5 is used.