[FFmpeg-user] ffmpeg static binary with libass enabled

Roger Pack rogerdpack2 at gmail.com
Fri Nov 2 09:58:37 CET 2012


> > > ass_fontconfig.c:(.text+0x10a5): undefined reference to `FcConfigDestroy'
> > > collect2: ld returned 1 exit status
> > > make: *** [ffmpeg_g] Error 1
> > >
> >
> >
> >
> > When statically building for mingw, I know I have to do this hacky work
> > around...
> >
> > $ sed -i 's/-L${libdir} -lfontconfig[^l]*$/-L${libdir} -lfontconfig
> > -lfreetype -lexpat/' "$PKG_CONFIG_PATH/fontconfig.
> >
> > which actually might be related...
> Thanks for the response. What exactly does this hack do? It looks like as if you are configuring pkg-config directly or something.

oops the actual line is:
$ sed -i 's/-L${libdir} -lfontconfig[^l]*$/-L${libdir} -lfontconfig
-lfreetype -lexpat/' "$PKG_CONFIG_PATH/fontconfig.pc"

basically fontconfig (for some bizarre reason) expects you to call
pkg-config --static --libs fontconfig (FFmpeg calls it like pkg-config
--libs--which doesn't include everything needed for static).  I had
some chatting here on the mailing list and with the fontconfig
people--we didn't reach a concensus as to who was wrong here :)

So that hack adds some dependencies to the fontconfig "pkg config"
file so that ffmpeg picks them up.
HTH.
-r


More information about the ffmpeg-user mailing list