Skip to content

OpenCV installs correctly randomly? #2762

@brupelo

Description

@brupelo

I've cloned from scratch vcpkg, bootstrapped and tried to install opencv, thing is, the first time has failed and when I tried again it seems installed correctly, what's the reason of this? This behaviour is really weird, if something has failed the first time building... shouldn't be failing if you try again? Please find attached the log of the 2 attemps:

(py364_32) d:\software\vcpkg>vcpkg install opencv
The following packages will be built and installed:
  * libjpeg-turbo[core]:x86-windows
  * liblzma[core]:x86-windows
    opencv[core]:x86-windows
  * protobuf[core]:x86-windows
  * tiff[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Starting package 1/5: liblzma:x86-windows
Building package liblzma[core]:x86-windows...
-- CURRENT_INSTALLED_DIR=D:/software/vcpkg/installed/x86-windows
-- DOWNLOADS=D:/software/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=D:/software/vcpkg/packages/liblzma_x86-windows
-- CURRENT_BUILDTREES_DIR=D:/software/vcpkg/buildtrees/liblzma
-- CURRENT_PORT_DIR=d:/software/vcpkg/ports/liblzma/.
-- Downloading http://tukaani.org/xz/xz-5.2.3.tar.gz...
-- Downloading http://tukaani.org/xz/xz-5.2.3.tar.gz... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Extracting source D:/software/vcpkg/downloads/xz-5.2.3.tar.gz
-- Extracting done
-- Configuring x86-windows
-- Configuring x86-windows done
-- Build x86-windows-rel
-- Build x86-windows-rel done
-- Build x86-windows-dbg
-- Build x86-windows-dbg done
-- Performing post-build validation
-- Performing post-build validation done
Building package liblzma[core]:x86-windows... done
Installing package liblzma[core]:x86-windows...
Installing package liblzma[core]:x86-windows... done
Elapsed time for package liblzma:x86-windows: 21.65 s
Starting package 2/5: libjpeg-turbo:x86-windows
Building package libjpeg-turbo[core]:x86-windows...
-- CURRENT_INSTALLED_DIR=D:/software/vcpkg/installed/x86-windows
-- DOWNLOADS=D:/software/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=D:/software/vcpkg/packages/libjpeg-turbo_x86-windows
-- CURRENT_BUILDTREES_DIR=D:/software/vcpkg/buildtrees/libjpeg-turbo
-- CURRENT_PORT_DIR=d:/software/vcpkg/ports/libjpeg-turbo/.
-- Downloading https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.3.tar.gz...
-- Downloading https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.3.tar.gz... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Extracting source D:/software/vcpkg/downloads/libjpeg-turbo-libjpeg-turbo-1.5.3.tar.gz
-- Extracting done
-- Applying patch D:/software/vcpkg/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch
-- Applying patch D:/software/vcpkg/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch done
-- Downloading http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip...
-- Downloading http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Configuring x86-windows
-- Configuring x86-windows done
-- Build x86-windows-rel
-- Build x86-windows-rel done
-- Build x86-windows-dbg
-- Build x86-windows-dbg done
-- Performing post-build validation
-- Performing post-build validation done
Building package libjpeg-turbo[core]:x86-windows... done
Installing package libjpeg-turbo[core]:x86-windows...
Installing package libjpeg-turbo[core]:x86-windows... done
Elapsed time for package libjpeg-turbo:x86-windows: 20.01 s
Starting package 3/5: tiff:x86-windows
Building package tiff[core]:x86-windows...
-- CURRENT_INSTALLED_DIR=D:/software/vcpkg/installed/x86-windows
-- DOWNLOADS=D:/software/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=D:/software/vcpkg/packages/tiff_x86-windows
-- CURRENT_BUILDTREES_DIR=D:/software/vcpkg/buildtrees/tiff
-- CURRENT_PORT_DIR=d:/software/vcpkg/ports/tiff/.
-- Downloading http://download.osgeo.org/libtiff/tiff-4.0.9.tar.gz...
-- Downloading http://download.osgeo.org/libtiff/tiff-4.0.9.tar.gz... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Extracting source D:/software/vcpkg/downloads/tiff-4.0.9.tar.gz
-- Extracting done
-- Applying patch D:/software/vcpkg/ports/tiff/add-component-options.patch
-- Applying patch D:/software/vcpkg/ports/tiff/add-component-options.patch done
-- Applying patch D:/software/vcpkg/ports/tiff/fix-cxx-shared-libs.patch
-- Applying patch D:/software/vcpkg/ports/tiff/fix-cxx-shared-libs.patch done
-- Applying patch D:/software/vcpkg/ports/tiff/crt-secure-no-deprecate.patch
-- Applying patch D:/software/vcpkg/ports/tiff/crt-secure-no-deprecate.patch done
-- Configuring x86-windows
-- Configuring x86-windows done
-- Build x86-windows-rel
-- Build x86-windows-rel done
-- Build x86-windows-dbg
-- Build x86-windows-dbg done
-- Installing: D:/software/vcpkg/packages/tiff_x86-windows/share/tiff/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package tiff[core]:x86-windows... done
Installing package tiff[core]:x86-windows...
Installing package tiff[core]:x86-windows... done
Elapsed time for package tiff:x86-windows: 1.644 min
Starting package 4/5: protobuf:x86-windows
Building package protobuf[core]:x86-windows...
-- CURRENT_INSTALLED_DIR=D:/software/vcpkg/installed/x86-windows
-- DOWNLOADS=D:/software/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=D:/software/vcpkg/packages/protobuf_x86-windows
-- CURRENT_BUILDTREES_DIR=D:/software/vcpkg/buildtrees/protobuf
-- CURRENT_PORT_DIR=d:/software/vcpkg/ports/protobuf/.
-- Downloading https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-cpp-3.5.1.tar.gz...
-- Downloading https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-cpp-3.5.1.tar.gz... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Downloading https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-win32.zip...
-- Downloading https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-win32.zip... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Extracting source D:/software/vcpkg/downloads/protobuf-cpp-3.5.1.tar.gz
-- Extracting done
-- Applying patch D:/software/vcpkg/ports/protobuf/001-add-compiler-flag.patch
-- Applying patch D:/software/vcpkg/ports/protobuf/001-add-compiler-flag.patch done
-- Applying patch D:/software/vcpkg/ports/protobuf/export-ParseGeneratorParameter.patch
-- Applying patch D:/software/vcpkg/ports/protobuf/export-ParseGeneratorParameter.patch done
-- Extracting source D:/software/vcpkg/downloads/protoc-3.5.1-win32.zip
-- Extracting done
-- Configuring x86-windows
-- Configuring x86-windows done
-- Build x86-windows-rel
-- Build x86-windows-rel done
-- Build x86-windows-dbg
-- Build x86-windows-dbg done
-- Installing: D:/software/vcpkg/packages/protobuf_x86-windows/share/protobuf/copyright
-- Installing: D:/software/vcpkg/packages/protobuf_x86-windows/tools/protoc.exe
-- Performing post-build validation
-- Performing post-build validation done
Building package protobuf[core]:x86-windows... done
Installing package protobuf[core]:x86-windows...
Installing package protobuf[core]:x86-windows... done
Elapsed time for package protobuf:x86-windows: 2.937 min
Starting package 5/5: opencv:x86-windows
Building package opencv[core]:x86-windows...
-- CURRENT_INSTALLED_DIR=D:/software/vcpkg/installed/x86-windows
-- DOWNLOADS=D:/software/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=D:/software/vcpkg/packages/opencv_x86-windows
-- CURRENT_BUILDTREES_DIR=D:/software/vcpkg/buildtrees/opencv
-- CURRENT_PORT_DIR=d:/software/vcpkg/ports/opencv/.
-- Downloading https://github.com/opencv/opencv/archive/3.4.0.tar.gz...
-- Downloading https://github.com/opencv/opencv/archive/3.4.0.tar.gz... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Extracting source D:/software/vcpkg/downloads/opencv-opencv-3.4.0.tar.gz
-- Extracting done
-- Applying patch D:/software/vcpkg/ports/opencv/opencv-installation-options.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/opencv-installation-options.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/001-fix-uwp.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/001-fix-uwp.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/002-fix-uwp.patch
-- Applying patch D:/software/vcpkg/ports/opencv/002-fix-uwp.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/no-double-expand-enable-pylint.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/no-double-expand-enable-pylint.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/msvs-fix-2017-u5.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/msvs-fix-2017-u5.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/filesystem-uwp.patch
-- Applying patch D:/software/vcpkg/ports/opencv/filesystem-uwp.patch done
-- Downloading https://github.com/opencv/opencv_contrib/archive/3.4.0.tar.gz...
-- Downloading https://github.com/opencv/opencv_contrib/archive/3.4.0.tar.gz... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Extracting source D:/software/vcpkg/downloads/opencv-opencv_contrib-3.4.0.tar.gz
-- Extracting done
-- Applying patch D:/software/vcpkg/ports/opencv/open_contrib-remove-waldboost.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/open_contrib-remove-waldboost.patch done
-- Configuring x86-windows
-- Configuring x86-windows done
-- Build x86-windows-rel
-- Build x86-windows-rel done
-- Build x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_build_cmake.cmake:129 (message):
    Command failed: D:/software/vcpkg/downloads/cmake-3.10.2-win32-x86/bin/cmake.exe;--build;.;--config;Debug;--target;install;--;/p:VCPkgLocalAppDataDisabled=true;/p:UseIntelMKL=No
    Working Directory: D:/software/vcpkg/buildtrees/opencv/x86-windows-dbg
    See logs for more information:
      D:\software\vcpkg\buildtrees\opencv\install-x86-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/opencv/portfile.cmake:139 (vcpkg_install_cmake)
  scripts/ports.cmake:72 (include)


Error: Building package opencv:x86-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: opencv:x86-windows
  Vcpkg version: 0.0.104-2018-02-08-73e45b0ce2b4132a24708a0359c76927ed418e15

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

(py364_32) d:\software\vcpkg>vcpkg install opencv
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
The following packages will be built and installed:
    opencv[core]:x86-windows
Starting package 1/1: opencv:x86-windows
Building package opencv[core]:x86-windows...
-- CURRENT_INSTALLED_DIR=D:/software/vcpkg/installed/x86-windows
-- DOWNLOADS=D:/software/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=D:/software/vcpkg/packages/opencv_x86-windows
-- CURRENT_BUILDTREES_DIR=D:/software/vcpkg/buildtrees/opencv
-- CURRENT_PORT_DIR=d:/software/vcpkg/ports/opencv/.
-- Using cached D:/software/vcpkg/downloads/opencv-opencv-3.4.0.tar.gz
-- Testing integrity of cached file...
-- Testing integrity of cached file... OK
-- Extracting done
-- Applying patch D:/software/vcpkg/ports/opencv/opencv-installation-options.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/opencv-installation-options.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/001-fix-uwp.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/001-fix-uwp.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/002-fix-uwp.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/002-fix-uwp.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/no-double-expand-enable-pylint.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/no-double-expand-enable-pylint.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/msvs-fix-2017-u5.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/msvs-fix-2017-u5.patch done
-- Applying patch D:/software/vcpkg/ports/opencv/filesystem-uwp.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/filesystem-uwp.patch done
-- Using cached D:/software/vcpkg/downloads/opencv-opencv_contrib-3.4.0.tar.gz
-- Testing integrity of cached file...
-- Testing integrity of cached file... OK
-- Extracting done
-- Applying patch D:/software/vcpkg/ports/opencv/open_contrib-remove-waldboost.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch D:/software/vcpkg/ports/opencv/open_contrib-remove-waldboost.patch done
-- Configuring x86-windows
-- Configuring x86-windows done
-- Build x86-windows-rel
-- Build x86-windows-rel done
-- Build x86-windows-dbg
-- Build x86-windows-dbg done
-- Performing post-build validation
-- Performing post-build validation done
Building package opencv[core]:x86-windows... done
Installing package opencv[core]:x86-windows...
Installing package opencv[core]:x86-windows... done
Elapsed time for package opencv:x86-windows: 10.95 min

Total elapsed time: 10.95 min

The package opencv provides CMake integration:

    find_package(OpenCV REQUIRED)
    include_directories(${OpenCV_INCLUDE_DIRS})
    target_link_libraries(main PRIVATE ${OpenCV_LIBS})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions