[ffmpeg] build error on x64-windows VS2022 Powershell
Nobody has claimed this yet.
- Dominant language
- CMake
- Stars
- 27.5k
- Forks
- 7.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 321
Description
Computing installation plan...
The following packages will be built and installed:
ffmpeg[avcodec,avdevice,avfilter,avformat,core,swresample,swscale]:x64-windows@8.0.1#2
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\iaomw\AppData\Local\vcpkg\archives in 44.6 us. Use --debug to see more details.
Installing 1/1 ffmpeg[avcodec,avdevice,avfilter,avformat,core,swresample,swscale]:x64-windows@8.0.1#2...
ffmpeg[avcodec,avdevice,avfilter,avformat,core,swresample,swscale]:x64-windows@8.0.1#2 package ABI: 4377849e59f209703a19a8b27f75aa674cb0c6ac1b59e20c99b5a0035edd081a
Building ffmpeg[avcodec,avdevice,avfilter,avformat,core,swresample,swscale]:x64-windows@8.0.1#2...
-- Using cached ffmpeg-ffmpeg-n8.0.1.tar.gz
-- Cleaning sources at C:/Users/iaomw/Github/vcpkg/buildtrees/ffmpeg/src/n8.0.1-e500752c0a.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/iaomw/Github/vcpkg/downloads/ffmpeg-ffmpeg-n8.0.1.tar.gz
-- Applying patch 0001-create-lib-libraries.patch
-- Applying patch 0002-fix-msvc-link.patch
-- Applying patch 0003-fix-windowsinclude.patch
-- Applying patch 0004-dependencies.patch
-- Applying patch 0005-fix-nasm.patch
-- Applying patch 0007-fix-lib-naming.patch
-- Applying patch 0013-define-WINVER.patch
-- Applying patch 0020-fix-aarch64-libswscale.patch
-- Applying patch 0024-fix-osx-host-c11.patch
-- Applying patch 0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch
-- Applying patch 0044-fix-vulkan-debug-callback-abi.patch
-- Applying patch 0045-use-prebuilt-bin2c.patch
-- Applying patch 0046-fix-msvc-detection.patch
-- Using source at C:/Users/iaomw/Github/vcpkg/buildtrees/ffmpeg/src/n8.0.1-e500752c0a.clean
-- Getting CMake variables for x64-windows
-- Loading CMake variables from C:/Users/iaomw/Github/vcpkg/buildtrees/ffmpeg/cmake-get-vars_C_CXX-x64-windows.cmake.log
-- Using cached msys2-automake-wrapper-20250528-1-any.pkg.tar.zst
-- Using cached msys2-bash-5.3.009-1-x86_64.pkg.tar.zst
-- Using cached msys2-coreutils-8.32-5-x86_64.pkg.tar.zst
-- Using cached msys2-file-5.46-2-x86_64.pkg.tar.zst
-- Using cached msys2-gawk-5.3.2-1-x86_64.pkg.tar.zst
-- Using cached msys2-grep-13.0-7-x86_64.pkg.tar.zst2.5.1-1-any.pkg.tar.zst
-- Using cached msys2-gzip-1.14-1-x86_64.pkg.tar.zst
-- Using cached msys2-diffutils-3.12-1-x86_64.pkg.tar.zst
-- Using cached msys2-make-4.4.1-2-x86_64.pkg.tar.zst
-- Using cached msys2-pkgconf-2.5.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-sed-4.9-1-x86_64.pkg.tar.zst
-- Using cached msys2-msys2-runtime-3.6.5-1-x86_64.pkg.tar.zst
-- Using cached msys2-automake1.16-1.16.5-1-any.pkg.tar.zst
-- Using cached msys2-automake1.17-1.17-1-any.pkg.tar.zst
-- Using cached msys2-automake1.18-1.18.1-1-any.pkg.tar.zst
-- Using cached msys2-libiconv-1.18-1-x86_64.pkg.tar.zst
-- Using cached msys2-libintl-0.22.5-1-x86_64.pkg.tar.zst
-- Using cached msys2-gmp-6.3.0-2-x86_64.pkg.tar.zst
-- Using cached msys2-gcc-libs-15.2.0-1-x86_64.pkg.tar.zst
-- Using cached msys2-libbz2-1.0.8-4-x86_64.pkg.tar.zst
-- Using cached msys2-liblzma-5.8.2-1-x86_64.pkg.tar.zst
-- Using cached msys2-libzstd-1.5.7-1-x86_64.pkg.tar.zst
-- Using cached msys2-zlib-1.3.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-libreadline-8.3.003-1-x86_64.pkg.tar.zst
-- Using cached msys2-mpfr-4.2.2-1-x86_64.pkg.tar.zst
-- Using cached msys2-libpcre-8.45-5-x86_64.pkg.tar.zst
-- Using cached msys2-perl-5.40.3-1-x86_64.pkg.tar.zst
-- Using cached msys2-ncurses-6.5.20240831-2-x86_64.pkg.tar.zst
-- Using cached msys2-libxcrypt-4.5.2-1-x86_64.pkg.tar.zst
-- Using msys root at C:/Users/iaomw/Github/vcpkg/downloads/tools/msys2/0fcfdbb60b602f3c
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1
-- Using cached msys2-msys2-runtime-3.6.5-1-x86_64.pkg.tar.zst
-- Using msys root at C:/Users/iaomw/Github/vcpkg/downloads/tools/msys2/3e71d1f8e22ab23f
-- Building Options: --toolchain=msvc --enable-pic --disable-doc --enable-runtime-cpudetect --disable-autodetect --target-os=win32 --enable-w32threads --enable-d3d11va --enable-d3d12va --enable-dxva2 --enable-mediafoundation --cc=cl.exe --cxx=cl.exe --windres=rc.exe --ld=link.exe --ar='ar-lib lib.exe' --ranlib=: --disable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --enable-swresample --enable-swscale --disable-alsa --disable-amf --disable-libaom --disable-libass --disable-avisynth --disable-bzlib --disable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libharfbuzz --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --disable-lzma --disable-libmp3lame --disable-libmodplug --disable-cuda --disable-nvenc --disable-nvdec --disable-cuvid --disable-ffnvcodec --disable-opencl --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --enable-schannel --disable-libopus --disable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libssh --disable-libtensorflow --disable-libtesseract --disable-libtheora --disable-libvorbis --disable-libvpx --disable-vulkan --disable-libwebp --disable-libx264 --disable-libx265 --disable-libxml2 --disable-zlib --disable-libsrt --disable-libmfx --disable-vaapi --disable-libzmq --disable-librubberband --enable-cross-compile --disable-static --enable-shared --extra-cflags=-DHAVE_UNISTD_H=0 --pkg-config="C:/Users/iaomw/Github/vcpkg/downloads/tools/msys2/3e71d1f8e22ab23f/mingw64/bin/pkg-config.exe"
-- Building Release Options: --enable-optimizations --extra-ldflags=-libpath:"C:/Users/iaomw/Github/vcpkg/installed/x64-windows/lib"
-- Building ffmpeg for Release
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
Command failed: C:/Users/iaomw/Github/vcpkg/downloads/tools/msys2/0fcfdbb60b602f3c/usr/bin/bash.exe ./build.sh
Working Directory: C:/Users/iaomw/Github/vcpkg/buildtrees/ffmpeg/x64-windows-rel
Error code: 2
See logs for more information:
C:\Users\iaomw\Github\vcpkg\buildtrees\ffmpeg\build-x64-windows-rel-config.log
C:\Users\iaomw\Github\vcpkg\buildtrees\ffmpeg\build-x64-windows-rel-out.log
C:\Users\iaomw\Github\vcpkg\buildtrees\ffmpeg\build-x64-windows-rel-err.log
Call Stack (most recent call first):
ports/ffmpeg/portfile.cmake:762 (vcpkg_execute_required_process)
scripts/ports.cmake:206 (include)
error: building ffmpeg:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle ffmpeg:x64-windows: 2.9 min
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+ffmpeg
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=%5Bffmpeg%5D%20build%20error%20on%20x64-windows&body=Copy%20issue%20body%20from%20C%3A%2FUsers%2Fiaomw%2FGithub%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ports/ffmpeg/portfile.cmake around line 762, then read build-x64-windows-rel-config.log, build-x64-windows-rel-out.log, and build-x64-windows-rel-err.log to identify the failed command. Reproduce the x64-windows ffmpeg build with the reported Visual Studio 2022 setup; done means the port builds and installs successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, powershell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100