Skip to content

[opencv4] x64-windows - Failed to build #13077

@TheAshwanik

Description

@TheAshwanik

Host Environment

  • OS: x64-windows
    vcpkg latest release.

To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/microsoft/vcpkg
cd vcpkg
$env:VCPKG_ROOT=$PWD
 .\bootstrap-vcpkg.bat
.\vcpkg install darknet[full]:x64-windows

Console output

Starting package 15/19: opencv4:x64-windows
Building package opencv4[contrib,core,cuda,dnn,ffmpeg,jpeg,opengl,png,tiff,webp]:x64-windows...
Could not locate cached archive: C:\Users\TheAshwaniK\AppData\Local\vcpkg/archives\df\df6a7b94cd0e83939364f22be8a25100f980a83e.zip
-- Downloading https://github.com/opencv/opencv/archive/4.3.0.tar.gz...
-- Extracting source D:/Development_work/vcpkg/downloads/opencv-opencv-4.3.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-policy-CMP0057.patch
-- Applying patch 0009-fix-uwp.patch
-- Using source at D:/Development_work/vcpkg/buildtrees/opencv4/src/4.3.0-0c6047baf6.clean
-- Downloading https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz...
-- Downloading https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/79c6cee80a2df9a196f20afd6b598a9810964c32.zip...
-- Downloading https://github.com/opencv/opencv_contrib/archive/4.3.0.tar.gz...
-- Extracting source D:/Development_work/vcpkg/downloads/opencv-opencv_contrib-4.3.0.tar.gz
-- Applying patch 0005-add-missing-stdexcept-include.patch
-- Using source at D:/Development_work/vcpkg/buildtrees/opencv4/src/4.3.0-795a2a992f.clean
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i...
-- Downloading https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat...
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:141 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v
    Working Directory: D:/Development_work/vcpkg/buildtrees/opencv4/x64-windows-dbg
    See logs for more information:
      D:\Development_work\vcpkg\buildtrees\opencv4\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/opencv4/portfile.cmake:371 (vcpkg_install_cmake)
  scripts/ports.cmake:79 (include)
 

Error in Logs

[install-x64-windows-dbg-out.log](https://github.com/microsoft/vcpkg/files/5112166/install-x64-windows-dbg-out.log)

D:\Development_work\vcpkg\buildtrees\opencv4\src\4.3.0-0c6047baf6.clean\modules\dnn\src\cuda4dnn\csl\cudnn/transpose_convolution.hpp(38): 
error C2065: 'CUDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST': undeclared identifier

.
.
.
.
cv::dnn::make_cuda_node<cv::dnn::cuda4dnn::TransposeConvolutionOp,cv::dnn::cuda4dnn::csl::Stream,cv::dnn::cuda4dnn::csl::cudnn::Handle,cv::dnn::cuda4dnn::TransposeConvolutionConfiguration&,cv::Mat&,cv::Mat&>(int,cv::dnn::cuda4dnn::csl::Stream &&,cv::dnn::cuda4dnn::csl::cudnn::Handle &&,cv::dnn::cuda4dnn::TransposeConvolutionConfiguration &,cv::Mat &,cv::Mat &)' being compiled
D:\Development_work\vcpkg\buildtrees\opencv4\src\4.3.0-0c6047baf6.clean\modules\dnn\src\cuda4dnn\csl\cudnn/transpose_convolution.hpp(38): 
error C3861: 'cudnnGetConvolutionBackwardDataAlgorithm': identifier not found

Additional context

- I uninstalled all NVIDIA drivers and CUDA.

- Restarted PC

- Installed CUDA 10.2 (cuda_10.2.89_441.22_win10)

- Then Copied cudnn(cudnn-10.2-windows10-x64-v8.0.2.39) as mentioned [here](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installwindows)
Copy <installpath>\cuda\bin\cudnn*.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin.
Copy <installpath>\cuda\include\cudnn*.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include.
Copy <installpath>\cuda\lib\x64\cudnn*.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64.

- Ensured the following values are set:
Variable Name: CUDA_PATH 
Variable Value: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2


Metadata

Metadata

Assignees

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions