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

Diego Biurrun diego
Tue Dec 9 21:10:57 CET 2008


On Tue, Dec 09, 2008 at 03:12:46PM +0000, M?ns Rullg?rd wrote:
> 
> Alexis Ballier wrote:
> >
> > 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.

Very well, patch applied then.

Diego




More information about the ffmpeg-devel mailing list