GNOME Bugzilla – Bug 136658
gst-ffmpeg : asm compilation problem
Last modified: 2004-12-22 21:47:04 UTC
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavcodec -DHAVE_AV_CONFIG_H=1 -msse -O0 -ggdb -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 `h263_h_loop_filter_mmx': dsputil_mmx.c:614: error: can't find a register in class `GENERAL_REGS' while reloading `asm' make[8]: *** [libmmxsse_la-dsputil_mmx.lo] Erreur 1 make[8]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg/libavcodec/i386' make[7]: *** [all-recursive] Erreur 1 make[7]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg/libavcodec' make[6]: *** [all-recursive] Erreur 1 make[6]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg' make[5]: *** [all] Erreur 2 make[5]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg' make[4]: *** [all-recursive] Erreur 1 make[4]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg' make[3]: *** [all-recursive] Erreur 1 make[3]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext' make[2]: *** [all-recursive] Erreur 1 make[2]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs' make[1]: *** [all-recursive] Erreur 1 make[1]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg' make: *** [all] Erreur 2 gcc-3.3.3, glibc-2.3.3_pre20040207-r0, linux kernel 2.4.25 Athlon XP
Created attachment 25679 [details] [review] build log when it fails (the usual way i compile it)
Created attachment 25680 [details] build log when it works (building it manually after autoregen with params)
a few observations on the first one: a) [32;01m*[0m Patching ${S}/gst-libs/ext/ffmpeg/ltmain.sh... [33;01m*[0m Could not apply portage.patch! [33;01m*[0m Please verify that it is not needed. [33;01m*[0m Cannot apply any patch, running libtoolize... [32;01m*[0m Patching ${S}/ltmain.sh... [33;01m*[0m Could not apply portage.patch! [33;01m*[0m Please verify that it is not needed. [33;01m*[0m Cannot apply any patch, running libtoolize... 1) why is it trying to do these patches ? 2) why does it run libtoolize ? IMO it shouldn't be trying to do this. b) I cannot see the line it uses to run configure. What does it use ? c) There's a clear warning in the configure run: configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. I think this probably should be heeded, ie don't use --host d) there are some more problems further down during configure: checking whether stripping libraries is possible... yes ./configure: line 20638: test: too many arguments checking math.h usability... yes checking math.h presence... yes checking for math.h... yes checking for log... no checking for log in -lm... yes checking whether compiler understands -Wall... yes ./configure: line 21437: test: too many arguments maybe check what's being tested on those two lines in configure e) This part is giving the error: f /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavcodec -DHAVE_AV_CONFIG_H=1 -msse -O0 -ggdb -MT libmmxsse_la-dsputil_mmx.lo -MD -MP -MF ".deps/libmmxsse_la-dsputil_mmx.Tpo" -c -o libmmxsse_la-dsputil_mmx.lo `test -f 'dsputil_mmx.c' || echo './'`dsputil_mmx.c; \ then mv -f ".deps/libmmxsse_la-dsputil_mmx.Tpo" ".deps/libmmxsse_la-dsputil_mmx.Plo"; else rm -f ".deps/libmmxsse_la-dsputil_mmx.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavcodec -DHAVE_AV_CONFIG_H=1 -msse -O0 -ggdb -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 `h263_h_loop_filter_mmx': dsputil_mmx.c:614: error: can't find a register in class `GENERAL_REGS' while reloading `asm' make[8]: *** [libmmxsse_la-dsputil_mmx.lo] Erreur 1 You said it seems the only difference seems to be -O0 -ggdb right ? Maybe try to use this line manually in that dir, but use -O2 like you do in the other one, and see if that works. If it does, you can be reasonably sure it's a problem with these cflags, but I'm not yet convinced. Basically, the thing to do is to compare both outputs, and compare the differences in environment and invocation between the two runs.
-ggdb sounds like a register-eater. Remove that please? Why don't you "just" use -g?
well, i've found the truth there : http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg03115.html http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg03121.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13850 it seems that this bug was specialy invented for ffmpeg compilation (quite all the first google page is about ffmpeg miscompiling) in the end, -O0 won't work, same for -O2, -O3 ... but -O1 works someone give me a gun