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

Bug 94248

Summary: xine-lib-1.0.1 can't be compiled using gcc4
Product: Gentoo Linux Reporter: Chen Xiangyang <chenxy>
Component: [OLD] GCC PortingAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: High    
Version: 2005.0   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: This patch should fix the bug

Description Chen Xiangyang 2005-05-27 23:36:32 UTC
xine-lib-1.0.1/src/libffmpeg/libavcodec/cputeset.c:
../common.h:73: error: array type has incomplete element type
../common.h:75: error: array type has incomplete element type

xine-lib-1.0.1/src/libffmpeg/libavcodec/i386/dsputil_mmx.c:
dsputil_mmx.c: In function 'h263_h_loop_filter_mmx':
dsputil_mmx.c:633: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'

Reproducible: Always
Steps to Reproduce:
1. emerge xine-lib
2.
3.

Actual Results:  
 gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../include
-I../../../../include -I../../../../src -I../../../../src/xine-engine
-I../../../../src/xine-engine -I../../../../src/xine-utils
-I../../../../src/input -I../../../../src/input -I../../../../lib -DSIMPLE_IDCT
-DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DUSE_FASTMEMCPY -DCONFIG_RISKY
-DCONFIG_DECODERS -DXINE_MPEG_ENCODER -DCONFIG_ZLIB -mtune=pentiumpro -O3 -pipe
-fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4
-mpreferred-stack-boundary=2 -fexpensive-optimizations -fschedule-insns2
-fno-strict-aliasing -ffast-math -finline-functions -Wall -DNDEBUG -D_REENTRANT
-D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wnested-externs -Wcast-align
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -MT cputest.lo -MD
-MP -MF .deps/cputest.Tpo -c cputest.c -o .libs/cputest.o
In file included from ../dsputil.h:31,
                 from cputest.c:5:
../common.h:73: error: array type has incomplete element type
../common.h:75: error: array type has incomplete element type
make[1]: *** [cputest.lo] &#38169;&#35823; 1
make[1]: Leaving directory `/root/xine-lib-1.0.1/src/libffmpeg/libavcodec/i386'

---------------------------------------------------------------------------------

 gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../include
-I../../../../include -I../../../../src -I../../../../src/xine-engine
-I../../../../src/xine-engine -I../../../../src/xine-utils
-I../../../../src/input -I../../../../src/input -I../../../../lib -DSIMPLE_IDCT
-DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DUSE_FASTMEMCPY -DCONFIG_RISKY
-DCONFIG_DECODERS -DXINE_MPEG_ENCODER -DCONFIG_ZLIB -mtune=pentiumpro -O3 -pipe
-fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4
-mpreferred-stack-boundary=2 -fexpensive-optimizations -fschedule-insns2
-fno-strict-aliasing -ffast-math -finline-functions -Wall -DNDEBUG -D_REENTRANT
-D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wnested-externs -Wcast-align
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -MT dsputil_mmx.lo
-MD -MP -MF .deps/dsputil_mmx.Tpo -c dsputil_mmx.c -o .libs/dsputil_mmx.o
dsputil_mmx.c: In function 'h263_h_loop_filter_mmx':
dsputil_mmx.c:633: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
make[1]: *** [dsputil_mmx.lo] &#38169;&#35823; 1
make[1]: Leaving directory `/root/xine-lib-1.0.1/src/libffmpeg/libavcodec/i386'


Expected Results:  
Compiled successfully.

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-4.0.1-beta20050526,
glibc-2.3.5.20050421-r0, 2.6.11-gentoo-r9 i686)
=================================================================
System uname: 2.6.11-gentoo-r9 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="zh_CN.GBK"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/gentoo/local_portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdr cjk crypt cups curl emboss
encode foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imagemagick imlib ipv6
jpeg kde ldap libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl
nptlonly ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime
readline samba sdl spell sse ssl svga tcltk tcpd tiff truetype truetype-fonts
type1-fonts vorbis xine xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 Chen Xiangyang 2005-05-27 23:39:45 UTC
Created attachment 59998 [details, diff]
This patch should fix the bug

For dsputil_mmx.c, I got the patch from Fedora(or somewhere else, Oh, I
forgot).  I don't understand assemblers, but this patch really works.
Comment 2 SpanKY gentoo-dev 2005-05-27 23:41:31 UTC
make sure it works for gcc-3.4 and gcc-3.3. too ...
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-28 01:49:16 UTC
Use ffmpeg flag to use external ffmpeg. 
Changing ffmpeg stuff is not simple and next version of xine will have support 
for gcc4 on its own.