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

Michael Niedermayer michaelni
Thu Mar 8 18:27:02 CET 2007


Hi

On Thu, Mar 08, 2007 at 06:16:46PM +0100, Guillaume Poirier wrote:
> 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?

its conceptually completely wrong, its not that the code cannot work with
PIC and not with a profiler and not with a debuger and depends on gcc
its not even true that it cannot work with all future gcc versions and
PIC ...

what would be correct is:
#if defined(ARCH_X86) && defined(CONFIG_EBP) && defined(CONFIG_EBX)


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070308/6155faa2/attachment.pgp>



More information about the ffmpeg-devel mailing list