Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 200047

Summary: [gcc-4.3] media-sound/twolame-0.3.10 C99 inline linker error
Product: Gentoo Linux Reporter: Ryan Hill (RETIRED) <rhill>
Component: [OLD] GCC PortingAssignee: Gentoo Sound Team <sound>
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 198121    
Attachments: twolame-0.3.10-gcc43-c99inline.patch
Build log, patch applied and compiler GCC 4.2.2.

Description Ryan Hill (RETIRED) gentoo-dev 2007-11-23 03:40:06 UTC
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.

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/ ../libtwolame/.libs/ -lm
../libtwolame/.libs/ undefined reference to `buffer_putbits'
../libtwolame/.libs/ undefined reference to `buffer_sstell'
../libtwolame/.libs/ 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
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2007-11-23 03:40:44 UTC
Created attachment 136731 [details, diff]
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2007-11-23 10:03:47 UTC
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.
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2007-11-23 23:33:06 UTC
Created attachment 136819 [details, diff]


give this a try.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2007-11-24 00:36:36 UTC
Created attachment 136831 [details, diff]

that was a hack.  please ignore. ;)

this works for me with 4.1.2, 4.2.2, and trunk.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-01-17 09:18:18 UTC
Is this still needed for 0.3.12 (Bug 206309)?
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2008-01-17 09:21:54 UTC
thanks Ryan, I've added twolame-0.3.12 to portage, this is from upstream

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