[Ffmpeg-devel] [BUG] Compilation failure when using --disable-opts

Guillaume Poirier gpoirier
Thu Mar 8 18:16:46 CET 2007


Hi,

Panagiotis Issaris wrote:
> Hi,
> 
> When configuring FFmpeg revision 8295 (most recent SVN) to disable
> optimizations (for easier debugging), the cabac.c file fails to compile:
> "can't find a register in class ?GENERAL_REGS? while reloading ?asm?"
> 
> I've tried using several versions of GCC. Any tips on how to fix this?


It's smth I somewhat have very low on my todo list, if case you wanna
takle this issue, here's what I think can be done:
Make configure set in config.h a define whenever any of these are
passed to configure:
--enable-gprof, --enable-debug or --disable-opts


patch cabac.h as follows (syntax is probably wrong, but you'll get the
idea):

Index: cabac.h
===================================================================
--- cabac.h     (revision 8282)
+++ 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) && !(CONFIG_GPROF) &&
!(CONFIG_NO_OPTS) && !(CONFIG_DEBUG) && defined(__GNUC__))
     int bit;

 #ifndef BRANCHLESS_CABAC_DECODER


This should take care of these recurrent compilation issues.
It's not pretty, but it should work.


Michael, what do you think about this?

Guillaume




More information about the ffmpeg-devel mailing list