Closed dbyoung720 closed 1 month ago
Sorry I didn't repro your issue. Could you please try #41181?
I test: 1 Install english langauge pack : compile error still 2 Add VCPKG_PLATFORM_TOOLSET_VERSION : compile successfully
ICU compile success, but opencv4 is still compile error.
error log: CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message): Command failed: F:/Green/Language/vcs/Tools/scoop/x64/apps/cmake/3.30.4/bin/cmake.exe --build . --config Debug --target install -- -v -j13 Working Directory: D:/vcpkg/buildtrees/opencv4/x64-windows-static-dbg See logs for more information: D:\vcpkg\buildtrees\opencv4\install-x64-windows-static-dbg-out.log
Call Stack (most recent call first): installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process) installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build) ports/opencv4/portfile.cmake:508 (vcpkg_cmake_install) scripts/ports.cmake:192 (include) install-x64-windows-static-dbg-out.log
[1388/1533] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1439~1.335\bin\Hostx64\x64\cl.exe /TP -DH5_BUILT_AS_STATIC_LIB -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\modules\cudacodec\opencv_cudacodec_autogen\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\3rdparty\ippicv\ippicv_win\icv\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\3rdparty\ippicv\ippicv_win\iw\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\src -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\modules\cudacodec -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudev\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\core\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudaarithm\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\imgproc\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudafilters\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudaimgproc\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudawarping\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\imgcodecs\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\videoio\include -external:ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg -external:IF:\Green\Language\vcs\Tools\scoop\x64\apps\cuda\current\include -external:ID:\vcpkg\installed\x64-windows-static\include\eigen3 -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /MP /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /FS /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 -openmp /wd4127 /wd4324 /wd4512 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\cudacodec\CMakeFiles\opencv_cudacodec.dir\src\NvEncoder.cpp.obj /Fdlib\opencv_cudacodec4d.pdb /FS -c D:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\src\NvEncoder.cpp
FAILED: modules/cudacodec/CMakeFiles/opencv_cudacodec.dir/src/NvEncoder.cpp.obj
C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1439~1.335\bin\Hostx64\x64\cl.exe /TP -DH5_BUILT_AS_STATIC_LIB -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\modules\cudacodec\opencv_cudacodec_autogen\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\3rdparty\ippicv\ippicv_win\icv\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\3rdparty\ippicv\ippicv_win\iw\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\src -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\modules\cudacodec -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudev\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\core\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudaarithm\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\imgproc\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudafilters\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudaimgproc\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudawarping\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\imgcodecs\include -ID:\vcpkg\buildtrees\opencv4\src\4.8.0-f4e8005717.clean\modules\videoio\include -external:ID:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg -external:IF:\Green\Language\vcs\Tools\scoop\x64\apps\cuda\current\include -external:ID:\vcpkg\installed\x64-windows-static\include\eigen3 -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /MP /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /FS /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 -openmp /wd4127 /wd4324 /wd4512 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\cudacodec\CMakeFiles\opencv_cudacodec.dir\src\NvEncoder.cpp.obj /Fdlib\opencv_cudacodec4d.pdb /FS -c D:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\src\NvEncoder.cpp
D:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\src\NvEncoder.cpp(129): error C2039: 'pixelBitDepthMinus8': is not a member of '_NV_ENC_CONFIG_HEVC'
F:\Green\Language\vcs\Tools\scoop\x64\apps\cuda\current\include\nvEncodeAPI.h(1820): note: see declaration of '_NV_ENC_CONFIG_HEVC'
D:\vcpkg\buildtrees\opencv4\src\4.8.0-59c03c175c.clean\modules\cudacodec\src\NvEncoder.cpp(184): error C2039: 'pixelBitDepthMinus8': is not a member of '_NV_ENC_CONFIG_HEVC'
F:\Green\Language\vcs\Tools\scoop\x64\apps\cuda\current\include\nvEncodeAPI.h(1820): note: see declaration of '_NV_ENC_CONFIG_HEVC'
Check the locally installed nvEncodeAPI.h
file (located at F:\Green\Language\vcs\Tools\scoop\x64\apps\cuda\current\include
) and review the definition of the _NV_ENC_CONFIG_HEVC
structure to confirm whether the pixelBitDepthMinus8
member exists.
NVIDIA VIDEO CODEC SDK 12.2.7 : _NV_ENC_CONFIG_HEVC structure do not exists pixelBitDepthMinus8 member NVIDIA VIDEO CODEC SDK 12.1.14 : _NV_ENC_CONFIG_HEVC structure exists pixelBitDepthMinus8 member
change to NVIDIA VIDEO CODEC SDK 12.1.14, compile error still
[398/1533] C:\Windows\system32\cmd.exe /C "cd /D D:\vcpkg\buildtrees\opencv4\x64-windows-static-dbg\modules\dnn && D:\vcpkg\installed\x64-windows\tools\protobuf\protoc.exe --cpp_out :D:/vcpkg/buildtrees/opencv4/x64-windows-static-dbg/modules/dnn -I D:/vcpkg/buildtrees/opencv4/src/4.8.0-f4e8005717.clean/modules/dnn/src/caffe -I D:/vcpkg/buildtrees/opencv4/src/4.8.0-f4e8005717.clean/modules/dnn/src/onnx -I D:/vcpkg/buildtrees/opencv4/src/4.8.0-f4e8005717.clean/modules/dnn/src/tensorflow D:/vcpkg/buildtrees/opencv4/src/4.8.0-f4e8005717.clean/modules/dnn/src/caffe/opencv-caffe.proto" FAILED: modules/dnn/opencv-caffe.pb.h modules/dnn/opencv-caffe.pb.cc D:/vcpkg/buildtrees/opencv4/x64-windows-static-dbg/modules/dnn/opencv-caffe.pb.h D:/vcpkg/buildtrees/opencv4/x64-windows-static-dbg/modules/dnn/opencv-caffe.pb.cc
PS E:\vcpkg> ./vcpkg version
vcpkg package management program version 2024-09-30-ab8988503c7cffabfd440b243a383c0a352a023d
See LICENSE.txt for license information.
This is my latest run result:
Installing 12/12 opencv4[core,default-features,dnn,jpeg,png,quirc,tiff,webp]:x64-windows-static@4.8.0#22...
Building opencv4[core,default-features,dnn,jpeg,png,quirc,tiff,webp]:x64-windows-static@4.8.0#22...
-- Using cached opencv4-e5e1a3bfdea96bebda2ad963bc8f6cf17930aef7.patch.
-- Using cached opencv4-3e3ee106fb8ccd003aa2c9a943a2340b066537bc.patch.
-- Using cached opencv-opencv-4.8.0.tar.gz.
-- Cleaning sources at E:/vcpkg/buildtrees/opencv4/src/4.8.0-f4e8005717.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/vcpkg/downloads/opencv-opencv-4.8.0.tar.gz
-- Applying patch 0001-disable-downloading.patch
-- Applying patch 0002-install-options.patch
-- Applying patch 0003-force-package-requirements.patch
-- Applying patch 0004-fix-eigen.patch
-- Applying patch 0005-fix-policy-CMP0057.patch
-- Applying patch 0006-fix-uwp.patch
-- Applying patch 0008-devendor-quirc.patch
-- Applying patch 0009-fix-protobuf.patch
-- Applying patch 0010-fix-uwp-tiff-imgcodecs.patch
-- Applying patch 0011-remove-python2.patch
-- Applying patch 0012-fix-zlib.patch
-- Applying patch 0015-fix-freetype.patch
-- Applying patch 0017-fix-flatbuffers.patch
-- Applying patch 0019-missing-include.patch
-- Applying patch 0020-fix-compat-cuda12.2.patch
-- Applying patch 0021-static-openvino.patch
-- Applying patch E:/vcpkg/downloads/opencv4-e5e1a3bfdea96bebda2ad963bc8f6cf17930aef7.patch
-- Applying patch 0022-fix-supportqnx.patch
-- Applying patch E:/vcpkg/downloads/opencv4-3e3ee106fb8ccd003aa2c9a943a2340b066537bc.patch
-- Using source at E:/vcpkg/buildtrees/opencv4/src/4.8.0-f4e8005717.clean
-- Using cached opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz.
-- Found external ninja('1.11.0').
-- Configuring x64-windows-static
-- Building x64-windows-static-dbg
-- Building x64-windows-static-rel
-- 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 E:/vcpkg/downloads/tools/msys2/1e74ca60daa10104
-- Installing: E:/vcpkg/packages/opencv4_x64-windows-static/share/opencv4/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 45 s.
Elapsed time to handle opencv4:x64-windows-static: 8.1 min
opencv4:x64-windows-static package ABI: b1e439abfded1633bd9cec818ac3529633dc6d5abbf7f0a09976e10a50a5051a
Total install time: 18 min
If you do not install the meta-port *opencv*, the package opencv4 is compatible with CMake
if you set the OpenCV_DIR *before* the find_package call
set(OpenCV_DIR "${VCPKG_INSTALLED_DIR}/x64-windows-static/share/opencv4")
find_package(OpenCV REQUIRED)
Update to the latest version, problem solved
Operating system
windows10
Compiler
msvc2022
Steps to reproduce the behavior
Failure logs
Call Stack (most recent call first): scripts/cmake/vcpkg_build_make.cmake:136 (vcpkg_execute_build_process) scripts/cmake/vcpkg_install_make.cmake:2 (vcpkg_build_make) ports/icu/portfile.cmake:100 (vcpkg_install_make) scripts/ports.cmake:192 (include)
Additional context
build-x64-windows-rel-err.log