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

Alexis Ballier alexis.ballier
Tue Dec 9 15:49:59 CET 2008


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"/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
/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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc_gcc43.patch
Type: application/octet-stream
Size: 456 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081209/fa49adc4/attachment.obj>

More information about the ffmpeg-devel mailing list