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
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()
(In reply to comment #1) > I just used flag-o-matic and added "append-ldflags -lm" wont that fail with --as-needed ?
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.
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.
should be fixed now, I just appended -lm to LIBS variable which is used for linking. also sent a different patch upstream
*** Bug 195738 has been marked as a duplicate of this bug. ***