Created attachment 318880 [details] complete build log When merging media-libs/opencv-2.4.2, I get the following error: /var/tmp/portage/media-libs/opencv-2.4.2/work/OpenCV-2.4.2/modules/calib3d/src/stereosgbm.cpp: In member function 'virtual void cv::StereoSGBM::operator()(const cv::_InputArray&, const cv::_InputArray&, const cv::_OutputArray&)': /var/tmp/portage/media-libs/opencv-2.4.2/work/OpenCV-2.4.2/modules/calib3d/src/stereosgbm.cpp:822:6: internal compiler error: in build_polynomial_chrec, at tree-chrec.h:143 Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.gentoo.org/> for instructions. make[2]: *** [modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/stereosgbm.cpp.o] Error 1 # emerge -pqv '=media-libs/opencv-2.4.2' [ebuild U ] media-libs/opencv-2.4.2 [2.4.0] USE="ffmpeg gtk jpeg jpeg2k opengl png tiff v4l -cuda -doc -eigen -examples -gstreamer -ieee1394 (-ipp) -openexr -pch -qt4 -tbb -testprograms -xine (-python%*)" # emerge -pqv '=sys-devel/gcc-4.6.3' [ebuild R ] sys-devel/gcc-4.6.3 USE="cxx fortran gtk mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"
Created attachment 318882 [details] emerge --info
Created attachment 318884 [details] ebuild environment
Same problem with MAKEOPTS="-j1" emerge -1a opencv emerge -1a =opencv-2.4.0 work fine
(In reply to comment #0) > # emerge -pqv '=sys-devel/gcc-4.6.3' > [ebuild R ] sys-devel/gcc-4.6.3 USE="cxx fortran gtk mudflap (multilib) > nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go > -graphite (-hardened) (-libssp) -multislot -nocxx -nopie -nossp -objc > -objc++ -objc-gc -test -vanilla" Build log says: -- C++ Compiler: /usr/bin/x86_64-pc-linux-gnu-g++ (ver 4.5.4)
*** Bug 427652 has been marked as a duplicate of this bug. ***
Created attachment 319186 [details] reduced testcase
(In reply to comment #4) > (In reply to comment #0) > > # emerge -pqv '=sys-devel/gcc-4.6.3' > > [ebuild R ] sys-devel/gcc-4.6.3 USE="cxx fortran gtk mudflap (multilib) > > nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go > > -graphite (-hardened) (-libssp) -multislot -nocxx -nopie -nossp -objc > > -objc++ -objc-gc -test -vanilla" > > Build log says: > -- C++ Compiler: /usr/bin/x86_64-pc-linux-gnu-g++ (ver > 4.5.4) You are right. After changing the default compiler to x86_64-pc-linux-gnu-4.6.3 with gcc-config, emerge success to compile and install OpenCV-2.4.2. So, I don't know what you want to do with this bug.
(In reply to comment #7) > (In reply to comment #4) > > (In reply to comment #0) > > > # emerge -pqv '=sys-devel/gcc-4.6.3' > > > [ebuild R ] sys-devel/gcc-4.6.3 USE="cxx fortran gtk mudflap (multilib) > > > nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go > > > -graphite (-hardened) (-libssp) -multislot -nocxx -nopie -nossp -objc > > > -objc++ -objc-gc -test -vanilla" > > > > Build log says: > > -- C++ Compiler: /usr/bin/x86_64-pc-linux-gnu-g++ (ver > > 4.5.4) > > You are right. After changing the default compiler to > x86_64-pc-linux-gnu-4.6.3 with gcc-config, emerge success to compile and > install OpenCV-2.4.2. > > So, I don't know what you want to do with this bug. Don't worry, this bug is perfectly valid. Thanks for the report!
Created attachment 319688 [details] smaller test case
Just for the records: Fails to build with x86_64-pc-linux-gnu-4.5.4, compiles and installs with x86_64-pc-linux-gnu-4.6.3. Portage 2.1.11.9 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r2, 3.4.9-gentoo x86_64) ================================================================= System uname: Linux-3.4.9-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.1 Timestamp of tree: Tue, 09 Oct 2012 22:15:01 +0000 ccache version 3.1.7 [enabled] app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.3-r2 dev-util/ccache: 3.1.7 dev-util/cmake: 2.8.8-r3 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.4, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo last-hope sunrise quantumsummers-dev ultrabug local-overlay ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -mssse3 -msse4" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/nano/" 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/terminfo" CXXFLAGS="-O2 -pipe -march=native -mssse3 -msse4" DISTDIR="/data/distfiles/" EMERGE_DEFAULT_OPTS="--jobs=12 --load-average=12 --keep-going" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles metadata-transfer news noinfo parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.j-schmitz.net/mirror/ http://de-mirror.org/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common" LINGUAS="en" MAKEOPTS="-j12 -l12" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude ChangeLog --delete-excluded" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/last-hope /var/lib/layman/sunrise /var/lib/layman/quantumsummers /var/lib/layman/ultrabug /data/development/local-overlay" SYNC="rsync://rsync.j-schmitz.net/gentoo-portage" USE="X acl acpi alsa amd64 bash-completion branding bzip2 cleartype cli corefonts cracklib cxx dbus dri fortran gdbm glibc-omitfp glitz gnome gnome-keyring gpm gtk iconv libnotify mmx modules mp3 mudflap multilib ncurses nls nptl nvidia opengl openmp pam pcre pppd readline session smp sse sse2 sse3 ssl ssse3 tcpd truetype type1 unicode vdpau x264 xinerama zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="alias auth_basic cgi auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex dav dav_fs dav_lock deflate dir env filter log_config mime rewrite status vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
I don't think this ever got filed upstream and the 4.5 branch is now closed. We'll have to wait for 4.6 to go stable.
*** Bug 440888 has been marked as a duplicate of this bug. ***
*** Bug 442918 has been marked as a duplicate of this bug. ***
I can confirm this bug continues with opencv-2.4.3 and gcc-4.5.4, but does not exist with gcc-4.6.3 . Is there anything we can put in the opencv ebuild to prevent building with the older compiler? It would be nice to prevent this kind of error, because the error message is pretty difficult to find and parse in the output.
I have that bug, too. gcc-config is switched to: x86_64-pc-linux-gnu-4.5.4 # emerge -pvt media-libs/opencv [ebuild U ] media-libs/opencv-2.4.3 [2.3.1a-r1] USE="gstreamer gtk jpeg opengl png threads%* tiff v4l -cuda -doc -eigen -examples -ffmpeg -ieee1394 (-ipp) -jpeg2k -opencl% -openexr -pch% -qt4 -testprograms% -xine (-python%*) (-sse%*) (-sse2%*) (-sse3%) (-ssse3%)" 0 kB /mnt/space/var/tmp/portage/media-libs/opencv-2.4.3/work/OpenCV-2.4.3/modules/calib3d/src/stereosgbm.cpp: In member function ‘virtual void cv::StereoSGBM::operator()(const cv::_InputArray&, const cv::_InputArray&, const cv::_OutputArray&)’: /mnt/space/var/tmp/portage/media-libs/opencv-2.4.3/work/OpenCV-2.4.3/modules/calib3d/src/stereosgbm.cpp:822:6: internal compiler error: in build_polynomial_chrec, at tree-chrec.h:143 # emerge --info Portage 2.1.11.52 (default/linux/amd64/13.0/desktop, gcc-4.6.3, glibc-2.15-r3, 3.7.3-gentoo x86_64) ================================================================= System uname: Linux-3.7.3-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_W3550_@_3.07GHz-with-gentoo-2.1 KiB Mem: 8166252 total, 1491680 free KiB Swap: 8393924 total, 8167644 free Timestamp of tree: Thu, 07 Mar 2013 16:15:01 +0000 ld GNU ld (GNU Binutils) 2.22 app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.3-r2, 3.1.5, 3.2.3 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.10.3, 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.4.5, 4.5.4, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo funroll-loops sabayon ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.schlund.de/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo " LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS=" -j10 " PKGDIR="/mnt/space/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/funroll-loops /var/lib/layman/sabayon" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac accessibility acl acpi alsa amd64 apache2 apng arts audiofile avi bash-completion bitmap-fonts bluetooth bogofilter bzip2 cairo cdda cdio cjk cli consolekit cracklib crypt cups cxx dba dbus device-mapper dillo diskwrite divx dlloader dri dts dvd dvdr emboss encode exif extras faac fam firefox flac flash gd gdbm gif glx gnutls gpm gstreamer gtk gtk2 i810 iconv ide imlib intel ipv6 jpeg lcms ldap libnotify lm_sensors mad mbox mcal menubar mime mmap mmx mng modules mozdevelop mozsvg mp3 mp4 mpeg mplayer mudflap multilib mysql nautilus ncurses nls no-seamonkey noamazon noantlr nobcel nobeanutils nobsf nobsh nocommonslogging nocommonsnet nojsch nojython nolog4j nooro norhino noswing nouveau noxerces nptl nptlonly ogg opengl openmp opera pam pcre pdf php png policykit ppds python qt3support quicktime rar readline restrict-javascript rss sasl sdl session smbsharemodes smime smp spell sqlite sse sse2 ssl startup-notification static-modules svg syslog tcpd threads tiff truetype truetype-fonts type1-fonts udev udisks unicode upower usb v4l vhosts videos vorbis websvccommon winbind www wxwidgets x264 xcb xinerama xml xml2 xnest xv xvid zlib" ABI_X86="64" ALSA_CARDS="snd-intel8x0 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 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 setenvif proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http version" CALLIGRA_FEATURES="kexi words flow plan sheets 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 keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" NETBEANS_MODULES="ide java webcommon xml websvccommon gsf" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vesa nouveau" 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, USE_PYTHON
*** Bug 471342 has been marked as a duplicate of this bug. ***
I was having the same problem when 'x86_64-pc-linux-gnu-4.5.4' was set as my default compiler. For a work-around, I followed the instructions at http://www.gentoo.org/doc/en/gcc-upgrading.xml to change my default compiler from 'x86_64-pc-linux-gnu-4.5.4' to 'x86_64-pc-linux-gnu-4.6.3', and then have been able to 'emerge opencv' successfully.
This bug still exists. It applies to ebuilds in the stable tree. Can we please update the opencv-2.4.5 ebuild to add a build dependency for gcc 4.6.3 or higher? 4.6.3 seems to be the minimum stable gcc that is required to successfully compile.
4.6/4.7 are stable now so it shouldn't be a problem. CCing maintainer in case they feel differently. Note that if you do decide to require >=4.6 it needs to be done by checking the compiler version in pkg_pretend/setup rather than adding a build dependency.
gcc-4.9 is stable now, so throwing away older bugs we don't plan on doing backports for as this should be fixed w/4.9+. please re-open if it's still an issue with 4.9.3+ though.