Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcpkg.exe crashes while building opencv 4.5.5 / quirc 1.1#2 package #30046

Closed
Arech opened this issue Mar 6, 2023 · 4 comments
Closed

vcpkg.exe crashes while building opencv 4.5.5 / quirc 1.1#2 package #30046

Arech opened this issue Mar 6, 2023 · 4 comments
Assignees
Labels
category:question This issue is a question

Comments

@Arech
Copy link

Arech commented Mar 6, 2023

Describe the bug
Current latest (and other few days old commit) vcpkg.exe crashes while building opencv / quirc package. About year old checkout of e809a42 works though.

-- Running vcpkg install
Detecting compiler hash for triplet x64-windows...
The following packages will be built and installed:
  * bzip2[core]:x64-windows -> 1.0.8#2 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\bzip2\a1ea352502e69888a565563d9151d3f7ab609fb1
  * expat[core]:x64-windows -> 2.4.1 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\expat\d63d8c6684bc73856e3f684601761939e32feeb3
  * libffi[core]:x64-windows -> 3.4.2#4 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\libffi\05f73f7c0bbd49045d312d90683a01405f5ffd83
  * libpng[core]:x64-windows -> 1.6.37#16 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\libpng\b082585ac20aefc27150af5386b6a8a15473e93a
    opencv4[core,default-features,dnn,jpeg,png,quirc,tiff,webp]:x64-windows -> 4.5.5 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\opencv4\afed148d21295bf99e8ac657fdb808ed82467871
  * openssl[core]:x64-windows -> 1.1.1m#2 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\openssl\29c9d32a703896143a51c55f0b7ae4298684afd6
  * protobuf[core]:x64-windows -> 3.18.0#1 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\protobuf\5f6aa04d94e184b89c1887946fb4684bc51c4611
    pybind11[core]:x64-windows -> 2.9.1 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\pybind11\24ea84c002f9cc529a54996dbbf2e9b2cce9cadf
  * python3[core]:x64-windows -> 3.10.1#8 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\python3\ce4fddbb41412be06577c61632e8e9ef0a67901c
  * quirc[core]:x64-windows -> 1.1#2 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\quirc\15bad29ef4d2466b236311ce7af075dbb9507ed9
  * sqlite3[core]:x64-windows -> 3.37.2#1 -- C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\sqlite3\f49ad405225c6326558adb79f2082814002a8cda
Additional packages (*) will be modified to complete this operation.
Restored 0 package(s) from C:\Users\<user>\AppData\Local\vcpkg\archives in 458.4 us. Use --debug to see more details.
Installing 1/11 quirc:x64-windows...
Building quirc[core]:x64-windows...
-- Installing port from location: C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\quirc\15bad29ef4d2466b236311ce7af075dbb9507ed9
-- Note: quirc only supports static library linkage. Building static library.
-- Using cached dlbeer-quirc-7e7ab596e4d0988faf1c12ae89c354b114181c40.tar.gz.
-- Cleaning sources at C:/Users/<user>/Documents/src/_ext/vcpkg/buildtrees/quirc/src/b114181c40-f1e71e0d5b.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/<user>/Documents/src/_ext/vcpkg/downloads/dlbeer-quirc-7e7ab596e4d0988faf1c12ae89c354b114181c40.tar.gz
-- Using source at C:/Users/<user>/Documents/src/_ext/vcpkg/buildtrees/quirc/src/b114181c40-f1e71e0d5b.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: C:/Users/<user>/Documents/src/_ext/vcpkg/packages/quirc_x64-windows/share/quirc/copyright/LICENSE
-- Performing post-build validation
warning: `copyright` being a directory is deprecated.
warning: The software license must be available at ${CURRENT_PACKAGES_DIR}/share/quirc/copyright
Elapsed time to handle quirc:x64-windows: 1.865 s
vcpkg has crashed. Please create an issue at https://github.com/microsoft/vcpkg containing a brief summary of what you were trying to do and the following information.

