在尝试使用 vcpkg 安装 GTK 时,它无法提取libexpat-libexpat-R_2_2_6.tar.gz:
Building package expat[core]:x64-windows...
-- Downloading https://github.com/libexpat/libexpat/archive/R_2_2_6.tar.gz...
-- Extracting source C:/Users/USER/git/vcpkg/downloads/libexpat-libexpat-R_2_2_6.tar.gz
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:56 (message):
Command failed: C:/Program Files/CMake/bin/cmake.exe;-E;tar;xjf;C:/Users/USER/git/vcpkg/downloads/libexpat-libexpat-R_2_2_6.tar.gz
Working Directory: C:/Users/USER/git/vcpkg/buildtrees/expat/src/TEMP
Error code: 1
See logs for more information:
C:\Users\USER\git\vcpkg\buildtrees\expat\extract-err.log
提取-err.log:
CMake Error: Problem with archive_write_header(): Can't create ''
CMake Error: Current file: libexpat-R_2_2_6/README.md
CMake Error: Problem extracting tar: C:/Users/USER/git/vcpkg/downloads/libexpat-libexpat-R_2_2_6.tar.gz
手动运行 tar 会导致:
> tar xjf C:/Users/USER/git/vcpkg/downloads/libexpat-libexpat-R_2_2_6.tar.gz
libexpat-R_2_2_6/README.md: Can't create '\\\\?\\C:\\Users\\USER\\git\\vcpkg\\buildtrees\\expat\\src\\TEMP\\libexpat-R_2_2_6\\README.md'
tar: Error exit delayed from previous errors.
版本:
- Microsoft Windows [版本 10.0.17763.437]
- cmake 版本 3.14.2
- bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp
- vcpkg 2018.11.23-nohash(提交 0907798)
编辑:
tar 错误是预料之中的,问题体现在 cmake 中,其中预期输出(请参阅 extract-err.log)应该是:
cmake -E tar: warning: skipping symbolic link "libexpat-R_2_2_6/README.md" -> "expat/README.md".
编辑:
看起来这是一个活跃的 cmake 问题https://gitlab.kitware.com/cmake/cmake/issues/19102