microsoft / vcpkg

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

"Error: Failed to convert to UTF-8: invalid code unit" when building vcpkg-cmake #38477

Open yong57 opened 2 weeks ago

yong57 commented 2 weeks ago

Operating system

Windows 11

Compiler

No response

Steps to reproduce the behavior

PS C:\src\vcpkg> .\vcpkg install colmap[cuda,tests]:x64-windows
Computing installation plan...
The following packages will be built and installed:
  * blas:x64-windows@2023-04-14
  * boost-accumulators:x64-windows@1.84.0#1
  * boost-algorithm:x64-windows@1.84.0#1
  * boost-align:x64-windows@1.84.0#1
  * boost-any:x64-windows@1.84.0#1
  * boost-array:x64-windows@1.84.0#1
  * boost-assert:x64-windows@1.84.0#1
  * boost-atomic:x64-windows@1.84.0#1
  * boost-bimap:x64-windows@1.84.0#1
  * boost-bind:x64-windows@1.84.0#1
  * boost-callable-traits:x64-windows@1.84.0#1
  * boost-chrono:x64-windows@1.84.0#1
  * boost-circular-buffer:x64-windows@1.84.0#1
  * boost-cmake:x64-windows@1.84.0
  * boost-compute:x64-windows@1.84.0#1
  * boost-concept-check:x64-windows@1.84.0#1
  * boost-config:x64-windows@1.84.0#1
  * boost-container:x64-windows@1.84.0#1
  * boost-container-hash:x64-windows@1.84.0#1
  * boost-conversion:x64-windows@1.84.0#1
  * boost-core:x64-windows@1.84.0#1
  * boost-date-time:x64-windows@1.84.0#1
  * boost-describe:x64-windows@1.84.0#1
  * boost-detail:x64-windows@1.84.0#1
  * boost-dynamic-bitset:x64-windows@1.84.0#1
  * boost-endian:x64-windows@1.84.0#1
  * boost-exception:x64-windows@1.84.0#1
  * boost-filesystem:x64-windows@1.84.0#1
  * boost-foreach:x64-windows@1.84.0#1
  * boost-function:x64-windows@1.84.0#1
  * boost-function-types:x64-windows@1.84.0#1
  * boost-functional:x64-windows@1.84.0#1
  * boost-fusion:x64-windows@1.84.0#1
  * boost-geometry:x64-windows@1.84.0#1
  * boost-graph:x64-windows@1.84.0#1
  * boost-headers:x64-windows@1.84.0
  * boost-heap:x64-windows@1.84.0#1
  * boost-integer:x64-windows@1.84.0#1
  * boost-interval:x64-windows@1.84.0#1
  * boost-intrusive:x64-windows@1.84.0#1
  * boost-io:x64-windows@1.84.0#1
  * boost-iostreams[bzip2,core,lzma,zlib,zstd]:x64-windows@1.84.0#1
  * boost-iterator:x64-windows@1.84.0#1
  * boost-lambda:x64-windows@1.84.0#1
  * boost-lexical-cast:x64-windows@1.84.0#1
  * boost-logic:x64-windows@1.84.0#1
  * boost-math:x64-windows@1.84.0#1
  * boost-move:x64-windows@1.84.0#1
  * boost-mp11:x64-windows@1.84.0#1
  * boost-mpl:x64-windows@1.84.0#1
  * boost-multi-array:x64-windows@1.84.0#1
  * boost-multi-index:x64-windows@1.84.0#1
  * boost-multiprecision:x64-windows@1.84.0#1
  * boost-numeric-conversion:x64-windows@1.84.0#1
  * boost-optional:x64-windows@1.84.0#1
  * boost-parameter:x64-windows@1.84.0#1
  * boost-phoenix:x64-windows@1.84.0#1
  * boost-polygon:x64-windows@1.84.0#1
  * boost-pool:x64-windows@1.84.0#1
  * boost-predef:x64-windows@1.84.0#1
  * boost-preprocessor:x64-windows@1.84.0#1
  * boost-program-options:x64-windows@1.84.0#1
  * boost-property-map:x64-windows@1.84.0#1
  * boost-property-tree:x64-windows@1.84.0#1
  * boost-proto:x64-windows@1.84.0#1
  * boost-ptr-container:x64-windows@1.84.0#1
  * boost-qvm:x64-windows@1.84.0#1
  * boost-random:x64-windows@1.84.0#1
  * boost-range:x64-windows@1.84.0#1
  * boost-ratio:x64-windows@1.84.0#1
  * boost-rational:x64-windows@1.84.0#1
  * boost-regex:x64-windows@1.84.0#1
  * boost-serialization:x64-windows@1.84.0#1
  * boost-smart-ptr:x64-windows@1.84.0#1
  * boost-spirit:x64-windows@1.84.0#1
  * boost-static-assert:x64-windows@1.84.0#1
  * boost-system:x64-windows@1.84.0#1
  * boost-test:x64-windows@1.84.0#1
  * boost-thread:x64-windows@1.84.0#1
  * boost-throw-exception:x64-windows@1.84.0#1
  * boost-tokenizer:x64-windows@1.84.0#1
  * boost-tti:x64-windows@1.84.0#1
  * boost-tuple:x64-windows@1.84.0#1
  * boost-type-index:x64-windows@1.84.0#1
  * boost-type-traits:x64-windows@1.84.0#1
  * boost-typeof:x64-windows@1.84.0#1
  * boost-ublas:x64-windows@1.84.0#1
  * boost-uninstall:x64-windows@1.84.0#1
  * boost-units:x64-windows@1.84.0#1
  * boost-unordered:x64-windows@1.84.0#1
  * boost-utility:x64-windows@1.84.0#1
  * boost-uuid:x64-windows@1.84.0#1
  * boost-variant:x64-windows@1.84.0#1
  * boost-variant2:x64-windows@1.84.0#1
  * boost-winapi:x64-windows@1.84.0#1
  * boost-xpressive:x64-windows@1.84.0#1
  * brotli:x64-windows@1.1.0#1
  * bzip2[core,tool]:x64-windows@1.0.8#5
  * ceres[core,lapack,suitesparse]:x64-windows@2.1.0#5
  * cgal:x64-windows@5.6.1
    colmap[core,cuda,tests]:x64-windows@2023-10-01
  * cuda:x64-windows@10.1#13
  * double-conversion:x64-windows@3.3.0
  * egl-registry:x64-windows@2024-01-25
  * eigen3:x64-windows@3.4.0#4
  * flann:x64-windows@2019-04-07#7
  * freeglut:x64-windows@3.4.0#1
  * freeimage:x64-windows@3.18.0#26
  * freetype[brotli,bzip2,core,png,zlib]:x64-windows@2.13.2#1
  * gflags:x64-windows@2.2.2#9
  * gklib:x64-windows@2023-03-27
  * glew:x64-windows@2.2.0#3
  * glog:x64-windows@0.7.0#1
  * gmp:x64-windows@6.3.0
  * gtest:x64-windows@1.14.0#1
  * harfbuzz[core,freetype]:x64-windows@8.4.0#1
  * imath:x64-windows@3.1.11
  * jasper[core,default-features,opengl]:x64-windows@4.2.1
  * jxrlib:x64-windows@2019.10.9#6
  * lapack:x64-windows@2023-06-10
  * lapack-reference[blas-select,core,noblas]:x64-windows@3.11.0#6
  * lcms:x64-windows@2.14
  * libdeflate[compression,core,decompression,gzip,zlib]:x64-windows@1.20
  * libjpeg-turbo:x64-windows@3.0.2
  * liblzma:x64-windows@5.4.4
  * libpng:x64-windows@1.6.43#1
  * libraw:x64-windows@0.21.2
  * libwebp[core,libwebpmux,nearlossless,simd,unicode]:x64-windows@1.4.0
  * lz4:x64-windows@1.9.4#1
  * metis:x64-windows@2022-07-27
  * mpfr:x64-windows@4.2.1
  * openblas:x64-windows@0.3.27
  * openexr:x64-windows@3.2.3#1
  * opengl:x64-windows@2022-12-04#3
  * opengl-registry:x64-windows@2024-02-10#1
  * openjpeg:x64-windows@2.5.2
  * openssl:x64-windows@3.3.0
  * pcre2[core,jit,platform-default-features]:x64-windows@10.43
  * pkgconf:x64-windows@2.2.0
  * qt5-base:x64-windows@5.15.13#1
  * sqlite3[core,json1]:x64-windows@3.45.3
  * suitesparse:x64-windows@5.8.0#2
  * tiff[core,jpeg,lzma,zip]:x64-windows@4.6.0#4
  * vcpkg-boost:x64-windows@2024-04-25
  * vcpkg-cmake:x64-windows@2023-05-04
  * vcpkg-cmake-config:x64-windows@2022-02-06#1
  * vcpkg-cmake-get-vars:x64-windows@2023-12-31
  * vcpkg-gfortran:x64-windows@3#3
  * vcpkg-pkgconfig-get-modules:x64-windows@2023-09-06
  * vcpkg-tool-meson:x64-windows@1.3.2#2
  * zlib:x64-windows@1.3.1
  * zstd:x64-windows@1.5.6
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
-- Automatically setting %HTTP(S)_PROXY% environment variables to "127.0.0.1:7890".
Compiler found: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\feima\AppData\Local\vcpkg\archives in 1.23 ms. Use --debug to see more details.
Installing 1/152 vcpkg-cmake:x64-windows@2023-05-04...
Building vcpkg-cmake:x64-windows@2023-05-04...
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg-port-config.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/copyright
error: Failed to convert to UTF-8: invalid code unit
PS C:\src\vcpkg> chcp
Active code page: 65001
PS C:\src\vcpkg>

Failure logs

In the vcpkg/buildtrees/vcpkg-cmake/stdout-x64-windows.log,only have: -- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake -- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake -- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake -- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg-port-config.cmake -- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/copyright

Additional context

vcpkg is the newest PowerShell Version:7.2.16 System Region:China(Simple),I checked "Beta: Use Unicode UTF-8 for global language support"

MonicaLiu0311 commented 1 week ago

Try checking: https://github.com/microsoft/vcpkg/issues/37420#issuecomment-1996253121