microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.79k stars 6.29k forks source link

[gstreamer] build failure #40611

Open DougRogers opened 2 weeks ago

DougRogers commented 2 weeks ago

Operating system

Windows 11

Compiler

Visual Studio

Steps to reproduce the behavior

Fresh install.

C:\vcpkg>vcpkg install gstreamer[core,colormanagement,dash,bzip2-bad,bzip2-good,dtls,gpl,libav,libde265,openh264,mpg123,smoothstreaming,speex,vpx,taglib,webp,faad,openmpt,plugins-base,plugins-bad,plugins-good,plugins-ugly,openjpeg,jpeg,png,x264,x265,ges,flac]:x64-windows  --recurse

Failure logs

C:\vcpkg>vcpkg install gstreamer[core,colormanagement,dash,bzip2-bad,bzip2-good,dtls,gpl,libav,libde265,openh264,mpg123,smoothstreaming,speex,vpx,taglib,webp,faad,openmpt,plugins-base,plugins-bad,plugins-good,plugins-ugly,openjpeg,jpeg,png,x264,x265,ges,flac]:x64-windows --recurse Computing installation plan... The following packages will be built and installed: gstreamer[bzip2-bad,bzip2-good,colormanagement,core,dash,dtls,faad,flac,ges,gpl,jpeg,libav,libde265,mpg123,ogg,openh264,openjpeg,openmpt,plugins-bad,plugins-base,plugins-good,plugins-ugly,png,smoothstreaming,speex,taglib,vpx,webp,x264,x265]:x64-windows@1.22.5#8 Detecting compiler hash for triplet x64-windows... Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe Restored 0 package(s) from C:\Users\Roger\AppData\Local\vcpkg\archives in 81.9 us. Use --debug to see more details. Installing 1/1 gstreamer[bzip2-bad,bzip2-good,colormanagement,core,dash,dtls,faad,flac,ges,gpl,jpeg,libav,libde265,mpg123,ogg,openh264,openjpeg,openmpt,plugins-bad,plugins-base,plugins-good,plugins-ugly,png,smoothstreaming,speex,taglib,vpx,webp,x264,x265]:x64-windows@1.22.5#8... Building gstreamer[bzip2-bad,bzip2-good,colormanagement,core,dash,dtls,faad,flac,ges,gpl,jpeg,libav,libde265,mpg123,ogg,openh264,openjpeg,openmpt,plugins-bad,plugins-base,plugins-good,plugins-ugly,png,smoothstreaming,speex,taglib,vpx,webp,x264,x265]:x64-windows@1.22.5#8... -- Found Python version '3.11.8 at C:/vcpkg/downloads/tools/python/python-3.11.8-x64/python.exe' -- Using meson: C:/vcpkg/downloads/tools/meson-1.5.1-81f7e3/meson.py -- Using cached gstreamer-gstreamer-1.22.5.tar.gz. -- Cleaning sources at C:/vcpkg/buildtrees/gstreamer/src/1.22.5-415fd60d58.clean. Use --editable to skip cleaning for the packages you specify. -- Extracting source C:/vcpkg/downloads/gstreamer-gstreamer-1.22.5.tar.gz -- Applying patch fix-clang-cl.patch -- Applying patch fix-clang-cl-gstreamer.patch -- Applying patch fix-clang-cl-base.patch -- Applying patch fix-clang-cl-good.patch -- Applying patch fix-clang-cl-bad.patch -- Applying patch fix-clang-cl-ugly.patch -- Applying patch gstreamer-disable-no-unused.patch -- Applying patch srtp_fix.patch -- Applying patch fix-bz2-windows-debug-dependency.patch -- Applying patch base-must-be-enabled.patch -- Applying patch no-downloads.patch -- Applying patch plugin-base-disable-no-unused.patch -- Using source at C:/vcpkg/buildtrees/gstreamer/src/1.22.5-415fd60d58.clean -- Found external ninja('1.11.0'). -- Using cached msys2-mingw-w64-x86_64-pkgconf-1~2.2.0-1-any.pkg.tar.zst. -- Using cached msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst. -- Using msys root at C:/vcpkg/downloads/tools/msys2/1e74ca60daa10104 -- Configuring x64-windows-dbg -- Getting CMake variables for x64-windows -- Configuring x64-windows-dbg done -- Configuring x64-windows-rel -- Configuring x64-windows-rel done -- Package x64-windows-dbg CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message): Command failed: "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" install -v Working Directory: C:/vcpkg/buildtrees/gstreamer/x64-windows-dbg Error code: 1 See logs for more information: C:\vcpkg\buildtrees\gstreamer\package-x64-windows-dbg-out.log

Call Stack (most recent call first): installed/x64-windows/share/vcpkg-tool-meson/vcpkg_install_meson.cmake:33 (vcpkg_execute_required_process) ports/gstreamer/portfile.cmake:302 (vcpkg_install_meson) scripts/ports.cmake:192 (include)

error: building gstreamer: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 gstreamer:x64-windows: 2.2 min Please ensure you're using the latest port files with git pull and vcpkg update. Then check for known issues at:package-x64-windows-dbg-out.log You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?title=[gstreamer]+Build+error+on+x64-windows&body=Copy+issue+body+from+C%3A%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

Additional context

No response

dg0yt commented 2 weeks ago
../src/1.22.5-415fd60d58.clean/subprojects/gst-libav/ext/libav/gstavcfg.c(394): error C2065: 'AV_OPT_TYPE_CHANNEL_LAYOUT': undeclared identifier
../src/1.22.5-415fd60d58.clean/subprojects/gst-libav/ext/libav/gstavcfg.c(394): error C2051: case expression not constant

AV_OPT_TYPE_CHANNEL_LAYOUT seems to be an identifer from ffmpeg which was depreacted in 2022: https://github.com/FFmpeg/FFmpeg/blob/40dda881d6ad761b4589c3078b925e0d849546b3/doc/APIchanges#L617 In vcpkg, ffmpeg was recently updated from 6 to 7. vcpkg CI tests only gstreamer[core,plugins-base], but ffmpeg is coupled to the libav feature. If you need that feature, you can try to combine it with an old version of ffmpeg at the moment.

DougRogers commented 2 weeks ago

@dg0yt I do need libav/ffmpeg, How do I specify a version using vcpkg?

dg0yt commented 2 weeks ago

You will have to use manifest mode for versioning. In classic mode, you could copy the old version's ports/ffmpeg dir to a separate location, and use that via --overlay-ports.

DougRogers commented 2 weeks ago

I tried changing the version in the vcpkg.json file, but that did not work. What is the simplest way to get an older version?

{ "name": "ffmpeg", "version": "6.1.2",

dg0yt commented 2 weeks ago

Browse the git history (git log, gitk, Github) to find the commit before the update to 7.0, checkout that commit. Verify the content of ports/ffmpeg, copy the dir, then checkout master again.

DougRogers commented 2 weeks ago

@dg0yt Thank you. That worked as a workaround.

I would urge the team to provide a simple mechanism for specifying versioning, though.

WangWeiLin-MV commented 2 weeks ago

I would urge the team to provide a simple mechanism for specifying versioning, though.

Please see "Tutorial: Install a specific version of a package" https://learn.microsoft.com/en-us/vcpkg/consume/lock-package-versions?tabs=inspect-powershell

DougRogers commented 2 weeks ago

@WangWeiLin-MV I saw that. A simple thing is to specify the version in the command line, not fiddling with json files.

WangWeiLin-MV commented 2 weeks ago

@DougRogers Please see discussions https://github.com/microsoft/vcpkg/discussions/39369