[MPlayer-dev-eng] --enable-debug=3 make mplayer compilation fails

A Mennucc mennucc1 at debian.org
Sun Mar 25 10:17:55 CEST 2007


Gianluigi Tiesi ha scritto:
> I'm tring to debug mplayer but --enable-debug=3 doesn't work anymore,
> it's related to ffmpeg(libavcodec) but it's built from mplayer
> makefiles.
> 
> cc -I../libswscale   -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I.. -I.. -I../libavutil
> -Wdeclaration-after-statement -W -Wall -Wno-unused-parameter -O2
> -march=pentium4 -mtune=pentium4 -g3  -D_REENTRANT -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/usr/include/directfb
> -I/usr/include -I/usr/include/  -I/usr/include/SDL  -D_REENTRANT
> -I/usr/include/kde/artsc -pthread -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include  -I/usr/include/freetype2 -I/usr/include  -c
> -o h264.o h264.c -w
> cabac.h: In function 'get_cabac_noinline':
> cabac.h:522: error: can't find a register in class 'GENERAL_REGS' while
> reloading 'asm'
> 
> I've added -w to remove warnings and display only the error,
> this was a problem of some files while using -O0 in debug mode,
> but this one fails even with -O2
> 
> Any clue?

hi

i386 CPUs simply  do not have enough registers to compile that code w/o
optimization

I added a few patches in the Debian version to bypass that

--- mplayer-1.0~rc1.orig/libavcodec/Makefile
+++ mplayer-1.0~rc1/libavcodec/Makefile
@@ -300,7 +300,24 @@
 OBJS-$(CONFIG_DVDSUB_PARSER)           += dvdsub.o
 OBJS-$(CONFIG_H261_PARSER)             += h261.o
 OBJS-$(CONFIG_H263_PARSER)             += h263dec.o
+###
+#if --enable-debug is passed to MPlayer's configure, then
+#  OPTFLAGS = '-O4 -ffast-math -fomit-frame-pointer ...'
+# is replaced by '-O2...'
+# but cabac.h cannot be compiled in x86, it fails as follows
+#cabac.h:513: error: can't find a register in class 'GENERAL_REGS'
while reloading 'asm'
+#
+#This was reported as a bug against GCC, in
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13850
+#but is actually not: i386 simply cannot compile that asm w/o those
parameters
+ifeq ($(TARGET_ARCH_X86),yes)
+ifneq ($(CONFIG_DEBUG),)
+h264.o : OPTFLAGS = -O4 -ffast-math -fomit-frame-pointer
+endif
+endif
 OBJS-$(CONFIG_H264_PARSER)             += h264.o
+##
 OBJS-$(CONFIG_MJPEG_PARSER)            += mjpeg.o
 OBJS-$(CONFIG_MPEG4VIDEO_PARSER)       += parser.o
 OBJS-$(CONFIG_MPEGAUDIO_PARSER)        += parser.o




the other patches are for debian/rules, that though is completely
different in Debian :-(

a.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070325/809ce1d1/attachment.pgp>


More information about the MPlayer-dev-eng mailing list