Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 200047 - [gcc-4.3] media-sound/twolame-0.3.10 C99 inline linker error
Summary: [gcc-4.3] media-sound/twolame-0.3.10 C99 inline linker error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.3
  Show dependency tree
 
Reported: 2007-11-23 03:40 UTC by Ryan Hill (RETIRED)
Modified: 2008-01-17 09:21 UTC (History)
0 users

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


Attachments
twolame-0.3.10-gcc43-c99inline.patch (twolame-0.3.10-gcc43-c99inline.patch,417 bytes, patch)
2007-11-23 03:40 UTC, Ryan Hill (RETIRED)
Details | Diff
Build log, patch applied and compiler GCC 4.2.2. (blah.txt,24.55 KB, text/plain)
2007-11-23 10:03 UTC, Samuli Suominen (RETIRED)
Details
twolame-0.3.10-gcc43-c99inline.patch (twolame-0.3.10-gcc43-c99inline.patch,973 bytes, patch)
2007-11-23 23:33 UTC, Ryan Hill (RETIRED)
Details | Diff
twolame-0.3.10-gcc43-c99inline.patch (twolame-0.3.10-gcc43-c99inline.patch,502 bytes, patch)
2007-11-24 00:36 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.

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
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2007-11-23 03:40:44 UTC
Created attachment 136731 [details, diff]
twolame-0.3.10-gcc43-c99inline.patch
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]
twolame-0.3.10-gcc43-c99inline.patch

bah.

give this a try.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2007-11-24 00:36:36 UTC
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.
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
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