[FFmpeg-user] pkg-config --static ?

Roger Pack rogerdpack2 at gmail.com
Wed Sep 5 20:56:43 CEST 2012


Hello.

I noticed that "by default" when I compile fontconfig as a static
library, then enable it in ffmpeg with --enable-fontconfig,

I get these:

/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcxml.o):
In function `FcConfigMessage':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:504:
undefined reference to `XML_GetCurrentLineNumber'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:507:
undefined reference to `XML_GetCurrentLineNumber'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcxml.o):
In function `FcConfigParseAndLoad':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2928:
undefined reference to `XML_ParserCreate'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2940:
undefined reference to `XML_SetUserData'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2942:
undefined reference to `XML_SetDoctypeDeclHandler'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2943:
undefined reference to `XML_SetElementHandler'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2944:
undefined reference to `XML_SetCharacterDataHandler'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2950:
undefined reference to `XML_GetBuffer'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2967:
undefined reference to `XML_ParseBuffer'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2979:
undefined reference to `XML_ParserFree'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2970:
undefined reference to `XML_GetErrorCode'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcxml.c:2970:
undefined reference to `XML_ErrorString'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeUseNames':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2068:
undefined reference to `FT_Has_PS_Glyph_Names'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeCheckGlyph':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2256:
undefined reference to `FT_Load_Glyph'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeCharSetAndSpacingForSize':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2319:
undefined reference to `FT_Select_Size'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2330:
undefined reference to `FT_Select_Charmap'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2342:
undefined reference to `FT_Get_Char_Index'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2455:
undefined reference to `FT_Get_Glyph_Name'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2389:
undefined reference to `FT_Get_First_Char'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2428:
undefined reference to `FT_Get_Next_Char'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeCharIndex':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2202:
undefined reference to `FT_Select_Charmap'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2212:
undefined reference to `FT_Get_Char_Index'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeGlyphNameIndex':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2151:
undefined reference to `FT_Get_Glyph_Name'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeCharSetAndSpacing':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2535:
undefined reference to `FT_Get_Sfnt_Table'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeQueryFace':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1144:
undefined reference to `FT_Get_Sfnt_Table'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1164:
undefined reference to `FT_Get_Sfnt_Name_Count'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1188:
undefined reference to `FT_Get_Sfnt_Name'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1391:
undefined reference to `FT_Get_Sfnt_Table'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFontCapabilities':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:2705:
undefined reference to `FT_Load_Sfnt_Table'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeQueryFace':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1495:
undefined reference to `FT_Get_PS_Font_Info'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1649:
undefined reference to `FT_Get_BDF_Property'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1670:
undefined reference to `FT_Get_BDF_Property'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcGetPixelSize':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1034:
undefined reference to `FT_Get_BDF_Property'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeQueryFace':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1530:
undefined reference to `FT_Get_BDF_Property'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1537:
undefined reference to `FT_Get_BDF_Property'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1560:
more undefined references to `FT_Get_BDF_Property' follow
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeQueryFace':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1495:
undefined reference to `FT_Get_PS_Font_Info'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1709:
undefined reference to `FT_Get_X11_Font_Format'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):
In function `FcFreeTypeQuery':
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1740:
undefined reference to `FT_Init_FreeType'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1743:
undefined reference to `FT_New_Face'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1752:
undefined reference to `FT_Done_FreeType'
/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/win32/fontconfig-2.10.1/src/fcfreetype.c:1750:
undefined reference to `FT_Done_Face'


presumably, because it is running pkg-config like this:

$ pkgconfig pkg-config --libs fontconfig

which outputs:

-L/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib
-lfontconfig

after consulting the fontconfig people, they suggest this work around:
$ pkg-config --static --libs fontconfig

which outputs this:

-L/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/i686-w64-mingw32/lib
-lfontconfig -lexpat -lfreetype

and works.

So the question is, if it would be possible to call it like that
instead somehow?
Anyway just wondering.
Thanks!
-r


More information about the ffmpeg-user mailing list