Rafael Lima
Rafael Lima

Reputation: 3535

pkg-config cant find libraries on ffmpeg build (linux)

I'm trying to build ffmpeg for android on ubuntu...

-I've cross-compiled all the dependencies I need for my configuration
-I've set up the configuration parameters

but ./configure keep saying

ERROR: librtmp not found using pkg-config

I've tested and if I remove --enable-librtmp it will configure complain about other library. The thing is I i build all libs myself. So I'm sure it is present and at right folder.

I'm not linux/compiler specialist and so far i've spend more than 10 days to get everything i need to this project rightly done. I know i can simple modify the configure file under ffmpeg and remove the pkg-config check but this isn't the solution I'm looking for

the command i run is:

./configure --prefix=$PREFIX \
  --arch=${ARCH}\
    --cpu=${CPU} \
    --cross-prefix=$CROSS_PREFIX \
    --enable-cross-compile \
    --sysroot=$SYSROOT \
    --target-os=linux \
    --sysinclude=$NDK/sysroot/usr/include \
    --pkg-config=$(which pkg-config) \
    --pkg-config-flags="--static" \
    --enable-pic \
    --enable-gpl \
    --enable-nonfree \
    \
    --disable-shared \
    --enable-static \
    \
    --enable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    \
    --enable-librtmp \
    --enable-zlib \
    --enable-mediacodec \
    --enable-libx264 \
    --enable-libfdk-aac\
    --enable-libfreetype\
    --enable-libmp3lame\
    --enable-openssl\
    --enable-libfontconfig\
    --enable-bsf=aac_adtstoasc \
    \
    --disable-doc \
    $ADDITIONAL_CONFIGURE_FLAG

I would like to know which tests pkg-config do to detect if any lib is installed? and how can i show it the libs i need are really present

=========UPDATE=========

${PREFIX} stands for build_dir under which i've a folder lib/pkgconfig with many .pc files including librtmp.pc. so why it can detect the others but not this one? i checked the content of the file and seams to be right, similar to others at same folder

Upvotes: 3

Views: 14853

Answers (1)

iorih0304
iorih0304

Reputation: 366

try this command before do ./configure

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

I met similar problem when I installed libx265.

Upvotes: 4

Related Questions