On Windows 10 Home, version 1909
Compiler VS2019 (irrelevant)
To Reproduce
Steps to reproduce the behavior:
./vcpkg install freeglut:x64-windows
Observed behaviour
Extracting archive freeglut-3.0.0.tar.gz fails (download succeeds).
Similar to issue #5861, identical to the situation in the comment by GreenEminence.
I found that the problem is due to a symbolic link in the archive. See below for more details.
Failure logs
freeglut[core]:x64-windows
Starting package 1/1: freeglut:x64-windows
Building package freeglut[core]:x64-windows...
-- Using cached C:/vcpkg/downloads/freeglut-3.0.0.tar.gz
-- Extracting source C:/vcpkg/downloads/freeglut-3.0.0.tar.gz
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
Command failed: C:/vcpkg/downloads/tools/cmake-3.14.0-windows/cmake-3.14.0-win32-x86/bin/cmake.exe -E tar xjf C:/vcpkg/downloads/freeglut-3.0.0.tar.gz
Working Directory: C:/vcpkg/buildtrees/freeglut/src/TEMP
Error code: 1
See logs for more information:
C:\vcpkg\buildtrees\freeglut\extract-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive.cmake:43 (vcpkg_execute_required_process)
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:108 (vcpkg_extract_source_archive)
ports/freeglut/portfile.cmake:9 (vcpkg_extract_source_archive_ex)
scripts/ports.cmake:90 (include)
Error: Building package freeglut:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: freeglut:x64-windows
Vcpkg version: 2020.02.04-nohash
the extract-err.log shows this:
CMake Error: Problem with archive_write_header(): Can't create '' CMake Error: Current file: freeglut-3.0.0/progs/test-shapes-gles1/android_toolchain.cmake CMake Error: Problem extracting tar: C:/Users/greeneminence/dev/vcpkg/downloads/freeglut-3.0.0.tar.gz
Additional context
The file freeglut-3.0.0/progs/test-shapes-gles1/android_toolchain.cmake in the archive is a symbolic link.
7zip has problems extracting this file. When I run 7zip (outside vcpkg) on the downloaded freeglut-3.0.0.tar,gz file, it gives this error message:
"Can not create symbolic link: one of the required permissions is not granted to the client"
When I do 7zip "run as administrator", it can unpack the archive. This is in line with this bug report on 7zip:
https://sourceforge.net/p/sevenzip/bugs/1599/
The maintainer of 7zip seems to treat this as a feature, not a bug.
Although I can extract the archive now, I don't know how to do this in combination with vcpkg.
For a temporary fix, you can comment out the checksum with a # and add the checksum of the new archive created in the _vcpkg-root_\ports\freeglut\portfile.cmake and put a copy of the new archive in _vcpkg-root_\downloads.
Could you install cmake 3.17.0 manually and try again?
If it works, we will consider to update cmake to 3.17.0 later.
Related: #10552 #10336 #6059 #10492 #5951 #9078 #8603.
The fix of timautry worked. I will investigate the cmake update option later.
Confirmed, cmake 3.17.0 has been fixed this issue.
I will update cmake to 3.17.0 later.
Updating to Cmake 3.17 indeed fixes the issue.
Most helpful comment
Updating to Cmake 3.17 indeed fixes the issue.