[Ffmpeg-devel] compilation troubles with cvs

Ronald S. Bultje rbultje
Wed Apr 12 23:35:38 CEST 2006


Hi,

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'

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?).

(gcc 4.0.1, if it matters.)

Cheers,
Ronald





More information about the ffmpeg-devel mailing list