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

qw applemax82 at 163.com
Wed Jul 4 13:52:06 EEST 2018


I have download ffmpeg 4.0, and want to build it into one static program, i.e. ffmpeg, without any dependent dynamic library.

I can find this kind of static ffmpeg from 'https://johnvansickle.com/ffmpeg/'. But I fail to build static ffmpeg myself.

My steps are shown as follows:

./configure --disable-ffplay --disable-indev=sndio --disable-outdev=sndio \
--enable-version3 --enable-asm --enable-x86asm --enable-avfilter \
--enable-static --disable-shared --enable-gpl --enable-nonfree --prefix=/usr/local/ \

make && make install

ldd /usr/local/bin/ffmpeg 
linux-vdso.so.1 =>  (0x00007ffee27f4000)
libm.so.6 => /lib64/libm.so.6 (0x00007f8504516000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f85042ed000)
libxcb-shm.so.0 => /lib64/libxcb-shm.so.0 (0x00007f85040e9000)
libxcb-shape.so.0 => /lib64/libxcb-shape.so.0 (0x00007f8503ee5000)
libxcb-xfixes.so.0 => /lib64/libxcb-xfixes.so.0 (0x00007f8503cdc000)
libasound.so.2 => /lib64/libasound.so.2 (0x00007f85039de000)
libva.so.2 => /lib64/libva.so.2 (0x00007f85037bc000)
libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f8503595000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f8503391000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f8503089000)
librt.so.1 => /lib64/librt.so.1 (0x00007f8502e80000)
libva-drm.so.2 => /lib64/libva-drm.so.2 (0x00007f8502c7d000)
libz.so.1 => /lib64/libz.so.1 (0x00007f8502a67000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f8502840000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8502624000)
libva-x11.so.2 => /lib64/libva-x11.so.2 (0x00007f850241e000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f85020df000)
libnuma.so.1 => /lib64/libnuma.so.1 (0x00007f8501ed3000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f8501cbd000)
libc.so.6 => /lib64/libc.so.6 (0x00007f85018f9000)
/lib64/ld-linux-x86-64.so.2 (0x00005629c1296000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f85016f5000)
libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f85014e5000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f85012d3000)
libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f85010cd000)

There are lots of system dynamic libraries for my ffmpeg.

How to build static ffmepg without any dependent dynamic library?




More information about the ffmpeg-user mailing list