Skip to content

libvmaf won't statically build into ffmpeg #788

@Provissy

Description

@Provissy

Description

If build ffmpeg with libvmaf, libvmaf won't be compiled into ffmpeg staticlly. Instead, ffmpeg still needs libvmaf.so.1 as runtime dependency.

How to reproduce

Build ffmpeg statically in a container.

# build libvmaf
meson build --default-library static --buildtype release
ninja -C build
ninja -C build install

# build ffmpeg statically 
PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig" ./configure \
  --pkg-config-flags="--static" \
  --extra-cflags="-I/usr/local/include" \
  --extra-ldflags="-L/usr/local/lib" \
  --extra-ldflags="-L/usr/local/lib64" \
  --extra-libs=-pthread \
  --extra-libs=-lm \
  --enable-gpl \
  --enable-libvmaf
make -j$(nproc)
make install

Now get the ffmpeg out from the container, run it, the result is
./ffmpeg: error while loading shared libraries: libvmaf.so.1: cannot open shared object file: No such file or directory

This problem occurs even if runnig ffmpeg inside the build environment, which means inside the container in this case.

Note

Might be related to #753 (comment) #557

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions