Vcpkg: [opencv3/opencv4[qt,nonfree,contrib,ffmpeg,world]] build failure

Created on 25 May 2020  路  6Comments  路  Source: microsoft/vcpkg

Host Environment
OS: Windows 10
CL: Compiler Version 19.26.28805

To Reproduce
Steps to reproduce the behavior:
vcpkg install opencv3[qt,nonfree,contrib,ffmpeg,world]:x64-windows

Failure logs

vcpkg install opencv3[qt,nonfree,contrib,ffmpeg,world]:x64-windows
Computing installation plan...
The following packages will be built and installed:
    opencv3[contrib,core,dnn,ffmpeg,flann,jpeg,nonfree,opengl,png,qt,tiff,webp,world]:x64-windows
Starting package 1/1: opencv3:x64-windows
Building package opencv3[contrib,core,dnn,ffmpeg,flann,jpeg,nonfree,opengl,png,qt,tiff,webp,world]:x64-windows...
-- Using cached C:/Tools/vcpkg/downloads/opencv-opencv-3.4.7.tar.gz
-- Extracting source C:/Tools/vcpkg/downloads/opencv-opencv-3.4.7.tar.gz
-- Applying patch 0001-disable-downloading.patch
-- Applying patch 0002-install-options.patch
-- Applying patch 0003-force-package-requirements.patch
-- Applying patch 0009-fix-uwp.patch
-- Using source at C:/Tools/vcpkg/buildtrees/opencv3/src/3.4.7-76c703aeb9
-- Using cached C:/Tools/vcpkg/downloads/opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz
-- Using cached C:/Tools/vcpkg/downloads/opencv-opencv_contrib-3.4.7.tar.gz
-- Extracting source C:/Tools/vcpkg/downloads/opencv-opencv_contrib-3.4.7.tar.gz
-- Using source at C:/Tools/vcpkg/buildtrees/opencv3/src/3.4.7-8b40424ca7
-- Using cached C:/Tools/vcpkg/downloads/opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
    Command failed: C:/Tools/vcpkg/downloads/tools/cmake-3.17.2-windows/cmake-3.17.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
    Working Directory: C:/Tools/vcpkg/buildtrees/opencv3/x64-windows-dbg
    See logs for more information:
      C:\Tools\vcpkg\buildtrees\opencv3\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/opencv3/portfile.cmake:305 (vcpkg_install_cmake)
  scripts/ports.cmake:90 (include)


Error: Building package opencv3:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: opencv3:x64-windows
  Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above.

Reason: buildtrees\opencv4\src\4.1.1-521dd00bd2\modules\cvv\src\util\observer_ptr.hpp
missing #include <stdexcept>

port-bug

Most helpful comment

I will fix it in #11130

All 6 comments

I will fix it in #11130

Also happen to me:
vcpkg.exe install opencv3[qt,ipp,world,core,dnn,flann,jpeg,opengl,png,tiff,webp,tbb,ffmpeg,jasper,contrib,eigen] --triplet x64-windows

install-x64-windows-dbg-out.log
tldr (the log):

C:\Users\User\Desktop\vcpkg\buildtrees\opencv3\src\3.4.7-8b40424ca7.clean\modules\cvv\src\qtutil\../util/observer_ptr.hpp(177): error C2039: 'logic_error': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\memory(24): note: see declaration of 'std'

C:\Users\User\Desktop\vcpkg\buildtrees\opencv3\src\3.4.7-8b40424ca7.clean\modules\cvv\src\qtutil\../util/observer_ptr.hpp(174): note: while compiling class template member function 'void cvv::util::ObserverPtr<QVBoxLayout>::enforceNotNull(void) const'
C:\Users\User\Desktop\vcpkg\buildtrees\opencv3\src\3.4.7-8b40424ca7.clean\modules\cvv\src\qtutil\../util/observer_ptr.hpp(96): note: see reference to function template instantiation 'void cvv::util::ObserverPtr<QVBoxLayout>::enforceNotNull(void) const' being compiled
C:\Users\User\Desktop\vcpkg\buildtrees\opencv3\src\3.4.7-8b40424ca7.clean\modules\cvv\src\qtutil\collapsable.hpp(134): note: see reference to class template instantiation 'cvv::util::ObserverPtr<QVBoxLayout>' being compiled
C:\Users\User\Desktop\vcpkg\buildtrees\opencv3\src\3.4.7-8b40424ca7.clean\modules\cvv\src\qtutil\../util/observer_ptr.hpp(177): error C2065: 'logic_error': undeclared identifier

Hi @VladBolotov and @talregev
This should be fixed via #11130. Please update vcpkg to the latest version and rebuild this.

@NancyLi1013 I still have the same issue. Can you open this issue?

@NancyLi1013 I pull --rebase the vcpkg git. and check again. now it working. you can leave this issue close.
Thank you and thank @cenit for solve this issue.

Thanks for your feedback @talregev.

Was this page helpful?
0 / 5 - 0 ratings