LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1173|回复: 0

==请教mplayer在--enable-profile条件下make错误的解决方法!!!===

[复制链接]
发表于 2007-7-31 18:25:36 | 显示全部楼层 |阅读模式
想调试mplayer

1. 在--enable-debug条件下,make时出错,错误为:
can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
在 libavcodec/Makefile 的 CFLAGS 加入 -fomit-frame-pointer 參數后,问题解决。

2。在--enable-profile条件下,make时,出错,错误同1中一样,且1中的修改方法不适用。
又在网上找了其他的修改方法(附在后面),仍然报其他错误。

3。我使用虚拟机,SUSE10.1 GCC4.1.0

   请调试过的朋友指教,多谢多谢多谢多谢!!!!!!!!!!!!!


附网上修改方案:
Index: mp3lib/sr1.c
===================================================================
--- mp3lib/sr1.c        (revision 21349)
+++ mp3lib/sr1.c        (working copy)
@@ -411,7 +411,7 @@

     make_decode_tables(outscale);

-#ifdef CAN_COMPILE_X86_ASM
+#if defined(CAN_COMPILE_X86_ASM) && !defined(MP_DEBUG)

#ifdef HAVE_MMX
     if (gCpuCaps.hasMMX)
@@ -463,7 +463,8 @@
        mp_msg(MSGT_DECAUDIO,MSGL_V,"mp3lib: using Pentium optimized decore!\n");
     }
     else
-#endif
+#endif /* CAN_COMPILE_X86_ASM && ! MP_DEBUG */
+
#ifdef HAVE_ALTIVEC
     if (gCpuCaps.hasAltiVec)
     {
Index: mp3lib/Makefile
===================================================================
--- mp3lib/Makefile        (revision 21349)
+++ mp3lib/Makefile        (working copy)
@@ -9,7 +9,9 @@

SRCS = sr1.c
ifeq ($(TARGET_ARCH_X86_32),yes)
+ifeq ($(MP_DEBUG),no)
SRCS += decode_i586.c
+endif
SRCS-$(TARGET_MMX)     += decode_MMX.c dct64_MMX.c tabinit_MMX.c
SRCS-$(TARGET_3DNOW)   += dct36_3dnow.c dct64_3dnow.c
SRCS-$(TARGET_3DNOWEX) += dct36_k7.c dct64_k7.c
Index: configure
===================================================================
--- configure        (revision 21349)
+++ configure        (working copy)
@@ -523,7 +523,7 @@
     _install=`echo $ac_option | cut -d '=' -f 2 `
     ;;
   --enable-profile)
-    _profile='-p'
+    _profile='-pg'
     ;;
   --disable-profile)
     _profile=
@@ -1531,7 +1531,10 @@
# Checking for CFLAGS
_stripbinaries=yes
if test "$_profile" != "" || test "$_debug" != "" ; then
-  CFLAGS="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
+  CFLAGS="-W -Wall -Wextra -O2 $_march $_mcpu $_debug $_profile"
+  _libs_mplayer="$_debug $_profile $_libs_mplayer"
+  _libs_mencoder="$_debug $_profile $_libs_mencoder"
+  _mp_debug="yes"
   if test "$_cc_major" -ge "3" ; then
     CFLAGS=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
   fi
@@ -1542,6 +1545,7 @@
   else
     CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
   fi
+  _mp_debug="no"
else
   _warn_CFLAGS=yes
fi
@@ -7383,6 +7387,7 @@
HAVE_PTHREADS = $_pthreads

HAVE_XVMC_ACCEL = $_xvmc
+MP_DEBUG = $_mp_debug

# for FFmpeg
SRC_PATH=..
Index: libavcodec/cabac.h
===================================================================
--- libavcodec/cabac.h        (revision 7178)
+++ libavcodec/cabac.h        (working copy)
@@ -376,7 +376,7 @@
#define BYTE        "16"
#define BYTEEND     "20"
#endif
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
+#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) && !defined(MP_DEBUG)
     int bit;

#ifndef BRANCHLESS_CABAC_DECODER
@@ -680,7 +680,7 @@

//FIXME the x86 code from this file should be moved into i386/h264 or cabac something.c/h (note ill kill you if you move my code away from under my fingers before iam finished with it!)
//FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard)
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
+#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) && !defined(MP_DEBUG)
static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){
     void *end= significant_coeff_ctx_base + max_coeff - 1;
     int minusstart= -(int)significant_coeff_ctx_base;
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c        (revision 7178)
+++ libavcodec/h264.c        (working copy)
@@ -6139,7 +6139,7 @@
             index[coeff_count++] = last;\
         }
         const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
+#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) && !defined(MP_DEBUG)
         coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
     } else {
         coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);

_______________________________________________
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表