Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619024 - =media-libs/opencv-3.2.0 undefined reference to `__cxa_init_primary_exception@CXXABI_1.3.11'
Summary: =media-libs/opencv-3.2.0 undefined reference to `__cxa_init_primary_exception...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-20 08:45 UTC by Ladislav Zitka
Modified: 2017-05-20 13:31 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 Ladislav Zitka 2017-05-20 08:45:58 UTC
While emerging package I faced issue:

[ 26%] ^[[32mBuilding CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/agast.cpp.o^[[0m
cd /tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build/modules/features2d && /usr/bin/x86_64-pc-linux-gnu-g++  -DCVAPI_EXPORTS -D__OPENCV_BUILD=1 -I/tmp/portage/me$
cc1: warning: command line option ‘-std=gnu++98’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=gnu++98’ is valid for C++/ObjC++ but not for C
[ 26%] ^[[32m^[[1mLinking CXX executable ../../bin/opencv_annotation^[[0m
cd /tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build/apps/annotation && /usr/bin/cmake -E cmake_link_script CMakeFiles/opencv_annotation.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++   -march=broadwell -O2 -pipe -g -fno-delete-null-pointer-checks -std=gnu++98   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtu$
/usr/lib64/libtbb.so: undefined reference to `__cxa_init_primary_exception@CXXABI_1.3.11'
/usr/lib64/libtbb.so: undefined reference to `std::__exception_ptr::exception_ptr::exception_ptr(void*)@CXXABI_1.3.11'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:104: bin/opencv_annotation] Error 1
make[2]: Leaving directory '/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build'
make[1]: *** [CMakeFiles/Makefile2:2983: apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 26%] ^[[32mBuilding CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/agast_score.cpp.o^[[0m

my emerge --info:
ares ~ # emerge --info
Portage 2.3.5 (python 3.4.5-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r3, 4.11.1-gentoo x86_64)
=================================================================
System uname: Linux-4.11.1-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3
KiB Mem:    32807336 total,  11286020 free
KiB Swap:   32767996 total,  32767996 free
Timestamp of repository gentoo: Sat, 20 May 2017 07:00:01 +0000
Timestamp of repository poly-c: Fri, 19 May 2017 22:42:40 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
distcc[18502] (dcc_trace_version) distcc 3.2rc1 x86_64-pc-linux-gnu; built Nov 12 2016 14:05:05 [disabled]
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.24.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.14.1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo, 6.2.0-r1::gentoo, 6.3.0::gentoo, 7.1.0-r1::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

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

TAJJADA
    location: /var/lib/layman/TAJJADA
    masters: gentoo
    priority: 50

archenroot
    location: /var/lib/layman/archenroot
    masters: gentoo
    priority: 50

dotnet
    location: /var/lib/layman/dotnet
    masters: gentoo
    priority: 50

fw-overlay
    location: /var/lib/layman/fw-overlay
    masters: gentoo
    priority: 50

poly-c
    location: /var/lib/layman/poly-c
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

seadep
    location: /var/lib/layman/seadep
    masters: gentoo
    priority: 50

ssnb
    location: /var/lib/layman/ssnb
    masters: gentoo
    priority: 50

telred
    location: /var/lib/layman/telred
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=broadwell -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/apache-zookeeper-bin/conf /opt/hbase-1.3.1/conf /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=broadwell -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.fi.muni.cz/pub/linux/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://ftp6.linux.cz/pub/linux/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo-euetib.upc.es/mirror/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/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="/tmp"
USE="X a52 acl alsa alsa-plugin amd64 berkdb bindist bluetooth bzip2 clacklib cli cracklib crypt cxx dbus dri dts ffmpeg fortran gdbm iconv ipv6 javafx jpeg kipi lock modules mtp multilib ncurses networkmanager nls nptl openmp pam pcre policykit pulseaudio readline seccomp session ssl startup-notification tcpd thunar udev udisks unicode v4l v4l2 xattr xinerama zlib" ABI_X86="64" 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" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby24" USERLAND="GNU" VIDEO_CARDS="intel" XFCE_PLUGINS="clock multiload-nandhp power trash" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

I tried to re-emerge tbb library with:
dev-cpp/tbb abi_x86_32

Now compilation works.

NOTE: I was originally on GCC 7 already, but switched back to 5.4 while trying this package to work as I encountered another bug regarding g++ floa128 error which I will target elsewhere, maybe on forum as this is completely experimental
Comment 1 Jonas Stein gentoo-dev 2017-05-20 10:49:00 UTC
Looks normal to me. You have to rebuild dependencies. 
A gcc version change still requires some manual work. 
More about this topic here:
https://wiki.gentoo.org/wiki/Upgrading_GCC

Hence I close the ticket. Perhaps there will be an automatic solution in future.
Comment 2 Ladislav Zitka 2017-05-20 13:31:59 UTC
But I didn't install GCC in this time, I have multiple GCC versions installed and just switch between them (from higher to lower) in case of unexpected/unresolvable bugs.
[1] x86_64-pc-linux-gnu-4.8.5
 [2] x86_64-pc-linux-gnu-4.9.4
 [3] x86_64-pc-linux-gnu-5.4.0 *
 [4] x86_64-pc-linux-gnu-6.2.0
 [5] x86_64-pc-linux-gnu-6.3.0
 [6] x86_64-pc-linux-gnu-7.1.0

To me the issue is that the package doesn't pull in tbb with ABI 32 use flag. Or looks to me so far.