[FFmpeg-devel] [PATCH] Fix sparc + gcc 4.3 build

Måns Rullgård mans
Tue Dec 9 16:12:46 CET 2008

Alexis Ballier wrote:
> Hi,
> currently building ffmepg on sparc with gcc 4.3 fails with undefined
> references to ff_simple_idct_vis:
> gcc -L"/root/ffmpeg"/libavdevice -L"/root/ffmpeg"/libavformat
> -L"/root/ffmpeg"/libavcodec -L"/root/ffmpeg"/libavutil -rdynamic
> -export-dynamic -Wl,--warn-common -Wl,--as-needed
> -Wl,-rpath-link,"/root/ffmpeg"/libpostproc
> -Wl,-rpath-link,"/root/ffmpeg"/libswscale
> -Wl,-rpath-link,"/root/ffmpeg"/libavfilter
> -Wl,-rpath-link,"/root/ffmpeg"/libavdevice
> -Wl,-rpath-link,"/root/ffmpeg"/libavformat
> -Wl,-rpath-link,"/root/ffmpeg"/libavcodec
> -Wl,-rpath-link,"/root/ffmpeg"/libavutil -Wl,-Bsymbolic -o ffmpeg_g
> ffmpeg.o cmdutils.o -lavdevice -lavformat -lavcodec -lavutil -lz -lbz2
> -lm -ldl -ldl
> /root/ffmpeg/libavcodec/libavcodec.a(dsputil_vis.o): In function
> `dsputil_init_vis':
> /root/ffmpeg/libavcodec/sparc/dsputil_vis.c:4009: undefined reference
> to `ff_simple_idct_vis'
> /root/ffmpeg/libavcodec/sparc/dsputil_vis.c:4009: undefined reference
> to `ff_simple_idct_vis'
> collect2: ld returned 1 exit status
> This is because ff_simple_idct_vis is declared with the inline keyword
> and now gcc optimizes this out. There are other ways of fixing it
> (e.g. by adding 'extern void ff_simple_idct_vis(DCTELEM *data);' in
> sparc/simple_idct_vis.c), maybe someone will have a better idea or
> prefer this one, but since ff_simple_idct_mmx is not declared as
> inline the proposed patch removes the inline keyword which fixes the
> linking.

The inline specifier on that function seems rather useless since
it is never called in the same file.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list