[Ffmpeg-devel] SVN source (of 20061111) fails to compile

Michael Niedermayer michaelni
Sat Nov 11 20:04:46 CET 2006


Hi

On Sat, Nov 11, 2006 at 01:08:44PM +0200, Ivan Lezhnev Jr. wrote:
> Hello everyone!
> 
> I'm running Slackware 11.0.0 and am trying to compile the latest ffmpeg code 
> (of 20061111) from SVN repository.
> 
> I use:
> 
> > gcc --version
> > gcc (GCC) 3.4.6
[...]
> > h261.o h261.c gcc -I"/home/users/ilj/pkg-area/src/SVN/ffmpeg"/libswscale
> > -DIF2=1  -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> > -D_ISOC9X_SOURCE -I"/home/users/ilj/pkg-area/src/SVN/ffmpeg"
> > -I"/home/users/ilj/pkg-area/src/SVN/ffmpeg"
> > -I"/home/users/ilj/pkg-area/src/SVN/ffmpeg"/libavutil -fomit-frame-pointer
> > -pthread -Wdeclaration-after-statement -Wall -Wno-switch
> > -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -O3 -p  -c -o
> > h264.o h264.c h264.c: In function `hl_decode_mb':
> > h264.c:3661: warning: suggest parentheses around arithmetic in operand of ^
> > h264.c:3667: warning: suggest parentheses around arithmetic in operand of ^
> > h264.c: In function `decode_cabac_residual':
> > h264.c:6143: warning: passing arg 4 of `decode_significance_8x8_x86'
> > discards qualifiers from pointer target type h264.c:6070: warning: unused
> > variable `last'
> > cabac.h: In function `get_cabac_noinline':
> > cabac.h:522: error: can't find a register in class `GENERAL_REGS' while
> > reloading `asm' h264.c: At top level:
> > cabac.h:109: warning: 'put_cabac_static' defined but not used
> > cabac.h:155: warning: 'put_cabac_terminate' defined but not used
> > cabac.h:183: warning: 'put_cabac_u' defined but not used
> > cabac.h:218: warning: 'put_cabac_ueg' defined but not used
> > cabac.h:270: warning: 'refill2' defined but not used
> > cabac.h:808: warning: 'get_cabac_u' defined but not used
> > cabac.h:824: warning: 'get_cabac_ueg' defined but not used
> > make[1]: *** [h264.o] Error 1
> > make[1]: Leaving directory
> > `/home/users/ilj/pkg-area/src/SVN/ffmpeg/libavcodec' make: *** [lib] Error
> > 2
> > ilj at rootbox:~/pkg-area/src/SVN/ffmpeg %
> 
> I talked to some of the residents of #ffmpeg irc channel yesterday concerning 
> this question, and I was advised to edit `cabac.h'. I would if I knew what to 
> do exactly. Unfortunately, I'm not really good at C or whatever language was 
> used to write the file.
> 
> Well, the question is: what's happening actually?
> What does this error mean?

gcc runs out of registers, of course there are enough registers and its
also trivial for gcc to assign the registers 

(you might try to report it to the gcc developers)
but dont expect too much, the gcc devels tend to close most of the asm bugs
without fixing them

> How do I fix it?

report it to the gcc developers, the code in question seems to be

        :"=&a"(bit)
        :"r"(state), "r"(c)
        : "%"REG_c, "%ebx", "%edx", "%esi", "memory"

here there are no m costraints just registers from which all but 2 are
hardcoded its really a miracle how gcc can fail to assign the remaining
2 registers to the 2 r constraints considering that both choices are legal


and simply trying a different gcc version might help, also its important to
use -fomit-frame-pointer -O3 and not -fPIC but you do all that already ...


> 
> I'd appreciate also if you explained to me what these lines mean:
> 
> 1. What is it? I googled for it, but didn't understand what it is :\
> > CMOV enabled     no
> > CMOV is fast     no

cmov is a x86 instruction (conditional move)


> 
> 2. Same. What's it? Do I need it? Where do I get it?
> > AVISynth enabled no

ask some windows users and IIRC someone managed to get it working over
wine somehow ...


> 
> 3. How do I make a choice?
> > static           yes
> > shared           no

--enable-shared / --enable-static


> 
> 4. Same. What is it? When (and if) do I need it?
> > Imlib2 support   no

tried google and grep?


> 
> 5. Same. Do I need it on Linux box?
> > Sun medialib support no

no


> 
> 6. Does fixed/float options exclude each one? I mean I just can select either 
> float or fixed AMR-NB support, correct? Not both simultaneously, right?
> > AMR-NB float support no
> > AMR-NB fixed support yes
> > AMR-WB float support yes
> > AMR-WB IF2 support yes

AFAIK yes


> 
> 7. What does it mean? :)
> > .align is power-of-two no
> 
> Well, this is it.
> 
> I hope this is the right place to ask these questions.
> If not so I apologize in advance.

its the right place for well written bugreports (and yours is well written)
its not really the right place for asking about what all the thinhgs mean
these would be user questions which would be more appropriate for ffmpeg-user

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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list