Here is where it goes wrong: I am using kernel 2.6.1, btw. g++ -c -pipe -Wall -W -O3 -march=athlon-xp -fomit-frame-pointer `freetype-config --cflags` -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DMMX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/include -I../libmyth -I.. -I../libavcodec -I../libavformat -I../libdvbdev -I/usr/qt/3/include -o videoout_xv.o videoout_xv.cpp In file included from ../libavcodec/common.h:164, from ../libavcodec/avcodec.h:14, from videoout_xv.cpp:26: /usr/include/inttypes.h:396: error: parse error before `__attribute__' /usr/include/inttypes.h:414: error: parse error before `__attribute__' /usr/include/inttypes.h:430: error: parse error before `__attribute__' /usr/include/inttypes.h:449: error: parse error before `__attribute__' In file included from ../libavcodec/avcodec.h:15, from videoout_xv.cpp:26: ../libavcodec/rational.h:35: error: parse error before `__attribute__' ../libavcodec/rational.h:43: error: parse error before `__attribute__' In file included from videoout_xv.cpp:26: ../libavcodec/avcodec.h:1936: error: parse error before `}' token make[2]: *** [videoout_xv.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/mythtv-0.13-r1/work/mythtv-0.13/libs/libmythtv' make[1]: *** [sub-libmythtv] Error 2 make[1]: Leaving directory `/var/tmp/portage/mythtv-0.13-r1/work/mythtv-0.13/libs' make: *** [sub-libs] Error 2 !!! ERROR: media-tv/mythtv-0.13-r1 failed. !!! Function src_compile, Line 94, Exitcode 2 !!! compile problem Reproducible: Always Steps to Reproduce: 1.emerge mythtv 2. 3. Actual Results: I be watching the boob tube. Expected Results: I be watching mythtv's compilation error out. Portage 2.0.50_pre19 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040117-r0, 2.6.1-gentoo-r1) ================================================================= System uname: 2.6.1-gentoo-r1 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System version 1.4.3.12 Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.7.8 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://www.gtlib.cc.gatech.edu/pub/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ rsync://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://gentoo.seren.com/gentoo rsync://gentoo.seren.com/gentoo http://gentoo.noved.org/ ftp://gentoo.noved.org/ http://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/ rsync://cudlug.cudenver.edu/gentoo http://gentoo.ccccom.com ftp://gentoo.ccccom.com http://oss.redundant.com/pub/gentoo ftp://oss.redundant.com/pub/gentoo http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo rsync://mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://mirror.tucdemonic.org/gentoo/ http://mirror.clarkson.edu/pub/distributions/gentoo/ http://128.213.5.34/gentoo/ http://lug.mtu.edu/gentoo/ ftp://lug.mtu.edu/gentoo/source rsync://lug.mtu.edu/distfiles" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apm avi berkdb cdr crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls nowin oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcltk tcpd truetype x86 xft xml2 xmms xv zlib"
linux-headers 2.6.x right ? usually that bug only crops up while using -ansi or -pedantic ...
Yeah, headers 2.6.x ... I have neither -ansi nor -pedantic
Not exactly the same bug, but libavcodec related, so this is my output: gcc -c -pipe -w -Wall -O2 -fomit-frame-pointer -march=athlon-xp -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4 -maccumulate-outgoing-args -g -O3 -DPIC -fPIC -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DMMX -DUSING_IVTV -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I../.. -I/usr/qt/3/include -o dsputil_mmx.o i386/dsputil_mmx.c i386/dsputil_mmx.c: En la funci
Not exactly the same bug, but libavcodec related, so this is my output: gcc -c -pipe -w -Wall -O2 -fomit-frame-pointer -march=athlon-xp -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4 -maccumulate-outgoing-args -g -O3 -DPIC -fPIC -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DMMX -DUSING_IVTV -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I../.. -I/usr/qt/3/include -o dsputil_mmx.o i386/dsputil_mmx.c i386/dsputil_mmx.c: En la función `h263_h_loop_filter_mmx': i386/dsputil_mmx.c:614: error: can't find a register in class `GENERAL_REGS' while reloading `asm' make[2]: *** [dsputil_mmx.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/mythtv-0.14/work/mythtv-0.14/libs/libavcodec' make[1]: *** [sub-libavcodec] Error 2 make[1]: Leaving directory `/var/tmp/portage/mythtv-0.14/work/mythtv-0.14/libs' make: *** [sub-libs] Error 2 !!! ERROR: media-tv/mythtv-0.14 failed. !!! Function src_compile, Line 92, Exitcode 2 !!! compile problem
libavcodec's common.h #defines always_inline as __attribute__((always_inline)) inline, which gcc/glibc or somebody else quite recently also does. Thus some lines end up looking like this: __attribute__((__attribute__((always_inline)) inline)) (or even worse...) I guess libavcodec must be patched not to use always_inline as macro name, but something else (__inline is a predefined macro with the same effect as libavcodec
libavcodec's common.h #defines always_inline as __attribute__((always_inline)) inline, which gcc/glibc or somebody else quite recently also does. Thus some lines end up looking like this: __attribute__((__attribute__((always_inline)) inline)) (or even worse...) I guess libavcodec must be patched not to use always_inline as macro name, but something else (__inline is a predefined macro with the same effect as libavcodecä 's always_inline in the given glibc/gcc)
plasmaroo: another 2.6.x headers bug for you to glance at ;)
Created attachment 25084 [details, diff] patch against mythtv This patch makes libavcodec in mythtv compile again, by renaming the always_inline macro to __inline and wrapping the definition into a #ifdef, so it will work regardless of __inline being predefined or not.
Hmm, MythTV compiled without any errors here. Am I missing some use flags? Try upgrading your linux-headers to the latest version in portage [ just sync and re-merge ] as I think this has been fixed in "include/linux/compiler-gcc3.h" a while ago.
compiling with -march=athlon-xp -Os results in an error compiling with -O2 -pipe (no march, no -O optimization) compiles perfectly
There haven't been any comments on this for a quite a while now, and media-tv/mythtv-0.15.1 compiles fine here on linux-headers-2.6.7 so I'm closing this as FIXED. If anybody still has issues with MythTV on 2.6 series headers then please reopen this bug. Thanks!
Unfortunately I have add something to this bug ... compiling mythtv fails with this "can't find a register in class `GENERAL_REGS' while reloading `asm'" message. I changed my CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" to "... -O1 ..." and as it's compiling for several mins now I guess this did it. Reading http://mythtv.org/pipermail/mythtv-dev/2003-December/016924.html I found out this might be a libavcodec problem. Sorry, no more ideas.
your bug has nothing to do with this bug, please dont post unrelated information to bugs the problem you're seeing is related to PIC, not 2.6 headers