m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.55k stars 266 forks source link

[mingw64] [ffmpeg] ERROR: libvmaf >= 2.0.0 not found using pkg-config #2110

Closed OronDF343 closed 2 years ago

OronDF343 commented 2 years ago

Hi, Failing to build 64-bit ffmpeg - libvmaf not found. I tried deleting the vmaf-git folder, did not help.

  Running git update for ffmpeg...
┌ ffmpeg git  ......................................... [Recently updated]
├ Changing options to comply to nonfree...
CUDA_PATH environment variable not set or directory does not exist.
├ Compiling static FFmpeg...
├ Running configure...
Likely error (tail of the failed operation logfile):
CXXFLAGS: -mthreads -mtune=generic -O2 -pipe
LDFLAGS: -pipe -static-libgcc -static-libstdc++ -L/local64/lib -L/mingw64/lib
../configure --prefix=/local64 --bindir=/local64/bin-video --pkg-config=pkgconf --pkg-config-flags=--keep-system-libs --keep-system-cflags --static --cc=ccache gcc --cxx=ccache g++ --ld=ccache g++ --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --disable-debug --enable-ffnvcodec --enable-nvdec --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libaom --enable-version3 --enable-chromaprint --enable-decklink --enable-frei0r --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libflite --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmodplug --enable-libopenh264 --enable-libopenmpt --enable-librtmp --enable-librubberband --enable-libtesseract --enable-libxavs --enable-libzmq --enable-libzvbi --enable-opencl --enable-opengl --enable-libvmaf --enable-libcodec2 --enable-libsrt --enable-ladspa --enable-openssl --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DCACA_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCHROMAPRINT_NODLL --extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC --extra-libs=-lpsapi --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads --extra-cflags=-DKVZ_STATIC_LIB --enable-nonfree --extra-version=g3c831847a8+1
ERROR: libvmaf >= 2.0.0 not found using pkg-config

logs.zip

1480c1 commented 2 years ago

Can you try again? I was able to build ffmpeg with latest vmaf repo last night and confirmed it works

OronDF343 commented 2 years ago

Updated suite and tried again, still gives same error logs.zip

woot000 commented 2 years ago

have you tried deleting the libvmaf.pc file in local64/lib/pkgconfig to trigger a rebuild? it sounds like you have an older version of libvmaf compiled, that might be what's causing the problem

OronDF343 commented 2 years ago

Just tried it, no dice. logs.zip

Could it be some issue with the msys2 installation?

1480c1 commented 2 years ago

Can you upload the contents of V:/Dev/media-autobuild_suite/local64/include/libvmaf/libvmaf.h?

V:/Dev/media-autobuild_suite/msys64/tmp/ffconf.1Wvw9e9t/test.c: In function 'check_vmaf_init':
V:/Dev/media-autobuild_suite/msys64/tmp/ffconf.1Wvw9e9t/test.c:3:44: error: 'vmaf_init' undeclared (first use in this function)
    3 | long check_vmaf_init(void) { return (long) vmaf_init; }
      |                                            ^~~~~~~~~

says it's undeclared, but it definitely should be there

OronDF343 commented 2 years ago

libvmaf.zip

1480c1 commented 2 years ago

Could you try making sure V:/Dev/media-autobuild_suite/local64/include/libvmaf.h doesn't exist? Perhaps it's pulling that libvmaf.h before the proper one? Alternatively, could you try a clean build? I have so far managed to successfully build for a while

OronDF343 commented 2 years ago

Alright, looks like deleting V:/Dev/media-autobuild_suite/local64/include/libvmaf.h has fixed it. That file was an old version from late 2019 or so.

Thanks for the help!