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

qw applemax82 at 163.com
Thu Jul 5 12:21:05 EEST 2018


Hi Carl Eugen,


Thanks for your help. I use the following command to build static ffmpeg without any dependent dynamic library:


./configure --disable-ffplay \ --extra-libs='-static -L/usr/lib' --extra-cflags='--static' \ --enable-version3 --enable-asm --enable-x86asm --enable-avfilter \ --enable-static --disable-shared --enable-gpl --enable-nonfree --prefix=/usr/local/ \ --enable-stripping


make




I have install Intel media sdk 2018 R1 on my centos 7.4. I still want to build ffmpeg with Intel media sdk, i.e. with the option of '--enable-libmfx'. But I fail to run configure command:


./configure --disable-ffplay \
--extra-libs='-static -L/usr/lib' --extra-cflags='--static' \
--enable-version3 --enable-asm --enable-x86asm --enable-avfilter \
--enable-static --disable-shared --enable-gpl --enable-nonfree --prefix=/usr/local/ \
--enable-stripping --enable-libmfx


configure reports as follows:


ERROR: libmfx not found


If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user at ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.


Is it possible to build static ffmpeg with the option of '--enable-libmfx'?


Thanks!


Regards


Andrew




At 2018-07-05 01:15:17, "Carl Eugen Hoyos" <ceffmpeg at gmail.com> wrote:
>2018-07-04 12:52 GMT+02:00, qw <applemax82 at 163.com>:
>
>> I have download ffmpeg 4.0,
>
>Just in case you forgot: On this mailing list, only current
>FFmpeg git head is supported.
>
>> and want to build it into one static program,
>
>May I ask why?
>(One of the options you use make it difficult to guess.)
>
>> i.e. ffmpeg, without any dependent dynamic library.
>
>As said, the easiest way is to use musl (and as said,
>only x86_64 is supported, developers do not want to
>document that x86_32 is incompatible).
>
>> 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/ \
>> --enable-stripping
>
>The following options have no effect, remove them:
>--enable-asm --enable-x86asm --enable-avfilter
>--enable-static --disable-shared --prefix=/usr/local/
>--enable-stripping
>
>--enable-version3 has no effect in above configure line.
>(Is is needed for amr encoding, libsmb, libvmaf - which
>doesn't work afair - and a few unusual things.)
>
>--enable-nonfree has an effect but I suspect you don't
>want it, please remove it.
>
>In addition to what Moritz suggested, I believe you want
>something like --extra-cflags=-static to convince your
>linker to use the static libraries once you installed them.
>
>Carl Eugen
>_______________________________________________
>ffmpeg-user mailing list
>ffmpeg-user at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>To unsubscribe, visit link above, or email
>ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list