GCC 4.3 changes the meaning of "inline" with -std=c99 to correspond with the C99 standard. This causes an undefined reference error when linking media-sound/twolame. The attached patch backported from twolame cvs fixes this by using extern inline instead. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31389 http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html http://sourceforge.net/tracker/index.php?func=detail&aid=1691689&group_id=136040&atid=735435 x86_64-pc-linux-gnu-gcc -I../build/ -I../libtwolame/ -O2 -g -march=native -fomit-frame-pointer -pipe -std=c99 -Wunused -Wall -O3 -Wl,-O1 -Wl,--hash-style=gnu -o .libs/twolame frontend.o /usr/lib64/libsndfile.so ../libtwolame/.libs/libtwolame.so -lm ../libtwolame/.libs/libtwolame.so: undefined reference to `buffer_putbits' ../libtwolame/.libs/libtwolame.so: undefined reference to `buffer_sstell' ../libtwolame/.libs/libtwolame.so: undefined reference to `buffer_put1bit' collect2: ld returned 1 exit status make[1]: *** [twolame] Error 1 make[1]: Leaving directory `/var/tmp/portage/media-sound/twolame-0.3.10/work/twolame-0.3.10/frontend' make: *** [all-recursive] Error 1
Created attachment 136731 [details, diff] twolame-0.3.10-gcc43-c99inline.patch
Created attachment 136747 [details] Build log, patch applied and compiler GCC 4.2.2. And with this patch, it breaks building with GCC 4.2.2, can't apply.
Created attachment 136819 [details, diff] twolame-0.3.10-gcc43-c99inline.patch bah. give this a try.
Created attachment 136831 [details, diff] twolame-0.3.10-gcc43-c99inline.patch that was a hack. please ignore. ;) this works for me with 4.1.2, 4.2.2, and trunk.
Is this still needed for 0.3.12 (Bug 206309)?
thanks Ryan, I've added twolame-0.3.12 to portage, this is from upstream changelog: What is new in TwoLAME ====================== Version 0.3.12 (2008-01-09) --------------------------- - Fixed 'inline' for the forthcoming gcc-4.3 * thanks to Martin Michlmayr for patch