Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485896 - media-libs/lib3ds-2.0.0_rc1 with ld.gold - 3ds2obj.c:139: error: undefined reference to 'pow'
Summary: media-libs/lib3ds-2.0.0_rc1 with ld.gold - 3ds2obj.c:139: error: undefined re...
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:
Whiteboard:
Keywords: PATCH
: 486132 (view as bug list)
Depends on:
Blocks: underlinking
  Show dependency tree
 
Reported: 2013-09-24 19:53 UTC by Peter Asplund
Modified: 2013-09-27 13:55 UTC (History)
2 users (show)

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


Attachments
New ebuild (lib3ds-2.0.0_rc1.ebuild,790 bytes, text/plain)
2013-09-24 20:24 UTC, Peter Asplund
Details
patch for Makefile.am (lib3ds-2.0.0_rc1-libm-dependency.patch,236 bytes, patch)
2013-09-24 20:25 UTC, Peter Asplund
Details | Diff
lib3ds-2.0.0_rc1-underlinking.patch (lib3ds-2.0.0_rc1-underlinking.patch,547 bytes, patch)
2013-09-26 15:45 UTC, Julian Ospald
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Asplund 2013-09-24 19:53:43 UTC
It fails with the same error that I've seen in other packages, and I think it's because of GCC 4.8, but I'm not completely sure.

