After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 323665 - gst-ffmpeg-0.10.0 compilation problem with gcc 3.3.5 (dsputil_mmx.c:620: error: can't find a register in class `GENERAL_REGS' while reloading `asm')
gst-ffmpeg-0.10.0 compilation problem with gcc 3.3.5 (dsputil_mmx.c:620: erro...
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-libav
0.10.0
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-09 20:28 UTC by Benjamin Pineau
Modified: 2007-09-10 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Pineau 2005-12-09 20:28:19 UTC
Distribution/Version: Debian 3.1 (Sarge)

gcc 3.3.5 is the default compiler on Debian 3.1 (aka Sarge):
ben$gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
ben$as --version
GNU assembler 2.15

ben$cd gst-ffmpeg-0.10.0/
ben$./configure && make
[...]
dsputil_mmx.c: In function `transpose4x4':
dsputil_mmx.c:620: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'

and the build fails.
As sugested by alley_cat on IRC, compiling with -O3 (env CFLAGS=-O3 ./configure
&& make) fix the problem with this version of gcc.
Comment 1 Edward Hervey 2005-12-09 20:55:59 UTC
hmm... This isn't a problem with gst-ffmpeg, but with ffmpeg. Maybe we could
force CFLAGS to have -O3.
Comment 2 Benjamin Pineau 2005-12-10 01:12:53 UTC
alley_cat , that pointed me to the solution, also said that on his gcc 3.4.4 and
gcc 4.0.1 systems, the build fails whith -O3 (and not with the default -Os). 
So forcing to -O3 as Edward suggested wouldn't be good either.
And yes, the problem is within ffmpeg, not in the gst-ffmpeg specific code, but
we should choose a ffmpeg version that work better when possible (hence this bug
report).
Also, it should be noted that the bug only appear when compiled with -fPIC (as
gst-ffmpeg does). For instance, the compilation from ffmpeg sources (that don't
imply -fPIC), as opposed to compiling from gst, doesn't expose those problems.
Comment 3 Edward Hervey 2006-01-12 11:00:16 UTC
So should we force the CFLAGS to have -O3 ?
Comment 4 Arwed v. Merkatz 2006-01-12 11:15:38 UTC
If you want to force it, only force it for gcc 3.3.x, as it definitely fails to compile in a similar way with -O3 on gcc 3.4 and 4.0
Comment 5 David Schleef 2006-01-12 18:32:42 UTC
AFAICT, -O3 simply hides this behind a bug in gcc.  Or rather, a gcc bug is triggered in very similar situations.  I'd recommend against it, and simply fix the assembly code.
Comment 6 Jan Schmidt 2006-02-21 14:09:33 UTC
I think it's reasonably unlikely we're going to be fixing ffmpeg's assembly code unless someone gives us a patch or one arrives upstream.

I updated our ffmpeg snapshot on the weekend, which may or may not have touched the code in question.
Comment 7 Benjamin Pineau 2006-03-04 20:52:52 UTC
Just FYI, the new snapshot didn't fix the problem (but move it on the file).
Arwed: is there a way to force -03 when autoconf (or whatever) find a gcc 3.3 ?

In file included from dsputil_mmx.c:2492:
h264dsp_mmx.c:49:1: warning: "SBUTTERFLY" redefined
dsputil_mmx.c:1525:1: warning: this is the location of the previous definition
In file included from dsputil_mmx.c:2492:
h264dsp_mmx.c: In function `ff_h264_idct_dc_add_mmx2':
h264dsp_mmx.c:122: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
h264dsp_mmx.c:1050:1: warning: "PUT_OP" redefined
dsputil_mmx.c:2377:1: warning: this is the location of the previous definition
gmake[8]: *** [libmmxsse_la-dsputil_mmx.lo] Error 1
Comment 8 Edward Hervey 2006-10-07 07:03:37 UTC
Benjamin, what about the latest snapshot ? Does it work for you ?
Comment 9 Tim-Philipp Müller 2007-09-10 10:58:58 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!