jc-kynesim / rpi-ffmpeg

FFmpeg work for RPI
Other
107 stars 25 forks source link

Instructions not producing a static build #56

Open roger- opened 1 year ago

roger- commented 1 year ago

Following the instructions for the dev/5.1.2/rpi_import_1 branch seems to produce a binary that's not actually static:

> file ffmpeg
ffmpeg: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1 ...

I believe the configure script needs a combination of --pkg-config-flags="--static" and --enable-static, but I haven't gotten it working (pkg-config gives drm errors). Some success was reported here.

idontcare99999 commented 1 year ago

Below is my "simplest" config for compiling a static binary with hardware acceleration of both h264 and h265.

--enable-v4l2-request requires --enable-libdrm which requires compiling that library and I believe you'll also need libudev from systemd.

./configure \ --extra-cflags="-I/usr/local/include -I/usr/include -static" \ --extra-ldflags="-L/usr/local/lib -L/usr/lib/aarch64-linux-gnu/ -L/lib/aarch64-linux-gnu/ -static" \ --pkg-config-flags="--static" \ --extra-ldexeflags="-static" \ --disable-doc \ --disable-shared \ --enable-static \ --disable-stripping \ --disable-thumb \ --enable-sand \ --enable-v4l2-request \ --enable-libdrm \ --enable-ffplay \ --extra-version="110122"