xmake icon indicating copy to clipboard operation
xmake copied to clipboard

安装指定版本的vcpkg::yaml-cpp失败;同样,安装指定版本的vcpkg::mongo-cxx-driver也会失败

Open wond12 opened this issue 2 years ago • 3 comments

Xmake 版本

2.7.6

操作系统版本和架构

Windows 10, CentOS 7

描述问题

当指定vcpkg包的版本号时,部分包安装会失败;不指定版本号,则能成功;不通过xmake安装,而是直接使用vcpkg安装,则没有问题。xmake示例: add_rules("mode.debug", "mode.release") add_requires("vcpkg::yaml-cpp", {version="0.7.0"})

target("test_binary") set_kind("binary") add_files("src/main.cpp") add_packages("vcpkg::yaml-cpp")

期待的结果

当指定vcpkg包的版本号时,安装成功

工程配置

No response

附加信息和错误日志

No response

wond12 avatar Feb 22 '23 07:02 wond12

失败,就贴 logs

waruqi avatar Feb 22 '23 07:02 waruqi

失败,就贴 logs

The following packages will be built and installed:

  • vcpkg-cmake[core]:x64-linux -> 2021-02-28#1 -- /root/vcpkg/buildtrees/versioning_/versions/vcpkg-cmake/4abdcc88bd5ec2c76e320eb2ff4db665ee9913ac
  • vcpkg-cmake-config[core]:x64-linux -> 2021-02-26#1 -- /root/vcpkg/buildtrees/versioning_/versions/vcpkg-cmake-config/46d60d4dd4297bedecdcd308167ad2492b269183 yaml-cpp[core]:x64-linux -> 0.7.0 -- /root/vcpkg/buildtrees/versioning_/versions/yaml-cpp/a71932a4f18c3cc6e0bd2bdce57fbf744e0efe2b Additional packages (*) will be modified to complete this operation. [DEBUG] 1006: popen( unzip -qq /root/.cache/vcpkg/archives/6a/6a7c480fa7dafdfd108f9d3fc2cd52137c458dbd7c58e803740cc2bd3bc9a14b.zip -d/root/vcpkg/packages/vcpkg-cmake_x64-linux 2>&1) [DEBUG] 1007: popen( unzip -qq /root/.cache/vcpkg/archives/50/50b3463b3e969221c8c3a77ceed18e7d5625457e681e6f3f0216cd3ab56f91ee.zip -d/root/vcpkg/packages/yaml-cpp_x64-linux 2>&1) [DEBUG] 1005: popen( unzip -qq /root/.cache/vcpkg/archives/8d/8dd8d2632142b3cd0dd7a4885672f8e6235de2edf4431778760ab03b15f6d682.zip -d/root/vcpkg/packages/vcpkg-cmake-config_x64-linux 2>&1) [DEBUG] 1006: cmd_execute_and_stream_data() returned 0 after 4982 us [DEBUG] 1005: cmd_execute_and_stream_data() returned 0 after 5064 us [DEBUG] 1007: cmd_execute_and_stream_data() returned 0 after 136568 us [DEBUG] Restored /root/.cache/vcpkg/archives/8d/8dd8d2632142b3cd0dd7a4885672f8e6235de2edf4431778760ab03b15f6d682.zip [DEBUG] Restored /root/.cache/vcpkg/archives/6a/6a7c480fa7dafdfd108f9d3fc2cd52137c458dbd7c58e803740cc2bd3bc9a14b.zip [DEBUG] Restored /root/.cache/vcpkg/archives/50/50b3463b3e969221c8c3a77ceed18e7d5625457e681e6f3f0216cd3ab56f91ee.zip Restored 3 package(s) from /root/.cache/vcpkg/archives in 142.5 ms. Use --debug to see more details. Installing 1/3 vcpkg-cmake-config:x64-linux... Elapsed time to handle vcpkg-cmake-config:x64-linux: 1.033 ms Installing 2/3 vcpkg-cmake:x64-linux... Elapsed time to handle vcpkg-cmake:x64-linux: 981.8 us Installing 3/3 yaml-cpp:x64-linux... Elapsed time to handle yaml-cpp:x64-linux: 12.31 ms Total install time: 157 ms [DEBUG] /mnt/vss/_work/1/s/src/vcpkg/commands.setinstalled.cpp(148): [DEBUG] Time in subprocesses: 661326 us [DEBUG] Time in parsing JSON: 24415 us [DEBUG] Time in JSON reader: 1505 us [DEBUG] Time in filesystem: 2632 us [DEBUG] Time in loading ports: 377 us [DEBUG] Exiting after 716.3 ms (715885 us) finding yaml-cpp from vcpkg .. checking for vcpkg::yaml-cpp ... no

error: .../modules/private/action/require/impl/actions/install.lua:333: fetch vcpkg::yaml-cpp-0.7.0 failed! stack traceback: [C]: in function 'error' [@programdir/core/base/os.lua:898]: in function 'raiselevel' [@programdir/core/sandbox/modules/utils.lua:149]: in function 'assert' [.../modules/private/action/require/impl/actions/install.lua:333]:

=> install vcpkg::yaml-cpp 0.7.0 .. failed error: @programdir/modules/private/async/runjobs.lua:256: .../modules/private/action/require/impl/actions/install.lua:410: install failed! stack traceback: [C]: in function 'error' [@programdir/core/base/os.lua:898]: [.../modules/private/action/require/impl/actions/install.lua:410]: in function 'catch' [@programdir/core/sandbox/modules/try.lua:123]: in function 'try' [.../modules/private/action/require/impl/actions/install.lua:268]: [...modules/private/action/require/impl/install_packages.lua:479]: in function 'jobfunc' [@programdir/modules/private/async/runjobs.lua:232]:

stack traceback: [C]: in function 'error' @programdir/core/base/os.lua:898: in function 'base/os.raiselevel' (...tail calls...) @programdir/modules/private/async/runjobs.lua:256: in field 'catch' @programdir/core/sandbox/modules/try.lua:123: in global 'try' @programdir/modules/private/async/runjobs.lua:218: in upvalue 'cotask' @programdir/core/base/scheduler.lua:404: in function <@programdir/core/base/scheduler.lua:397>

wond12 avatar Feb 22 '23 08:02 wond12

查找失败了,你可以调下 https://github.com/xmake-io/xmake/blob/master/xmake/modules/package/manager/vcpkg/find_package.lua 看为什么没找到

waruqi avatar Feb 22 '23 09:02 waruqi