microsoft / vcpkg

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

[opencv4:x64-osx-dynamic] build failure #19803

Closed BZandi closed 2 years ago

BZandi commented 3 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: I have used the following manifest file (vcpkg.json):

{
    "name": "pupilext",
    "port-version": 1,
    "version-string": "0.1.1.",
    "homepage": "https://github.com/openPupil/Open-PupilEXT",
    "description": "Implementation of a open-source pupillometry platform called PupilEXT.",
    "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc",
    "dependencies": [
        {
            "name": "boost",
            "version>=": "1.75.0"
        },
        {
            "name": "eigen3",
            "version>=": "3.3.9"
        },
        {
            "name": "tbb",
            "version>=": "2020_U3"
        },
        {
            "name": "ceres",
            "version>=": "2.0.0#3"
        },
        {
            "name": "opencv",
            "version>=": "4.5.1",
            "features": [
                "dnn",
                "jpeg",
                "png",
                "quirc",
                "tiff",
                "ffmpeg"
            ]
        }
    ]
}

In Visual Studio Code the settings.json file is as follows:

{
    "cmake.configureSettings": {
        "VCPKG_TARGET_TRIPLET": "x64-osx-dynamic",
        "CMAKE_TOOLCHAIN_FILE": "/3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake",
    }
}

Failure logs During compiling, the following error occurs when it starts to build the OpenCV library.

[cmake] Starting package 168/170: opencv4:x64-osx-dynamic
[cmake] Building package opencv4[core,dnn,ffmpeg,jpeg,png,quirc,tiff,webp]:x64-osx-dynamic...
[cmake] -- Using community triplet x64-osx-dynamic. This triplet configuration is not guaranteed to succeed.
[cmake] -- [COMMUNITY] Loading triplet configuration from: /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/triplets/community/x64-osx-dynamic.cmake
[cmake] -- Installing port from location: /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/buildtrees/versioning/versions/opencv4/ba505df8f61764e9b4667b04958c748237d12d23
[cmake] -- Downloading https://github.com/opencv/opencv/archive/4.5.1.tar.gz -> opencv-opencv-4.5.1.tar.gz...
[cmake] -- Cleaning sources at /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/buildtrees/opencv4/src/4.5.1-e92f755db3.clean. Use --editable to skip cleaning for the packages you specify.
[cmake] -- Extracting source /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/downloads/opencv-opencv-4.5.1.tar.gz
[cmake] -- Applying patch 0001-disable-downloading.patch
[cmake] -- Applying patch 0002-install-options.patch
[cmake] -- Applying patch 0003-force-package-requirements.patch
[cmake] -- Applying patch 0004-fix-policy-CMP0057.patch
[cmake] -- Applying patch 0005-fix-eigen.patch
[cmake] -- Applying patch 0006-fix-uwp.patch
[cmake] -- Applying patch 0008-devendor-quirc.patch
[cmake] -- Using source at /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/buildtrees/opencv4/src/4.5.1-e92f755db3.clean
[cmake] CMake Deprecation Warning at scripts/cmake/vcpkg_check_features.cmake:182 (message):
[cmake]   calling `vcpkg_check_features` without the `FEATURES` keyword has been
[cmake]   deprecated.
[cmake] 
[cmake]       Please add the `FEATURES` keyword to the call.
[cmake] Call Stack (most recent call first):
[cmake]   buildtrees/versioning/versions/opencv4/ba505df8f61764e9b4667b04958c748237d12d23/portfile.cmake:43 (vcpkg_check_features)
[cmake]   scripts/ports.cmake:140 (include)
[cmake] -- Downloading https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz -> opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz...
[cmake] -- Configuring x64-osx-dynamic-dbg
[cmake] -- Configuring x64-osx-dynamic-rel
[cmake] -- Building x64-osx-dynamic-dbg
[cmake] CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:155 (message):
[cmake]     Command failed: /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/downloads/tools/cmake-3.21.1-osx/cmake-3.21.1-macos-universal/CMake.app/Contents/bin/cmake --build . --config Debug --target install -- -v -j13
[cmake]     Working Directory: /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/buildtrees/opencv4/x64-osx-dynamic-dbg
[cmake]     See logs for more information:
[cmake]       /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/buildtrees/opencv4/install-x64-osx-dynamic-dbg-out.log
[cmake] 
[cmake] Call Stack (most recent call first):
[cmake]   scripts/cmake/vcpkg_build_cmake.cmake:104 (vcpkg_execute_build_process)
[cmake]   scripts/cmake/vcpkg_install_cmake.cmake:44 (vcpkg_build_cmake)
[cmake]   buildtrees/versioning/versions/opencv4/ba505df8f61764e9b4667b04958c748237d12d23/portfile.cmake:385 (vcpkg_install_cmake)
[cmake]   scripts/ports.cmake:140 (include)
[cmake] Error: Building package opencv4:x64-osx-dynamic failed with: BUILD_FAILED
[cmake] Please ensure you're using the latest portfiles with `./vcpkg update`, then
[cmake] submit an issue at https://github.com/Microsoft/vcpkg/issues including:
[cmake]   Package: opencv4:x64-osx-dynamic
[cmake]   Vcpkg version: 2021-08-12-unknownhash
[cmake] 
[cmake] Additionally, attach any relevant sections from the log files above.
[cmake] -- Running vcpkg install - failed
[cmake] CMake Error at 3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake:827 (message):
[cmake]   vcpkg install failed.  See logs for more information:
[cmake]   /Users/papillonmac/Documents/Testing/build/vcpkg-manifest-install.log
[cmake] Call Stack (most recent call first):
[cmake]   /usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeDetermineSystem.cmake:93 (include)
[cmake]   CMakeLists.txt:2 (project)
[cmake] 
[cmake] 
[cmake] CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
[cmake] CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
[cmake] -- Configuring incomplete, errors occurred!

Additional context I have used the custom triplet x64-osx-dynamic.cmake from vcpkg/triplets/community/ to built the dynamic libraries on macOS for opencv4. Has anyone a suggestion on how to solve this error?

JackBoosY commented 2 years ago

This issue hasn’t been updated in 3 month, if it is still an issue, please reopen this issue and provides /Users/papillonmac/Documents/Testing/3rdparty/vcpkg/buildtrees/opencv4/install-x64-osx-dynamic-dbg-out.log.