[FFmpeg-user] Configure error with fontconfig

Jim Worrall coniophora at gmail.com
Tue Apr 30 01:23:51 EEST 2024


This may not be due to ffmpeg itself, but I would appreciate some help.  
Configure says that pkg-config can’t find fontconfig.pc, but it seems to be
in the PKG_CONFIG_PATH.

# ./configure --cc=/usr/bin/gcc \
--prefix=$TARGET \
--pkg-config-flags="--static" \
--extra-cflags="-I/usr/local/include" \
--extra-ldflags="-L/usr/local/lib" \
--extra-libs="-lpthread -ldl -lstdc++" \
--enable-static --disable-shared \
--enable-nonfree --enable-gpl --enable-version3 \
--enable-libfribidi --enable-libfreetype --enable-libfontconfig \
--enable-libfdk-aac --enable-libx264 --enable-libx265 --disable-lzma 
ERROR: fontconfig not found using pkg-config

ffbuild/config.log:
. . . 
require_pkg_config libfontconfig fontconfig fontconfig/fontconfig.h FcInit
check_pkg_config libfontconfig fontconfig fontconfig/fontconfig.h FcInit
test_pkg_config libfontconfig fontconfig fontconfig/fontconfig.h FcInit
pkg-config --exists --print-errors fontconfig
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
Package 'fontconfig', required by 'virtual:world', not found
ERROR: fontconfig not found using pkg-config

Here is fontconfig.pc:
# ll /usr/local/ffmpeg/packages/pkg-config/check/gtk/
total 224K
drwxr-xr-x 2 root root  28 Apr 28 11:14 ./
drwxr-xr-x 7 root root  72 Apr 28 11:14 ../
-rw-r--r-- 1 root root 232 Apr 28 11:14 atk.pc
-rw-r--r-- 1 root root 287 Apr 28 11:14 cairo-gobject.pc
-rw-r--r-- 1 root root 388 Apr 28 11:14 cairo.pc
-rw-r--r-- 1 root root 269 Apr 28 11:14 fontconfig.pc

The last path in PKG_CONFIG_PATH contains fontconfig.pc:

# echo $PKG_CONFIG_PATH
/lib:/usr/lib:usr/local:/usr/local/lib:/usr/local/lib/pkgconfig:
/usr/libdata/pkgconfig:/usr/local/libdata/:/usr/local/libdata/pkgconfig:
/usr/local/ffmpeg/target/lib:/usr/local/ffmpeg/target/lib/pkgconfig:
/usr/local/ffmpeg/target/share/pkgconfig:
/usr/local/ffmpeg/build/pkg-config/check/gtk/


More information about the ffmpeg-user mailing list