[FFmpeg-user] how to build ffmpeg into one static program without any dependent dynamic library

Moritz Barsnick barsnick at gmx.net
Wed Jul 4 17:20:07 EEST 2018


On Wed, Jul 04, 2018 at 20:52:29 +0800, qw wrote:
> Thanks for your help.
> I use CentOS 7.4 to build static ffmpeg.

Could you please show us:
$ objdump -p /usr/local/bin/ffmpeg | grep NEEDED

Furthermore, please make sure the following packages are installed:
glibc-devel
glibc-static # covers libc, libm, libdl(?), librt, libpthread dependencies
zlib-static # covers libz dependency

Please add the following ffmpeg configure options:
  --disable-libxcb # gets rid of libxcb* dependencies
  --disable-xlib # gets rid of libX* dependencies
  --disable-lzma # gets rid of liblzma dependency
  --disable-vaapi # gets rid of libva dependency
  --disable-alsa # gets rid of libasound dependency

(At the loss of a few features.)

And then build once more.

Again: Can you not just install the required dynamic libs on the
target?

Moritz


More information about the ffmpeg-user mailing list