[MPlayer-dev-eng] [PATCH] Mplayer fails to compile with libavcodec from cvs

ismail 'cartman' dönmez ismail.donmez at boun.edu.tr
Tue Dec 2 13:29:42 CET 2003


Before flaming me to hell. I sent a similar message to ffmpeg-devel list. But non of core ffmpeg guys commented. 
So I thought one of the mplayer guys who do ffmpeg development too may care to comment on this.

For about a month mencoder.c fails to compile with :

cc -c -O3 -pipe -mmmx -msse -march=pentium3 -mcpu=pentium3  -D_REENTRANT
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -Ilibmpdemux -Iloader -Ilibvo
-I/usr/X11R6/include/freetype2 -I/usr/X11R6/include    -I/usr/X11R6/include
-I/usr/include  -o mencoder.o mencoder.c
In file included from libavcodec/avcodec.h:15,
                 from mencoder.c:81:
libavcodec/rational.h:35: error: parse error before "__attribute__"
libavcodec/rational.h:43: error: parse error before "__attribute__"
In file included from
                 from /usr/X11R6/include/freetype2/freetype/freetype.h:51,
                 from libvo/font_load.h:6,
                 from mencoder.c:172:
/usr/include/ctype.h:190: error: parse error before "__attribute__"
/usr/include/ctype.h:196: error: parse error before "__attribute__"
make: *** [mencoder.o] Error 1


A little investigation showed that particular definition in libavcodec/common.h :

#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
#    define always_inline __attribute__((always_inline)) inline
#    define always_inline inline

was the problem. Attached path fixors this. My gcc is :

cartman at southpark:~$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld
Thread model: posix
gcc version 3.3.2

Same happens with gcc 3.3 too. Can anyone please comment on this issue?


Joe Random Hacker Since 2002
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common.patch
Type: text/x-diff
Size: 614 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20031202/ea4adbf9/attachment.patch>

More information about the MPlayer-dev-eng mailing list