[FFmpeg-user] Compiling independent ffmpeg

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Jan 12 22:07:13 EET 2020

Am So., 12. Jan. 2020 um 19:38 Uhr schrieb Matthew Webber
<quickhare at hotmail.com>:

> I compiled ffmpeg on Ubuntu 18.04 perfectly fine. I installed a whole
> load of dev packages and compiled with lots of options, and all went
> smoothly.
> However when I removed the packages liblensfun-dev, libmodplug-dev,
> libcodec2-dev and libfdk-aac-dev ffmpeg failed to work. Looking deeper
> it is now missing liblensfun.so.1, libmodplug.so.1, libcodec2.so.0.7 and
> libfdk-aac.so.1.

So you did not uninstall liblensfun-dev but liblensfun

> Re-installing those packages makes those components
> available and the program runs again.
> Does the compilation not create these files or embed them into ffmpeg?

No (at least not in general), and this question is not related to FFmpeg.
Once upon a time, no dynamic libraries existed, meaning that every binary
on a system contained copies of all linked libraries. As this wastes a lot of
space, dynamic linking was invented (decades ago).
Typical compilers default to dynamic linking.

> Are there any options I need to ensure these are created so I no longer
> need these packages? I want to have program files that will work without
> any of the other packages installed.

You can add "--extra-ldflags=-static" to force static linking but your
distribution most likely will not provide a static lensfun library, so you
will have to compile all dependencies that you want yourself to
provide the necessary static libraries.

But as said, all this is not related to FFmpeg.

Carl Eugen

More information about the ffmpeg-user mailing list