Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377253 - media-libs/raptor-2.0.4 compile error
Summary: media-libs/raptor-2.0.4 compile error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 10:10 UTC by Christian Schmitt
Modified: 2011-09-11 19:24 UTC (History)
7 users (show)

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


Attachments
compile log of raptor 2.0.4 (raptot_log.txt,43.63 KB, text/plain)
2011-08-01 10:10 UTC, Christian Schmitt
Details
configure.ac patch for -lm test (raptor-2.0.4-configure.patch,674 bytes, patch)
2011-09-11 15:57 UTC, Brennan Shacklett
Details | Diff
media-libs/raptor-2.0.4 ebuild patch (raptor-2.0.4.ebuild.patch,525 bytes, patch)
2011-09-11 16:05 UTC, Brennan Shacklett
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Schmitt 2011-08-01 10:10:55 UTC
Created attachment 281713 [details]
compile log of raptor 2.0.4

The update to 2.0.4 does not work as this version shows compile/linking issues (see attached log file).


emerge --info
Portage 2.2.0_alpha49 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r4, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-AMD_Phenom-tm-_II_X4_905e_Processor-with-gentoo-2.0.3
Timestamp of tree: Mon, 01 Aug 2011 09:30:02 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r2, 3.2-r2
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.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
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo kde gamerlay-stable scarabeus_local_overlay custom
Installed sets: @kdebase-4.7, @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
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"
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/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news nodoc noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/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="/usr/local/overlay/kde /usr/local/overlay/gentoo-games /usr/local/overlay/scarabeus /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acpi alsa amd64 branding bzip2 cairo cdda cdr cli consolekit cracklib crypt css cups cxx dbus declarative device-mapper dri dts dvb dvd dvdr emboss encode exif fam ffmpeg firefox flac gdbm gdu geos gif iconv ieee1394 ipv6 jpeg jpeg2k kde kipi lcms lm_sensors lzma mad mjpeg mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nptl nptlonly ogg openexr opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pppd qt3support qt4 quicktime readline sdl semantic-desktop session smp sse sse2 sse3 ssl startup-notification svg sysfs theora threads tiff truetype udev unicode usb v4l2 vcd vorbis vpx x264 xcb xcomposite xorg xscreensaver xv xvid xvmc 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="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="braindump flow karbon kexi kpresenter krita tables words" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="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" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rafał Mużyło 2011-08-01 11:32:15 UTC
A classic '--as-needed' problem.
As usual, fix should be trivial - libraptor needs to link with libm.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2011-08-08 17:32:32 UTC
> checking for trunc and round in default libs... yes

seems the check for this runs without -Wl,--as-needed
then it finds the functions indirectly linked from -lm
then it assumes -lm is not required in $LIBS
then -Wl,--as-needed kicks in actual build
the -lm is missing
build fails

or did i miss something? :)

fun
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2011-08-09 13:13:47 UTC
(In reply to comment #3)
> Using the old patch it compiled fine:
> 
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/raptor/files/raptor-1.4.16-lm.patch?hideattic=0&view=markup

The patch for conditional applying -lm to $LIBS in configure.ac exists for reason, so obviously the patch is invalid for by-passing it

A workaround at best
Comment 5 Kamen Dokov 2011-08-19 13:00:27 UTC
Kde-4.7.0 wants soprano-2.7.0 that depends on raptor-2.0.4 *sighs*
As result I`m masking kde-4.7.0 ... I need the other updates.
Comment 6 Magnus Johansson 2011-08-19 13:52:37 UTC
If you add the xml use flag to raptor, this error does not occur and you will be able to emerge KDE 4.7.
Comment 7 Kamen Dokov 2011-08-19 14:31:40 UTC
(In reply to comment #6)
> If you add the xml use flag to raptor, this error does not occur and you will
> be able to emerge KDE 4.7.

Thank you!
You are very kind!
Comment 8 Brennan Shacklett 2011-09-04 21:23:32 UTC
I believe the problem is that the c test program in configure.ac which checks if trunc and round are in the default libs will always succeed, because the values passed to trunc and round are constants, so gcc will always calculate the values at compile time. Therefore the trunc and round functions will never be called, and never linked in, so the test program compiles fine and -lm is not added to $LIBS. I don't have the expertise to known if the test should be written differently or if a different mechanism entirely should be used, but if someone would point me in the right direction I would gladly make a patch...
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2011-09-09 10:41:32 UTC
Comment #8 seemed to be right, the fix should be available here:

https://github.com/dajobe/rasqal/commit/ebaf077d71337e5e56b9dcf82449932aae00a2fe

(Thanks to upstream, dajobe)

Anyone can confirm? Needs autotools and eutils eclasses, epatch and eautoreconf.
Comment 10 Brennan Shacklett 2011-09-11 06:02:09 UTC
I can confirm that it works in normal circumstances, but not if the package is built with gcc 4.6 and -Ofast, because the calls once again get optimized out by the linking phase.
If that is not a concern I can provide the ebuild and patch I used to test.
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2011-09-11 12:01:06 UTC
(In reply to comment #10)
> I can confirm that it works in normal circumstances, but not if the package is
> built with gcc 4.6 and -Ofast, because the calls once again get optimized out
> by the linking phase.
> If that is not a concern I can provide the ebuild and patch I used to test.

-Ofast is not supported, and we don't need to worry about it
if someone wants to break his system, let him... :)
Comment 12 Brennan Shacklett 2011-09-11 15:57:11 UTC
Created attachment 286135 [details, diff]
configure.ac patch for -lm test

This patch uses trunc() and round() to test rather than ceil() like the upstream patch, because in 2.0.4 the test is for trunc() and round() not ceil(). The results are exactly the same though.
Comment 13 Brennan Shacklett 2011-09-11 16:05:34 UTC
Created attachment 286137 [details, diff]
media-libs/raptor-2.0.4 ebuild patch

This ebuild patches configure.ac and then runs eautoreconf.
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2011-09-11 19:14:20 UTC
(In reply to comment #12)
> Created attachment 286135 [details, diff]
> configure.ac patch for -lm test
> 
> This patch uses trunc() and round() to test rather than ceil() like the
> upstream patch, because in 2.0.4 the test is for trunc() and round() not
> ceil(). The results are exactly the same though.

upstreams reply to your comment (for rasqal only, since raptor-2.0.5 won't need the test anymore it appears):

http://github.com/dajobe/rasqal/commit/a475478a9e6b9803f317861c4471440755f5fa3d
http://github.com/dajobe/rasqal/commit/ad75685b99f321395f4bd65d5e2e66642eb9ab6f

"22:11 <@dajobe> ssuominen: the same approach but I think whatever works for you since raptor 2.0.5 won't need the test"
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2011-09-11 19:24:27 UTC
+  11 Sep 2011; Samuli Suominen <ssuominen@gentoo.org> raptor-2.0.4.ebuild,
+  +files/raptor-2.0.4-fix_math_test.patch:
+  Fix mathlib test wrt #377253 by Brennan Shacklett and Dave Beckett (upstream)