[Ffmpeg-devel] Build failure if snow is disabled

Colin Ward lists
Sun Mar 19 03:59:56 CET 2006

Luca Abeni wrote:
> if I configure with
> ./configure --disable-decoder=snow --disable-encoder=snow
> I get
> [...]
> gcc -Wl,--warn-common -rdynamic -g -o ffmpeg_g ffmpeg.o cmdutils.o -L./libavformat -lavformat -L./libavcodec -lavcodec -L./libavutil -lavutil -lm -lz -ldl
> ./libavcodec/libavcodec.a(dsputil.o): In function `dsputil_init':/tmp/ffmpeg/libavcodec/dsputil.c:4052: undefined reference to `ff_snow_horizontal_compose97i'
> :/tmp/ffmpeg/libavcodec/dsputil.c:4053: undefined reference to `ff_snow_inner_add_yblock'
> :/tmp/ffmpeg/libavcodec/dsputil.c:4051: undefined reference to `ff_snow_vertical_compose97i'
> collect2: ld returned 1 exit status
> make: *** [ffmpeg_g] Error 1
> I do not know what's the best way to fix this bug. It seems that all the
> other codecs address this issue by still compiling some code even if
> they are disabled (for example, if I do "--disable-decoder=h264
> --disable-encoder=h264", h264idct.c is still compiled).
> This increases the library size a lot... :(

   I too have noticed problems like this.  It seems that sometimes 
routines that are quite generic are kept in files that belong to 
particular codecs, so you have to compile that file even if you are not 
using that codec, because parts of it are used by other codecs.

   I have noticed this in particular because I do not use configure, but 
wrote my own custom makefiles as I am on an OS (Amiga OS) which does not 
natively support UNIX shell scripts.

   Just recently I removed many, many codecs and yet found that the size 
of my executable did *not* decrease by very much at all!  So there is 
definitely something "funny" about the way that FFMPEG is structured. 
So I am going to look into it at some time to see what can be done to 
decrease the size of executables that link with FFMPEG.  I think that a 
large part of the problem is that GCC's linker does not do function 
level linking so if you link with one function in a module then you get 
all of the functions in that module linked in, even if you aren't using 

[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
[Assembly Language: The most fun you can have with your clothes on! ]

More information about the ffmpeg-devel mailing list