microsoft / vcpkg

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

[opencv4] Building package opencv4:x64-windows failed #16963

Closed javi99 closed 3 years ago

javi99 commented 3 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: .\vcpkg install pthreads opencv[ffmpeg]

Failure logs

Computing installation plan...
The following packages will be built and installed:
    opencv[core,dnn,ffmpeg,jpeg,png,quirc,tiff,webp]:x64-windows -> 4.5.1
  * opencv4[core,dnn,ffmpeg,jpeg,png,quirc,tiff,webp]:x64-windows -> 4.5.1
    pthreads[core]:x64-windows -> 3.0.0-6
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Could not locate cached archive: C:\Users\JAVI-PABLO\AppData\Local\vcpkg\archives\e8\e8cb2d4ca18136a74850b97c4c71b2016b0fd789.zip
Could not locate cached archive: C:\Users\JAVI-PABLO\AppData\Local\vcpkg\archives\94\944696c726d5309e62069d802309367647bc8897.zip
Could not locate cached archive: C:\Users\JAVI-PABLO\AppData\Local\vcpkg\archives\f1\f16c05c9affc47a1b49c4f5db91392783b4da114.zip
Starting package 1/3: opencv4:x64-windows
Building package opencv4[core,dnn,ffmpeg,jpeg,png,quirc,tiff,webp]:x64-windows...
-- Using cached D:/TFG/vcpkg-master/downloads/opencv-opencv-4.5.1.tar.gz
-- Cleaning sources at D:/TFG/vcpkg-master/buildtrees/opencv4/src/4.5.1-e92f755db3.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/TFG/vcpkg-master/downloads/opencv-opencv-4.5.1.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 0005-fix-eigen.patch
-- Applying patch 0006-fix-uwp.patch
-- Applying patch 0008-devendor-quirc.patch
-- Using source at D:/TFG/vcpkg-master/buildtrees/opencv4/src/4.5.1-e92f755db3.clean
CMake Deprecation Warning at scripts/cmake/vcpkg_check_features.cmake:182 (message):
  calling `vcpkg_check_features` without the `FEATURES` keyword has been
  deprecated.

      Please add the `FEATURES` keyword to the call.
Call Stack (most recent call first):
  ports/opencv4/portfile.cmake:43 (vcpkg_check_features)
  scripts/ports.cmake:142 (include)

-- Using cached D:/TFG/vcpkg-master/downloads/opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:146 (message):
    Command failed: D:/CMake/bin/cmake.exe --build . --config Debug --target install -- -v -j5
    Working Directory: D:/TFG/vcpkg-master/buildtrees/opencv4/x64-windows-dbg
    See logs for more information:
      D:\TFG\vcpkg-master\buildtrees\opencv4\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:105 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:45 (vcpkg_build_cmake)
  ports/opencv4/portfile.cmake:385 (vcpkg_install_cmake)
  scripts/ports.cmake:142 (include)

Error: Building package opencv4: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: opencv4:x64-windows
  Vcpkg version: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e
-Please attach any additional failure logs mentioned in the console output.

Logs: install-x64-windows-dbg-out.log

Additional context Add any other context about the problem here, such as what you have already tried to resolve the issue.

javi99 commented 3 years ago

To give a little bit more of context, I am trying to build darknet in windows. To do so, I have followed this guide: https://medium.com/analytics-vidhya/installing-darknet-on-windows-462d84840e5a , and it crashes when trying to install opencv with vcpkg (as you can see). I have also tried to install darknet using cmake with this guide https://www.youtube.com/watch?v=y5txWv7MVag , but I have the same problem when it starts building the opencv package.

error in cmake: vcpkg-manifest-install.log

CMake Error at D:/TFG/vcpkg-master/scripts/buildsystems/vcpkg.cmake:898 (message): vcpkg install failed. See logs for more information: D:\TFG\darknet\build_win64\vcpkg-manifest-install.log

Then in the log the error is:

Error: Building package opencv4: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: opencv4:x64-windows Vcpkg version: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e vcpkg-manifest-install.log

Inside the log the following log is also commented:

install-x64-windows-dbg-out.log

JonLiu1993 commented 3 years ago

@javi99 ,Thanks for posting this issue,There is an issue here that is the same as yours. You can refer to the solutions given to try. If you have any problems, you can contact me

JackBoosY commented 3 years ago
[243/540] cmd.exe /C "cd /D D:\TFG\vcpkg-master\buildtrees\opencv4\x64-windows-dbg\modules\dnn && D:\TFG\vcpkg-master\installed\x64-windows\tools\protobuf\protoc.exe --cpp_out D:/TFG/vcpkg-master/buildtrees/opencv4/x64-windows-dbg/modules/dnn -I D:/TFG/vcpkg-master/buildtrees/opencv4/src/4.5.1-e92f755db3.clean/modules/dnn/src/caffe -I D:/TFG/vcpkg-master/buildtrees/opencv4/src/4.5.1-e92f755db3.clean/modules/dnn/src/onnx -I D:/TFG/vcpkg-master/buildtrees/opencv4/src/4.5.1-e92f755db3.clean/modules/dnn/src/tensorflow D:/TFG/vcpkg-master/buildtrees/opencv4/src/4.5.1-e92f755db3.clean/modules/dnn/src/caffe/opencv-caffe.proto"
FAILED: modules/dnn/opencv-caffe.pb.h modules/dnn/opencv-caffe.pb.cc 

Please track issue https://github.com/microsoft/vcpkg/issues/12849.