...
208 make[3]: Entering directory `/var/tmp/portage/media-libs/lib3ds-2.0.0_rc1/work/lib3ds-20080909/examples/3ds2obj'
209 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src    -march=native -O2 -pipe -c 3ds2obj.c
210 /bin/sh ../../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -march=native -O2 -pipe  -Wl,--as-needed -o 3ds2obj 3ds2obj.o ../../src/lib3ds.la
211 mkdir .libs
212 x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -Wl,--as-needed -o .libs/3ds2obj 3ds2obj.o  ../../src/.libs/lib3ds.so
213 /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld: 3ds2obj.o: undefined reference to symbol 'pow@@GLIBC_2.2.5'
214 /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'pow@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
215 /lib64/libm.so.6: could not read symbols: Invalid operation
216 collect2: error: ld returned 1 exit status


Reproducible: Always

Steps to Reproduce:
1. Try to emerge lib3ds



Portage 2.2.7 (default/linux/amd64/13.0/desktop/gnome, gcc-4.8.0, glibc-2.17, 3.11.1-gentoo x86_64)
=================================================================
System uname: Linux-3.11.1-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.2
KiB Mem:    12305640 total,   3447636 free
KiB Swap:   12418208 total,  12418208 free
Timestamp of tree: Tue, 24 Sep 2013 17:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r2, 3.2.5-r2, 3.3.2-r2
dev-util/ccache:          3.1.9-r1
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.6.4, 4.8.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo x11 multimedia sunrise seden qt steam-overlay dotnet AzP
Installed sets: @system
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 /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/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /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="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=19 --keep-going"
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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://ftp.uoi.gr/mirror/OS/gentoo/"
LANG="en_EN.UTF-8"
LDFLAGS="-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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/multimedia /var/lib/layman/sunrise /var/lib/layman/seden /var/lib/layman/qt /var/lib/layman/steam /var/lib/layman/dotnet /usr/local/portage"
USE="32bit 3dnow 3dnowext 64bit S3TC X a52 aac aalib acl acpi alsa amazon amd64 amr amrnb amrwb apng asf aspell autoipd avahi avi bash-completion bidi binary-drivers bineditor bluetooth bookmarks branding bzip2 c++0x cairo ccache cdda cdr cg cgi cleartype cli clutter cmake colord cover coverart cracklib crypt css cue cups curl custom-optimization cxx daap dbus dconf debugger device-mapper devil dga dirac divx dmx dns dri dts dvd dvdr dvdread emboss encode evo exif fakevim fam fastcgi fat fbcon ffmpeg firefox flac fluidsynth fontconfig fortran fpm freeimage ftp fuse g3dvl gaim gbm gd gdbm gdu gflags ggi gif gimp git glamor glib glut gmail gmailtimestamps gmedia gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk2 gtk3 gtkhtml gvim gzip h224 h281 h323 howl-compat hpijs iconv icq icu idn imap inotify introspection iphone ipod ipv6 jabber java java6 jingle jpeg jpeg2k kde kdrive lame lcms ldap libnotify libsecret libsexy libssh2 libv4l libv4l2 lm_sensors mad madwifi mbox md5sum mdnsresponder-compat mh midi mikmod mime minizip mmx mmxext mng moc mod modplug modules mozembed mozilla moznocompose moznoirc moznomail moznoroaming mozsha1 mozsvg mp2 mp3 mp4 mp4live mpeg msn mudflap multilib multimedia musepack musicbrainz nas nautilus ncurses nemesi networkmanager new-hpcups nfsv41 nls nptl nsplugin ntfs ntfsprogs nx ofa ogg openal opencore-amr opengl openmp openssl opensslcrypt openvg optimization pam pango pcntl pcre pdf pdflib perl php pidgin pipechan png pnm policykit pop ppds private-headers pulseaudio pvr python python3 qml qt3support qt4 qtscript quicktime radio raw rdesktop readline realmedia reiser4 reiserfs rtc s3tc samba sasl schroedinger scintilla sdl secure-delete session sid sip sndfile socialweb sockets spell sql sqlite srt sse sse2 sse4.1 sse4.2 ssh ssl ssse3 startup-notification steamruntime subtitles subversion suid svg systemd tcpd telepathy teletext tga theora threads tiff tls transcode truetype udev udisks unicode upcall upnp upower usb v4l v4l2 vaapi valgrind vdpau video videos vim vim-pager vim-syntax vim-with-x vorbis vte wav wavpack webdav webdav-neon webdav-serf webkit webkit2 webm wifi winbind wma wma-fixed wmf wmp wxwidgets x264 xanim xattr xcb xcomposite xdmcp xext xfs xinerama xml xrandr xulrunner xv xvid xvmc zeitgeist zeroconf zip zlib zoran" ABI_X86="64" ALSA_CARDS="emu10k1 hda_intel" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="openssl" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en sv" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="i386 arm x86_64" QEMU_USER_TARGETS="i386 arm x86_64" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 1 Peter Asplund 2013-09-24 20:24:44 UTC
Created attachment 359390 [details]
New ebuild

I've tried doing a patch, adding the -lm to LDFLAGS, but it doesn't quite work yet.
Comment 2 Peter Asplund 2013-09-24 20:25:46 UTC
Created attachment 359392 [details, diff]
patch for Makefile.am

My experience with Autotools is bleak to say the least, but here I'm trying to add -lm to LDFLAGS. Doesn't work though.
Comment 3 Alexandre 2013-09-26 07:55:18 UTC
I have the same problem here.
You are not alone
Comment 4 Peter Asplund 2013-09-26 08:44:18 UTC
Both bugs 417995 and 463696 are the same issue. It's a simple fix, just add a linker dependency to libm (-lm), but my Autotools fuu isn't great enough to fix it.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-26 13:07:47 UTC
Comment on attachment 359390 [details]
New ebuild

--- lib3ds-2.0.0_rc1.ebuild     2013-09-24 14:49:47.479801176 +0200
+++ -   2013-09-26 15:06:46.583105669 +0200
@@ -1,8 +1,10 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/media-libs/lib3ds/lib3ds-2.0.0_rc1.ebuild,v 1.6 2013/09/22 12:45:27 ago Exp $
-
 EAPI=5
+
+inherit eutils
+
 MY_PV="20080909"
 MY_P="${PN}-${MY_PV}"
 
@@ -22,6 +24,10 @@
 DEPEND="${RDEPEND}
        app-arch/unzip"
 
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-2.0.0_rc1-libm-dependency.patch
+}
+
 src_install() {
        emake DESTDIR="${D}" install
        dodoc AUTHORS ChangeLog README

You are patching Makefile.am, so you should also inherit autotools and run eautoreconf in src_prepare().
Comment 6 Julian Ospald 2013-09-26 15:45:20 UTC
Created attachment 359542 [details, diff]
lib3ds-2.0.0_rc1-underlinking.patch

that wasn't the correct place to add "-lm"
Comment 7 Julian Ospald 2013-09-26 18:57:02 UTC
+  26 Sep 2013; Julian Ospald <hasufell@gentoo.org> lib3ds-2.0.0_rc1.ebuild,
+  +files/lib3ds-2.0.0_rc1-underlinking.patch,
+  +files/lib3ds-2.0.0_rc1-underlinking-no-autoreconf.patch:
+  fix underlinking wrt #485896
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-27 13:55:15 UTC
*** Bug 486132 has been marked as a duplicate of this bug. ***