Version=2023-02-16-12e657924d99511514c0287ca5ce46882d3657c7
EXCEPTION=argument not found
CMD=
C:/Users/<user>/Documents/src/_ext/vcpkg/vcpkg.exe|
install|
--triplet|
x64-windows|
--vcpkg-root|
C:/Users/<user>/Documents/src/_ext/vcpkg|
--x-wait-for-lock|
--x-manifest-root=C:/Users/<user>/Documents/src/<project>|
--x-install-root=C:/Users/<user>/Documents/src/<project>/build/vcpkg_installed|
|
-- Running vcpkg install - failed
CMake Error at C:/Users/<user>/Documents/src/_ext/vcpkg/scripts/buildsystems/vcpkg.cmake:886 (message):
  vcpkg install failed.  See logs for more information:
  C:\Users\<user>\Documents\src\<project>\build\vcpkg-manifest-install.log
Call Stack (most recent call first):
  C:/Program Files/MVS2022_Pro/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/CMakeDetermineSystem.cmake:124 (include)
  CMakeLists.txt:5 (project)


CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

(while I was writing this bug report a new commit has been pushed that bumped vcpkg version to Version=2023-03-01-538539c4e364dd6f14f5e36f6704144254845159, but still the result is the same for the same package:

Installing 12/22 quirc:x64-windows...
Building quirc[core]:x64-windows...
-- Installing port from location: C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\quirc\15bad29ef4d2466b236311ce7af075dbb9507ed9
-- Note: quirc only supports static library linkage. Building static library.
-- Using cached dlbeer-quirc-7e7ab596e4d0988faf1c12ae89c354b114181c40.tar.gz.
-- Cleaning sources at C:/Users/<user>/Documents/src/_ext/vcpkg/buildtrees/quirc/src/b114181c40-f1e71e0d5b.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/<user>/Documents/src/_ext/vcpkg/downloads/dlbeer-quirc-7e7ab596e4d0988faf1c12ae89c354b114181c40.tar.gz
-- Using source at C:/Users/<user>/Documents/src/_ext/vcpkg/buildtrees/quirc/src/b114181c40-f1e71e0d5b.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: C:/Users/<user>/Documents/src/_ext/vcpkg/packages/quirc_x64-windows/share/quirc/copyright/LICENSE
-- Performing post-build validation
warning: `copyright` being a directory is deprecated.
warning: The software license must be available at ${CURRENT_PACKAGES_DIR}/share/quirc/copyright
Elapsed time to handle quirc:x64-windows: 1.927 s
vcpkg has crashed. Please create an issue at https://github.com/microsoft/vcpkg containing a brief summary of what you were trying to do and the following information.

Version=2023-03-01-538539c4e364dd6f14f5e36f6704144254845159
EXCEPTION=argument not found
CMD=
C:/Users/<user>/Documents/src/_ext/vcpkg/vcpkg.exe|
install|
--triplet|
x64-windows|
--vcpkg-root|
C:/Users/<user>/Documents/src/_ext/vcpkg|
--x-wait-for-lock|
--x-manifest-root=C:/Users/<user>/Documents/src/<project>|
--x-install-root=C:/Users/<user>/Documents/src/<project>/build/vcpkg_installed|
|
-- Running vcpkg install - failed
CMake Error at C:/Users/<user>/Documents/src/_ext/vcpkg/scripts/buildsystems/vcpkg.cmake:886 (message):
  vcpkg install failed.  See logs for more information:
  C:\Users\<user>\Documents\src\<project>\build\vcpkg-manifest-install.log
Call Stack (most recent call first):
  C:/Program Files/MVS2022_Pro/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/CMakeDetermineSystem.cmake:124 (include)
  CMakeLists.txt:5 (project)


CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Environment

  • OS: Windows 10 21H2 build 19044.2604
  • Compiler: Latest MSVC 2022 v17.5.1

To Reproduce
Steps to reproduce the behavior:

  1. checkout the latest master (current latest is 8daf70c but the error happens with a several days ago commit also)
  2. run bootstrap-vcpkg.bat
  3. vcpkg.json of the project is:
{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
  "name": "project",
  "version": "0.0.1",
  "builtin-baseline": "5962cf5a3bfc2124e8de991a4e45a8edcb3b4c69",
  "dependencies": [
    {"name": "benchmark", "version>=": "1.6.0"},
    {"name":"gtest",      "version>=": "1.11.0#3", "platform": "windows"},
    {"name":"ms-gsl",     "version>=": "4.0.0", "platform": "windows"},
    {"name":"opencv4",    "version>=": "4.5.5", "platform": "windows"},
    {"name":"pybind11",   "version>=": "2.9.1", "platform": "windows"},
    {"name":"glfw3",      "version>=": "3.3.6", "platform": "windows"}
  ]
}
  1. try to build dummy CMake project with vcpkg.json above. Perhaps vcpkg install opencv4 of version "4.5.5" from the baseline should also do
  2. See error

Expected behavior
Checkout old e809a42 and do the steps above - everything works fine.

Failure logs
see above, there's nothing in the log file that isn't above.

@Adela0814 Adela0814 self-assigned this Mar 7, 2023
@Adela0814 Adela0814 added the requires:repro The issue is not currently repro-able label Mar 7, 2023
@Adela0814
Copy link
Contributor

Adela0814 commented Jun 1, 2023

@Arech I can't repro this issue locally. Could you please try the solution in #22163 (comment)?

@Arech
Copy link
Author

Arech commented Jun 1, 2023

@Adela0814 thank you, I will try. We have a bunch of people in the company, who also run into this issue, but I can't share the project that spawns it... I'll try your suggested solution and get back to you with the results. If that won't help, I'll try to make a minimal working failing example and will post it. Thanks for taking care!

@Arech
Copy link
Author

Arech commented Jun 1, 2023

I looked at the proposed solution and... erm, I'm not using GCC at all for this. It's MSVC@Windows10. I might be slightly wrong (config might be a bit different, I need to check it), but afair that project that fails with MSVC@Windows10 compiles nicely on Ubuntu 20.04 with native gcc. Also out of several projects that use vcpkg ports from official repo, only this one fails; all the others works perfectly fine.
I read all other messages in the thread and, honestly, I just don't see how it's applicable to my case...
I'll try to come up with a minimal failing example.

@Arech
Copy link
Author

Arech commented Jun 1, 2023

It looks like that latest master already contains some resolution of the issue. Now it also works for me:

Installing 11/21 quirc:x64-windows...
Building quirc[core]:x64-windows...
-- Installing port from location: C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\quirc\15bad29ef4d2466b236311ce7af075dbb9507ed9
-- Note: quirc only supports static library linkage. Building static library.
-- Using cached dlbeer-quirc-7e7ab596e4d0988faf1c12ae89c354b114181c40.tar.gz.
-- Cleaning sources at C:/Users/<user>/Documents/src/_ext/vcpkg/buildtrees/quirc/src/b114181c40-f1e71e0d5b.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/<user>/Documents/src/_ext/vcpkg/downloads/dlbeer-quirc-7e7ab596e4d0988faf1c12ae89c354b114181c40.tar.gz
-- Using source at C:/Users/<user>/Documents/src/_ext/vcpkg/buildtrees/quirc/src/b114181c40-f1e71e0d5b.clean
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: C:/Users/<user>/Documents/src/_ext/vcpkg/packages/quirc_x64-windows/share/quirc/copyright/LICENSE
-- Performing post-build validation
warning: `copyright` being a directory is deprecated.
warning: The software license must be available at ${CURRENT_PACKAGES_DIR}/share/quirc/copyright

    configure_file("${CURRENT_BUILDTREES_DIR}/C:/Users/<user>/Documents/src/_ext/vcpkg/buildtrees/quirc//LICENSE" "${CURRENT_PACKAGES_DIR}/share/quirc/copyright" COPYONLY)
error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: C:\Users\<user>\Documents\src\_ext\vcpkg\buildtrees\versioning_\versions\quirc\15bad29ef4d2466b236311ce7af075dbb9507ed9\portfile.cmake
Stored binaries in 1 destinations.
Elapsed time to handle quirc:x64-windows: 2.1 s
Installing 12/21 libpng:x64-windows...

It spawns some warnings and 1 post-build check problem, but nonetheless it works which is great news to me! :)

Closing the issue as resolved.

@Arech Arech closed this as completed Jun 1, 2023
@Adela0814 Adela0814 added category:question This issue is a question and removed requires:repro The issue is not currently repro-able labels Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants