Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195649 - media-libs/raptor-1.4.16 fails to build - need for libmath -lm gcc option
Summary: media-libs/raptor-1.4.16 fails to build - need for libmath -lm gcc option
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 195738 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-12 18:28 UTC by Jan Bessai
Modified: 2007-10-13 22:06 UTC (History)
1 user (show)

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


Attachments
raptor-1.4.16.ebuild (raptor-1.4.16.ebuild,1.29 KB, text/plain)
2007-10-13 10:49 UTC, Matteo Azzali (RETIRED)
Details
raptor-lm.patch (raptor-lm.patch,502 bytes, patch)
2007-10-13 12:01 UTC, Matteo Azzali (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bessai 2007-10-12 18:28:37 UTC
On my ~AMD64 Gentoo media-libs/raptor-1.4.16 fails to build. Error occurs with -uD world and revdep-rebuild.
According to Google the error is a missing -lm (libmath) link flag for gcc.
See also: http://forums.gentoo.org/viewtopic-t-598109.html

Reproducible: Always

Steps to Reproduce:
1.# emerge raptor-1.4.16

Actual Results:  

/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -O3 -march=nocona -fomit-frame-pointer -pipe -mmmx -msse -msse2 -mfpmath=sse -ftree-vectorize   -o rapper rapper.o  ../src/libraptor.la -lexpat
mkdir .libs
x86_64-pc-linux-gnu-gcc -O3 -march=nocona -fomit-frame-pointer -pipe -mmmx -msse -msse2 -mfpmath=sse -ftree-vectorize -o .libs/rapper rapper.o  ../src/.libs/libraptor.so /usr/lib64/libexpat.so
../src/.libs/libraptor.so: undefined reference to `trunc'
../src/.libs/libraptor.so: undefined reference to `round'
../src/.libs/libraptor.so: undefined reference to `fmod'
../src/.libs/libraptor.so: undefined reference to `pow'
collect2: ld returned 1 exit status
Comment 1 Matteo Azzali (RETIRED) gentoo-dev 2007-10-13 10:49:40 UTC
Created attachment 133320 [details]
raptor-1.4.16.ebuild

Proposed ebuild:
Working on X86 (it had the same issue here).
I just used flag-o-matic and added "append-ldflags -lm"
line at start of src_compile()
Comment 2 Alexis Ballier gentoo-dev 2007-10-13 10:52:27 UTC
(In reply to comment #1)

> I just used flag-o-matic and added "append-ldflags -lm"

wont that fail with --as-needed ?
Comment 3 Matteo Azzali (RETIRED) gentoo-dev 2007-10-13 11:37:44 UTC
Comment on attachment 133320 [details]
raptor-1.4.16.ebuild

That's the way suggested at:
http://devmanual.gentoo.org/ebuild-writing/functions/src_compile/build-environment/index.html

However you're right according to:
http://www.gentoo.org/proj/en/qa/asneeded.xml
the -lm flag is no more inserted with append-ldflags, checking what other did.
Comment 4 Matteo Azzali (RETIRED) gentoo-dev 2007-10-13 12:01:45 UTC
Created attachment 133324 [details, diff]
raptor-lm.patch

I don't know how much it's hackish, but this for sure avoid putting -lm
before --as-needed.
Comment 5 Alexis Ballier gentoo-dev 2007-10-13 13:18:26 UTC
should be fixed now, I just appended -lm to LIBS variable which is used for linking.

also sent a different patch upstream
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-10-13 22:06:18 UTC
*** Bug 195738 has been marked as a duplicate of this bug. ***