【问题标题】:Problem installing Cairo library using VCPKG使用 VCPKG 安装 Cairo 库时出现问题
【发布时间】:2022-08-14 20:36:10
【问题描述】:

我是一名新手编程学生,很长一段时间以来一直在偶然发现这个问题。 我正在尝试按照此链接中的说明安装 Io2D 库:https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md

但是,每次我尝试安装 Cairo 时都会收到此错误:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
    Command failed: \"C:/Program Files/src/vcpkg/downloads/tools/msys2/7e05e7aa09f1709f/usr/bin/bash.exe\" --noprofile --norc --debug -c \"V=1 CPP=\'compile cl.exe -E\' CC=\'compile cl.exe\' CC_FOR_BUILD=\'compile cl.exe\' CXX=\'compile cl.exe\' RC=\'windres-rc rc.exe\' WINDRES=\'windres-rc rc.exe\' AR=\'ar-lib lib.exe\' LD=\'link.exe -verbose\' RANLIB=\':\' STRIP=\':\' NM=\'dumpbin.exe -symbols -headers\' DLLTOOL=\'link.exe -verbose -dll\' CCAS=\':\' AS=\':\' ./../src/1.17-e2a53830aa.clean/configure --build=i686-pc-mingw32 \\\"--enable-extra-encodings\\\" \\\"--without-libiconv-prefix\\\" \\\"--without-libintl-prefix\\\" \\\"--enable-relocatable\\\" \\\"ac_cv_prog_ac_ct_STRIP=:\\\" \\\"gl_cv_double_slash_root=yes\\\" \\\"ac_cv_func_memmove=yes\\\" \\\"--disable-silent-rules\\\" \\\"--verbose\\\" \\\"--enable-shared\\\" \\\"--disable-static\\\" \\\"--prefix=/C/Program Files/src/vcpkg/installed/x86-windows/debug\\\" \\\"--bindir=\\\\${prefix}/../tools/libiconv/debug/bin\\\" \\\"--sbindir=\\\\${prefix}/../tools/libiconv/debug/sbin\\\" \\\"--libdir=\\\\${prefix}/lib\\\" \\\"--includedir=\\\\${prefix}/../include\\\" \\\"--datarootdir=\\\\${prefix}/share/libiconv\\\"\"
    Working Directory: C:/Program Files/src/vcpkg/buildtrees/libiconv/x86-windows-dbg
    Error code: This version of %1 is not compatible with the version of Windows you\'re running. Check your computer\'s system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher
    See logs for more information:

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:707 (vcpkg_execute_required_process)
  ports/libiconv/portfile.cmake:29 (vcpkg_configure_make)
  scripts/ports.cmake:146 (include)


error: building libiconv:x86-windows failed with: BUILD_FAILED
Please ensure you\'re using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libiconv
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[libiconv]+Build+error
Include \'[libiconv] Build error\' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: 2022-06-17-9268e366206712e38102b28dbd1617697a99ff2e
    vcpkg-scripts version: 98f8d00e8 2022-07-08 (3 days ago)

You can also use the prefilled template from C:\\Program Files\\src\\vcpkg\\installed\\vcpkg\\issue_body.md.
  • CC=\'compile cl.exe\' 这看起来不对

标签: c++ cmake cairo vcpkg


【解决方案1】:

Vcpkg 不附带构建其中一些库所需的任何利基材料。 Cairo 似乎需要 Bison,它使用了仅 Python 3.7+ 版本支持的注解导入。

所以首先安装 Bison,然后确保你有最低版本的 python 3.7 并且 cairo 安装应该可以正常工作(理论上)。我必须在 ubuntu 18.04 上执行此操作。

【讨论】:

    最近更新 更多