Closed reitowo closed 1 year ago
Delete --disable-autodetect
works. I still think deleting this will cause more errors than keeping it.
portfile.cmake line 413: If openssl isnt used as a feature then schannel is enabled. Schannel is part of the windows SDK so if it cant be found then somethings gone wrong with your installation. The only thing that deleting '--disable-autodetect` is doing is allowing it to silently fail should schannel not be found, which is actually a bug in ffmpeg that is likely to be fixed in a future version. So a proper fix would be to correctly find schannel which seems to be a problem limited to your current setup.
portfile.cmake line 413: If openssl isnt used as a feature then schannel is enabled. Schannel is part of the windows SDK so if it cant be found then somethings gone wrong with your installation. The only thing that deleting '--disable-autodetect` is doing is allowing it to silently fail should schannel not be found, which is actually a bug in ffmpeg that is likely to be fixed in a future version. So a proper fix would be to correctly find schannel which seems to be a problem limited to your current setup.
Much thanks for the explanation! But my Windows SDK seems have nothing wrong, and I think this port need more hint for this error.
Hi @reitowo , did you find a way to fix this? I am getting the same error.
Maybe upgrade to latest ffmpeg version.
The port was significantly improved in the past monts.
Thanks @reitowo and @dg0yt for the reply. Looks like updating Windows SDK, fixed it for me.
Package: ffmpeg[amf,avcodec,avdevice,avfilter,avformat,core,gpl,nvcodec,qsv,swresample,swscale,x264]:x64-windows -> 5.1.2
Host Environment
To Reproduce
vcpkg install
Failure logs
C:\vcpkg\buildtrees\ffmpeg\build-x64-windows-dbg-config.log
``` # /c/vcpkg/buildtrees/ffmpeg/src/n5.1.2-f31542651f.clean/configure --prefix=/c/vcpkg/packages/ffmpeg_x64-windows/debug --toolchain=msvc --enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect --enable-asm --enable-x86asm --pkg-config='E:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/tools/pkgconf/pkgconf.exe' --target-os=win32 --enable-w32threads --enable-d3d11va --enable-dxva2 --enable-mediafoundation --disable-inline-asm --cc=cl.exe --cxx=cl.exe --windres=rc.exe --ld=link.exe --ar='ar-lib lib.exe' --enable-gpl --disable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --disable-postproc --enable-swresample --enable-swscale --disable-alsa --enable-amf --disable-libaom --disable-libass --disable-avisynth --disable-bzlib --disable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --disable-lzma --disable-libmp3lame --disable-libmodplug --enable-cuda --enable-nvenc --enable-nvdec --enable-cuvid --enable-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-libwebp --enable-libx264 --disable-libx265 --disable-libxml2 --disable-zlib --disable-libsrt --enable-libmfx --enable-encoder=h264_qsv --enable-decoder=h264_qsv --enable-cross-compile --arch=x86_64 --disable-static --enable-shared --extra-cflags='-DHAVE_UNISTD_H=0' --debug --disable-optimizations ALLUSERSPROFILE='C:\ProgramData' ALL_COMPONENTS=' aac_adtstoasc_bsf av1_frame_merge_bsf av1_frame_split_bsf av1_metadata_bsf chomp_bsf dump_extradata_bsf dca_core_bsf dv_error_marker_bsf eac3_core_bsf extract_extradata_bsf filter_units_bsf h264_metadata_bsf h264_mp4toannexb_bsf h264_redundant_pps_bsf hapqa_extract_bsf hevc_metadata_bsf hevc_mp4toannexb_bsf imx_dump_header_bsf mjpeg2jpeg_bsf mjpega_dump_header_bsf mp3_header_decompress_bsf mpeg2_metadata_bsf mpeg4_unpack_bframes_bsf mov2textsub_bsf noise_bsf null_bsf opus_metadata_bsf pcm_rechunk_bsf pgs_frame_merge_bsf prores_metadata_bsf remove_extradata_bsf setts_bsf text2movsub_bsf trace_headers_bsf truehd_core_bsf vp9_metadata_bsf vp9_raw_reorder_bsf vp9_superframe_bsf vp9_superframe_split_bsf aasc_decoder aic_decoder alias_pix_decoder agm_decoder amv_decoder anm_decoder ansi_decoder apng_decoder arbc_decoder argo_decoder asv1_decoder asv2_decoder aura_decoder aura2_decoder avrp_decoder avrn_decoder avs_decoder avui_decoder ayuv_decoder bethsoftvid_decoder bfi_decoder bink_decoder bitpacked_decoder bmp_decoder bmv_video_decoder brender_pix_decoder c93_decoder cavs_decoder cdgraphics_decoder cdtoons_decoder cdxl_decoder cfhd_decoder ... Skipped 18162 lines ... cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c test.c link.exe @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/ldflags.rsp -nologo -out:./ffconf.uVa9O03z/test.exe ./ffconf.uVa9O03z/test.o test_ldflags -Wl,-Bsymbolic test_ld cc test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 int main(void){ return 0; } END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c test.c link.exe @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/ldflags.rsp -nologo -out:./ffconf.uVa9O03z/test.exe ./ffconf.uVa9O03z/test.o check_stripflags -x test_stripflags -x test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 int main(void) { return 0; } END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c test.c strip -x ./ffconf.uVa9O03z/test.o /c/vcpkg/buildtrees/ffmpeg/src/n5.1.2-f31542651f.clean/configure: line 993: strip: command not found check_ld cc proper_dce test_ld cc test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 extern const int array[512]; 2 static inline int func(void) { return array[0]; } 3 int main(void) { return 0; } END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c test.c link.exe @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/ldflags.rsp -nologo -out:./ffconf.uVa9O03z/test.exe ./ffconf.uVa9O03z/test.o test_ldflags -Wl,--version-script,./ffconf.uVa9O03z/test.ver test_ld cc test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 int main(void){ return 0; } END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c test.c link.exe @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/ldflags.rsp -nologo -out:./ffconf.uVa9O03z/test.exe ./ffconf.uVa9O03z/test.o test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 void ff_foo(void) __asm__ ("av_foo@VERSION"); 2 void ff_foo(void) { __asm__(""); } END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c test.c ./ffconf.uVa9O03z/test.c(1): error C2061: syntax error: identifier '__asm__' ./ffconf.uVa9O03z/test.c(1): error C2059: syntax error: ';' ./ffconf.uVa9O03z/test.c(1): error C2059: syntax error: 'string' ./ffconf.uVa9O03z/test.c(2): warning C4013: '__asm__' undefined; assuming extern returning int test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 __asm__(".symver ff_foo,av_foo@VERSION"); 2 void ff_foo(void) {} END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c test.c ./ffconf.uVa9O03z/test.c(1): error C2143: syntax error: missing ')' before 'string' ./ffconf.uVa9O03z/test.c(1): error C2143: syntax error: missing '{' before 'string' ./ffconf.uVa9O03z/test.c(1): error C2059: syntax error: 'string' ./ffconf.uVa9O03z/test.c(1): error C2059: syntax error: ')' check_cflags -O1 test_cflags -O1 test_cc -O1 BEGIN ./ffconf.uVa9O03z/test.c 1 int x; END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -O1 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c cl : Command line warning D9025 : overriding '/O2' with '/O1' test.c check_cflags -fno-math-errno test_cflags -fno-math-errno test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 int x; END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -O1 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c cl : Command line warning D9025 : overriding '/O2' with '/O1' test.c check_cflags -fno-signed-zeros test_cflags -fno-signed-zeros test_cc BEGIN ./ffconf.uVa9O03z/test.c 1 int x; END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -O1 -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c cl : Command line warning D9025 : overriding '/O2' with '/O1' test.c test_cc -mno-red-zone BEGIN ./ffconf.uVa9O03z/test.c 1 int x; END ./ffconf.uVa9O03z/test.c cl.exe -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC @C:/vcpkg/buildtrees/ffmpeg/x64-windows-dbg/cflags.rsp -nologo -DHAVE_UNISTD_H=0 -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -IE:/VTSLink/Client/VTSLink/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/debug/../include -DX264_API_IMPORTS -Z7 -W3 -wd4018 -wd4146 -wd4244 -wd4305 -wd4554 -O1 -mno-red-zone -c -Fo./ffconf.uVa9O03z/test.o ./ffconf.uVa9O03z/test.c cl : Command line warning D9025 : overriding '/O2' with '/O1' cl : Command line warning D9002 : ignoring unknown option '-mno-red-zone' test.c check_cpp_condition log2 crtversion.h _VC_CRT_MAJOR_VERSION >= 12 test_cpp_condition crtversion.h _VC_CRT_MAJOR_VERSION >= 12 test_cpp BEGIN ./ffconf.uVa9O03z/test.c 1 #includeC:\vcpkg\buildtrees\ffmpeg\build-x64-windows-dbg-out.log
``` === CONFIGURING === ERROR: schannel requested but not found If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. ```Additional context
vcpkg.json
``` { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "vts-link-client", "license": "GPL-2.0-only", "dependencies": [ "kcp", "libdatachannel", "brotli", "protobuf", "concurrentqueue", "crashpad", "libyuv", "directxtk", "libqrencode", "ndi-sdk", "qttools", "qttranslations", { "name": "qtbase", "default-features": false, "features": [ "brotli", "concurrent", "freetype", "gui", "icu", "jpeg", "network", "openssl", "pcre2", "png", "thread", "widgets" ] }, { "name": "opencv2", "default-features": true, "features": [ "png" ] }, { "name": "ffmpeg", "default-features": true, "features": [ "nvcodec", "qsv", "x264", "amf" ] } ], "overrides": [ { "name": "openssl", "version-string": "1.1.1m#2" }, { "name": "ffmpeg", "version-string": "5.1.2" } ], "supports": "windows", "vcpkg-configuration": { "default-registry": { "kind": "git", "repository": "https://github.com/cnSchwarzer/vcpkg", "baseline": "c8739ca3d9f478eb1f2b076f22b9297643b95ff4", "reference": "reito" }, "registries": [ { "kind": "git", "repository": "https://github.com/cnSchwarzer/vcpkg-registry", "baseline": "fb9eecc3a024fe527fd61f1b1e568a50a5755d5a", "reference": "main", "packages": [ "ndi-sdk" ] } ] } } ```