Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 452476 - games-arcade/performous-0.7.0 - CMakeFiles/performous.dir/webcam.cc.o: In function `~Mat': /usr/include/opencv2/core/mat.hpp:297: undefined reference to `cv::fastFree(void*)'
Summary: games-arcade/performous-0.7.0 - CMakeFiles/performous.dir/webcam.cc.o: In fun...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL: https://tinderboxlogs.s3.amazonaws.co...
Whiteboard:
Keywords: STABLE
Depends on:
Blocks:
 
Reported: 2013-01-16 11:08 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2015-03-31 22:03 UTC (History)
3 users (show)

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


Attachments
performous-0.7.0-r1.ebuild.diff (performous-0.7.0-r1.ebuild.diff,2.45 KB, patch)
2013-01-24 14:32 UTC, Julian Ospald
Details | Diff
performous-0.7.0-cmake.patch (performous-0.7.0-cmake.patch,5.99 KB, patch)
2013-01-24 14:32 UTC, Julian Ospald
Details | Diff
performous-9999.ebuild (performous-9999.ebuild,2.32 KB, text/plain)
2014-07-16 17:08 UTC, jannis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-16 11:08:34 UTC
Portage 2.2.0_alpha149 (hardened/linux/amd64/no-multilib, gcc-4.5.4-asneeded-asneeded-asneeded-asneeded-asneeded-asneeded-asneeded, glibc-2.15-r3, 3.5.4-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.5.4-hardened-r1-x86_64-AMD_Opteron-TM-_Processor_6272-with-gentoo-2.1
Timestamp of tree: Fri, 04 Jan 2013 06:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
ccache version 3.1.8 [disabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.8, 2.7.3-r2, 3.2.3
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
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.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
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
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ggdb -march=native -ftracer -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openfire/resources/security/ /usr/lib64/fax /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind /var/lib/hsqldb /var/lib/neatx/home /var/qmail/control /var/spool/fax/etc /var/spool/munin-async/.ssh /var/vpopmail/etc /var/yp/Makefile"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /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/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -ggdb -march=native -ftracer -frecord-gcc-switches"
DISTDIR="/var/cache/portage/distfiles"
FCFLAGS="-O2 -pipe -ggdb -march=native -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict test test-fail-continue unknown-features-warn unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe -ggdb -march=native -frecord-gcc-switches"
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.hoobly.com/ http://gentoo.llarian.net/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24"
PKGDIR="/usr/portage/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="/tmp"
PORTDIR="/var/cache/tinderbox/tree"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex acl amd64 berkdb bzip2 cli cracklib crypt cups curl cxx dri ffmpeg gdbm gpm hardened iconv introspection ipv6 justify mmx modules mudflap ncurses nls nptl openmp pam pax_kernel pcre plasma pppd qt3support readline semantic-desktop session sse sse2 sse3 sse4 ssl ssse3 tcpd unicode urandom vhosts 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="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" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Julian Ospald 2013-01-24 00:38:58 UTC
seems to be hardened related
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-24 01:13:06 UTC
To me looks more like a problem with GCC or --as-needed.

I don't have access to the Tinderbox right now... but I suppose "cv::fastFree(void*)" is defined in -lopencv or something like that... and I don't see it in the link line.

Yes it is possible that it's declared as inline in the headers, and the developers expected this to work without linking to it, but GCC has its own heuristics on when to inline stuff or not..
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-24 02:21:02 UTC
/usr/lib/libopencv_core.so.2.4.3:00000000000d9aa0 T cv::fastFree(void*)

/usr/include/opencv2/core/core.hpp:CV_EXPORTS void fastFree(void* ptr);

okay this function is NOT inline so it can't be inlined, but there are other opencv functions that _are_ inline, and call it. Which basically makes it not an hardened issue at all.

Just like for boost, using headers but not linking the libraries is not a good idea, even for C++...
Comment 4 Julian Ospald 2013-01-24 11:48:33 UTC
mh, weird, I expected it to fail with gold linker, but it didn't
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-24 11:49:10 UTC
Which version of opencv is that?
Comment 6 Julian Ospald 2013-01-24 14:31:26 UTC
this was due to a broken bundled cmake-module and an automagic dependency, patches incoming
Comment 7 Julian Ospald 2013-01-24 14:32:03 UTC
Created attachment 336712 [details, diff]
performous-0.7.0-r1.ebuild.diff

this is too strong without a revbump
Comment 8 Julian Ospald 2013-01-24 14:32:18 UTC
Created attachment 336714 [details, diff]
performous-0.7.0-cmake.patch
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-24 14:44:02 UTC
Hrm do me a favour and change the boost dependency to dev-libs/boost[threads(+)] please. Otherwise good catch and thanks for getting to the bottom of it :)
Comment 10 Julian Ospald 2013-01-24 17:05:48 UTC
+*performous-0.7.0-r1 (24 Jan 2013)
+
+  24 Jan 2013; Julian Ospald <hasufell@gentoo.org> +performous-0.7.0-r1.ebuild,
+  +files/performous-0.7.0-cmake.patch, metadata.xml:
+  add missing deps, add midi and webcam useflag, fix build time issues wrt
+  #452476, bump EAPI


since old one is STABLE, we need to wait for stabilizing -r1 to close this
Comment 11 Dominique Michel 2013-12-16 09:02:01 UTC
I get that on ~amd64 with performous-0.7.0-r1:

Linking CXX executable itg_pck
cd /var/tmp/portage/games-arcade/performous-0.7.0-r1/work/performous-0.7.0_build/tools && /usr/bin/cmake -E cmake_link_script CMakeFiles/itg_pck.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++   -march=amdfam10 -mcx16 -msahf -mpopcnt -mabm --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=amdfam10 -O2 -pipe  -std=c++98 -Wall -Wextra   -Wl,-O1 -Wl,--as-needed CMakeFiles/itg_pck.dir/itg_pck.cc.o  -o itg_pck -rdynamic -lboost_filesystem-mt -lboost_program_options-mt -lz 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/itg_pck.dir/itg_pck.cc.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: note: '_ZN5boost6system15system_categoryEv' is defined in DSO /usr/lib64/libboost_system.so.1.53.0 so try adding it to the linker command line
/usr/lib64/libboost_system.so.1.53.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
tools/CMakeFiles/itg_pck.dir/build.make:94: recipe for target 'tools/itg_pck' failed
make[2]: *** [tools/itg_pck] Error 1

If I do in the ebuild:

- CMAKE_REMOVE_MODULES_LIST="FindALSA FindBoost FindGettext FindJpeg FindPng FindTiff FindZ"
+ CMAKE_REMOVE_MODULES_LIST="FindALSA FindGettext FindJpeg FindPng FindTiff FindZ"

it work fine.

Should I fill a new bug?
Comment 12 jannis 2014-07-16 17:08:28 UTC
Created attachment 380832 [details]
performous-9999.ebuild

Since even the devs recommend using the current git HEAD instead of the 0.7.0 release, I created a live ebuild for the package. All patches shipped in portage are no longer needed. Builds and works fine here.
Comment 13 Fabian Henze 2014-07-25 16:27:53 UTC
the -9999 ebuild is missing a libsdl2 dependency
Comment 14 Mr. Bones. (RETIRED) gentoo-dev 2015-03-31 22:03:49 UTC
reopen if this is still an issue with performous-1.0