GNOME Bugzilla – Bug 344603
Compilation errors in gst-ffmpeg when using jhbuild
Last modified: 2007-06-05 11:35:13 UTC
I'm trying to compile gst-ffmpeg with jhbuild on my dapper system (gcc 4.0.3). First I got a compilation error in fdct_mmx.c gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavutil -I../../libavcodec -DHAVE_AV_CONFIG_H=1 -fomit-frame-pointer -Wall -Wno-switch -msse -g -MT libmmxsse_la-fdct_mmx.lo -MD -MP -MF .deps/libmmxsse_la-fdct_mmx.Tpo -c fdct_mmx.c -fPIC -DPIC -o .libs/libmmxsse_la-fdct_mmx.o /tmp/ccrIP1yd.s: Assembler messages: /tmp/ccrIP1yd.s:1992: Error: suffix or operands invalid for `pshufw' This error goes away if I add -O2 or -O3 to the CFLAGS When I added -O3 to the CFLAGS compilation stops at dsputil_mmx.c gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavutil -I../../libavcodec -DHAVE_AV_CONFIG_H=1 -fomit-frame-pointer -Wall -Wno-switch -msse -O3 -MT libmmxsse_la-dsputil_mmx.lo -MD -MP -MF .deps/libmmxsse_la-dsputil_mmx.Tpo -c dsputil_mmx.c -fPIC -DPIC -o .libs/libmmxsse_la-dsputil_mmx.o dsputil_mmx.c: In function 'gmc_mmx': dsputil_mmx.c:2429: warning: suggest parentheses around arithmetic in operand of | dsputil_mmx.c:2429: warning: suggest parentheses around arithmetic in operand of | dsputil_mmx.c:2430: warning: suggest parentheses around arithmetic in operand of | dsputil_mmx.c:2430: warning: suggest parentheses around arithmetic in operand of | dsputil_mmx.c:2430: warning: suggest parentheses around arithmetic in operand of | In file included from dsputil_mmx.c:2622: h264dsp_mmx.c:49:1: warning: "SBUTTERFLY" redefined dsputil_mmx.c:1525:1: warning: this is the location of the previous definition h264dsp_mmx.c:1262:1: warning: "PUT_OP" redefined dsputil_mmx.c:2377:1: warning: this is the location of the previous definition h264dsp_mmx.c: In function 'h264_h_loop_filter_luma_mmx2': dsputil_mmx.c:621: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' dsputil_mmx.c:621: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
I can reproduce this bug on my Dapper.
it's a know issue in upstream ffmpeg AFAIK. Gentoo people also see the same issue (and I think they force optimization flags in the ffmpeg / gst-ffmpeg ebuilds).
Is this still an issue with current cvs ?
I tested with fresh HEAD and got this error: Making all in libpostproc make[7]: entrant dans le répertoire « /home/cassidy/gnome/gst-ffmpeg/gst-libs/ext/ffmpeg/libpostproc » if /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../libavutil -I../libavcodec -fomit-frame-pointer -g -MT postprocess.lo -MD -MP -MF ".deps/postprocess.Tpo" -c -o postprocess.lo postprocess.c; \ then mv -f ".deps/postprocess.Tpo" ".deps/postprocess.Plo"; else rm -f ".deps/postprocess.Tpo"; exit 1; fi mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../libavutil -I../libavcodec -fomit-frame-pointer -g -MT postprocess.lo -MD -MP -MF .deps/postprocess.Tpo -c postprocess.c -fPIC -DPIC -o .libs/postprocess.o In file included from postprocess.c:645: postprocess_template.c: In function 'blockCopy_MMX': postprocess_template.c:3200: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' make[7]: *** [postprocess.lo] Erreur 1 make[7]: quittant le répertoire « /home/cassidy/gnome/gst-ffmpeg/gst-libs/ext/ffmpeg/libpostproc » make[6]: *** [all-recursive] Erreur 1 make[6]: quittant le répertoire « /home/cassidy/gnome/gst-ffmpeg/gst-libs/ext/ffmpeg » make[5]: *** [all] Erreur 2 make[5]: quittant le répertoire « /home/cassidy/gnome/gst-ffmpeg/gst-libs/ext/ffmpeg » make[4]: *** [all-local] Erreur 2 make[4]: quittant le répertoire « /home/cassidy/gnome/gst-ffmpeg/gst-libs/ext » make[3]: *** [all-recursive] Erreur 1 make[3]: quittant le répertoire « /home/cassidy/gnome/gst-ffmpeg/gst-libs/ext » make[2]: *** [all-recursive] Erreur 1 make[2]: quittant le répertoire « /home/cassidy/gnome/gst-ffmpeg/gst-libs » make[1]: *** [all-recursive] Erreur 1 make[1]: quittant le répertoire « /home/cassidy/gnome/gst-ffmpeg »
Problem is that you have to compile -O3 If you add the following line to ~/.jhbuildrc module_autogenargs['gst-ffmpeg'] = autogenargs + ' CFLAGS=-O3' everything compiles fine. I'll close the bug