[FFmpeg-user] compile error - ERROR: srt >= 1.2.0 not found using pkg-config

Svyatko Huk svyatko at outlook.com
Fri May 18 18:04:31 EEST 2018


Hi guys.

Using the latest main and dev build I am getting the above error when i try to build a static FFMPEG binary with SRT enabled.
When i -- Disable-Shared during SRT configure stage, i get the .a and .pc files in the lib64 directory at my FFMPEG PKG_CONFIG_PATH, but ffmpeg doesn't see it.

Here is my configure command for SRT and FFMPEG:
SRT

git clone --depth 1 https://github.com/Haivision/srt.git
cd ~/ffmpeg_sources/srt
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

_

FFMPEG

PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig:$HOME/ffmpeg_build/lib64/pkgconfig" ./configure
--prefix="$HOME/ffmpeg_build"
--pkg-config-flags="--static"
--extra-cflags="-I$HOME/ffmpeg_build/include"
--extra-ldflags="-L$HOME/ffmpeg_build/lib"
--extra-ldflags="-L$HOME/ffmpeg_build/lib64"
--extra-libs=-lpthread
--extra-libs=-lm
--bindir="$HOME/bin"
--enable-gpl
--enable-libfdk_aac
--enable-libfreetype
--enable-libmp3lame
--enable-libopus
--enable-libvorbis
--enable-libvpx
--enable-libx264
--enable-libx265
--enable-nonfree
--enable-openssl
--enable-libsrt
--disable-shared
--enable-static
make
make install


looks like copying srt.pc from $HOME/ffmpeg_build/lib64/pkgconfig to $HOME/ffmpeg_build/lib/pkgconfig and setting the env variable PKG_CONFIG_PATH to /$HOME/ffmpeg_build/lib/pkgconfig allows the pkg-config to see the SRT library.

All good until you try to run ffmpeg executable after the build. It errors out complaining it cant find shared libs

"./ffmpeg-4.0: error while loading shared libraries: libsrt.so.1: cannot open shared object file: No such file or directory"

Interestingly, if i also copy lib64/libsrt.a to lib directory, i get the same

"ERROR: srt >= 1.2.0 not found using pkg-config"

even though pkg-config still shows SRT is there:

pkg-config --modversion srt

1.3.0

Thanks

Svyatko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 1112432 bytes
Desc: config.log
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20180518/1d8658fd/attachment.obj>


More information about the ffmpeg-user mailing list