[Ffmpeg-devel] compilation troubles with cvs
Thu Apr 13 07:40:04 CEST 2006
On 4/12/06, Ronald S. Bultje <rbultje at ronald.bitfreak.net> wrote:
> I've got some issues compiling code with -fPIC in CVS. Specifically,
> snowdsp_mmx.c fails:
> snowdsp_mmx.c: In function 'ff_snow_vertical_compose97i_sse2':
> snowdsp_mmx.c:461: error: PIC register '%ebx' clobbered in 'asm'
> snowdsp_mmx.c: In function 'ff_snow_vertical_compose97i_mmx':
> snowdsp_mmx.c:568: error: PIC register '%ebx' clobbered in 'asm'
> snowdsp_mmx.c: In function 'inner_add_yblock_bw_8_obmc_16_mmx':
> snowdsp_mmx.c:869: error: PIC register '%ebx' clobbered in 'asm'
This is a known problem: part of Snow's simd assembly code uses some
registers reserved when you wanna compile with -fPIC. One solution I
see would be to somehow create a configure switch to tell if you want
to compile with -fPIC support, and #ifdef the offending parts.
Another solution would be to push/pop %ebx at the beginning/end of the
asm block, but I don't know if it's legal.
I'm not interested in doing it though, so if you care about -fPIC
support, well, send a patch! ;)
> Besides, the 3dnow code (fft_3dn2.c) also fails (this is on a P-III). I
> Don't think this is related to the use of -fPIC:
> fft_3dn2.c: In function 'ff_fft_calc_3dn2':
> fft_3dn2.c:66: warning: implicit declaration of function '_m_pswapd'
> fft_3dn2.c:66: error: incompatible types in assignment
> fft_3dn2.c:105: error: incompatible types in assignment
> fft_3dn2.c:106: error: incompatible types in assignment
> fft_3dn2.c:112: warning: implicit declaration of function '_m_pfpnacc'
> fft_3dn2.c:112: error: incompatible types in assignment
> fft_3dn2.c:113: error: incompatible types in assignment
> On my system, __3dNOW_A__ is not defined inside mm3dnow.h, causing those
> functions to be undeclared (I guess those are compiler-internal
> macros?). Declaring __3dNOW_A__ (probably not a good idea, but hey, it's
> just for testing) doesn't do much good, it complains about incompatible
> type assignments. The only way to get it to compile is to actually
> disable the whole 3dnow2 thing (e.g. by adding an additional #ifdef
> __3dNOW_A__ in fft_3dn2.c), which doesn't sound right (I mean, CPU type
> should be runtime-detected, right?).
I am disillusioned enough to know that no man's opinion on any subject
is worth a damn unless backed up with enough genuine information to
make him really know what he's talking about.
-- H. P. Lovecraft (about the flamewars on FFmpeg and MPlayer-dev mailing lists)
More information about the ffmpeg-devel