[FFmpeg-user] Self-Compiled "ffmpeg" still uses system libraries

Moritz Barsnick barsnick at gmx.net
Tue Oct 11 17:19:11 EEST 2016


On Tue, Oct 11, 2016 at 15:40:26 +0200, Alexey Eromenko wrote:
> Plus I have Debian's version of ffmpeg installed, for reference (it
> cannot be removed, since Debian's KDE depends on it).

If you don't have anything except the included ff* tools (ffmpeg,
ffplay, ffserver) which depends on the self-build ffmpeg libraries, why
not just build statically? Then the "linker" (ambiguous word, sorry) is
run at compile time, and correctly. Just drop "--enable-shared" from
your configure line.

Otherwise you need to run something like
$ LD_LIBRARY_PATH=.:./libavdevice:./libavformat:./libavfilter:./libavcodec:./libswscale:./libswresample:./libavutil ./ffmpeg
I think ffmpeg doesn't provide a wrapper this. (Some autoconf projects
do, e.g. to enable "make test".)

(We could take this even further, by adding an ELF RUNPATH/RPATH to your
binaries. Not something to ever be done in general BTW.)

Moritz


More information about the ffmpeg-user mailing list