-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'CMake' failed while extracting #33904
Comments
It seems failing on appveyor.com too. Now we're downgrading to 2023-08-09 as a workaround. |
@HappySeaFox, Could you please add extra option --debug to the install command, retry then provide the output? |
If I run |
|
I have the same problem on MSYS2 I tried both the master branch and also |
Here is the output, I have error vcpkg install "qtbase[core,sql-sqlite]" --debug
|
@silverqx Try bootstrapping again after switching to 2023.08.09. |
You are right I forgot bootstrap again, thx |
Same issue. |
microsoft/vcpkg#33904 (comment) This reverts commit 8f1b688, "Revert vcpkg.exe to previous release [ci skip]".
https://james.darpinian.com/decoder/?q=1450 says
Is this also Windows 7?
OK, so you're saying tool release 2023-09-15 does not exhibit the problem?
OK, so this is saying 2023-09-15 does exhibit the problem? Can someone with the problem try manually downloading @JavierMatosD It seems like we should not be trying to use cmake to unpack cmake? I'd say might be related microsoft/vcpkg-tool#1039 but if it were that I'd expect we'd have gotten this reported earlier. |
Nope, it has a lot of free space and memory. The 2023.08.09 version works fine. The issue was introduced after this tag. |
I tried the master branch now on msys2 and still the same problem as I posted a few posts above. I'm on latest Win11 and latest msys2. Windows 7 😂 which normal developer would use Win7 😂 |
I also tried this on msys2 and the same problem. |
I am getting error 87. interestingly not when I run vcpkg-tool from inside of QtCreator but when I try to run vcpkg-tool outside of QtCreator it fails with error 87. (I build vcpkg-tool inside of QtCreator) |
Ok the root cause seems to be that i was in a bash shell. Running the command inside of powershell works. But using powershell started from bash also does not work. |
I see the same behavior as autoantwort with |
Can you explain what 'tried on msys2' means? (There's no |
The original report with the funny |
Attempts to resolve microsoft/vcpkg#33904
@nobu is this being run with bash? |
Looks like I"m hitting similar issue as described in this thread vcpkg.exe install polyhook2 --triplet x64-windows --debug ended up in a very strange error, but similar to above posts:
|
No problem, thanks for confirming! |
@HappySeaFox Is the Windows 7 problem you experienced fixed? I'm hopeful that the different error message you got is from the different OS but we have yet to reproduce that exact outcome... |
Sorry for the late response. I've just cloned a fresh copy of
The log:
Tested with two shells: the system |
microsoft/vcpkg#33904 This reverts commit 8f1b688, "Revert vcpkg.exe to previous release [ci skip]".
More interesting results:
LogF:\projects\git.vcpkg>vcpkg install libjpeg-turbo --triplet x64-windows --debug [DEBUG] To include the environment variables in debug output, pass --debug-env [DEBUG] Trying to load bundleconfig from F:\projects\git.vcpkg\vcpkg-bundle.json[DEBUG] Failed to open: F:\projects\git.vcpkg\vcpkg-bundle.json
Log[DEBUG] To include the environment variables in debug output, pass --debug-env [DEBUG] Trying to load bundleconfig from F:\projects\git.vcpkg\vcpkg-bundle.json [DEBUG] Failed to open: F:\projects\git.vcpkg\vcpkg-bundle.json [DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt [DEBUG] Metrics enabled. [DEBUG] Feature flag 'binarycaching' unset [DEBUG] Feature flag 'compilertracking' unset [DEBUG] Feature flag 'registries' unset [DEBUG] Feature flag 'versions' unset [DEBUG] Feature flag 'dependencygraph' unset [DEBUG] Using scripts-root: F:\projects\git.vcpkg\scripts [DEBUG] Using builtin-ports: F:\projects\git.vcpkg\ports [DEBUG] Using installed-root: F:\projects\git.vcpkg\installed [DEBUG] Using buildtrees-root: F:\projects\git.vcpkg\buildtrees [DEBUG] Using packages-root: F:\projects\git.vcpkg\packages [DEBUG] Using vcpkg-root: F:\projects\git.vcpkg [DEBUG] Using scripts-root: F:\projects\git.vcpkg\scripts [DEBUG] Using builtin-registry: F:\projects\git.vcpkg\versions [DEBUG] Using downloads-root: F:\projects\git.vcpkg\downloads [DEBUG] Could not use IsWow64Process2, trying IsWow64Process Computing installation plan... [DEBUG] Found path: C:\Program Files\CMake\bin\cmake.exe [DEBUG] 1000: CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" --version) [DEBUG] 1000: cmd_execute_and_stream_data() returned 0 after 45682 us [DEBUG] 1001: CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" -DVCPKG_ROOT_DIR=F:/projects/git.vcpkg -DPACKAGES_DIR=F:/projects/git.vcpkg/packages -DBUILDTREES_DIR=F:/projects/git.vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=F:/projects/git.vcpkg/installed -DDOWNLOADS=F:/projects/git.vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "F:\projects\git.vcpkg\buildtrees\0.vcpkg_tags.cmake") [DEBUG] 1001: cmd_execute_and_stream_data() returned 0 after 33275 us The following packages will be built and installed: libjpeg-turbo:x64-windows -> 3.0.1 * vcpkg-cmake:x64-windows -> 2023-05-04 * vcpkg-cmake-config:x64-windows -> 2022-02-06#1 Additional packages (*) will be modified to complete this operation. [DEBUG] 1002: CreateProcessW("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -products * -format xml) [DEBUG] 1002: cmd_execute_and_stream_data() returned 0 after 29307 us [DEBUG] Trying to hash F:\projects\git.vcpkg\scripts\toolchains/windows.cmake [DEBUG] F:\projects\git.vcpkg\scripts\toolchains/windows.cmake has hash e36df1c7f50ab25f9c182fa927d06c19ae082e0d599f132b3f655784b49e4b33 [DEBUG] Trying to hash F:\projects\git.vcpkg\triplets\x64-windows.cmake [DEBUG] F:\projects\git.vcpkg\triplets\x64-windows.cmake has hash 4556164a2cd3dd6f4742101eabb46def7e71b6e5856faa88e5d005aac12a803c Detecting compiler hash for triplet x64-windows... [DEBUG] Found path: C:\dev\Git\cmd\git.exe [DEBUG] 1003: CreateProcessW("C:\dev\Git\cmd\git.exe" --version) [DEBUG] 1003: cmd_execute_and_stream_data() returned 0 after 39611 us [DEBUG] Could not use IsWow64Process2, trying IsWow64Process A suitable version of powershell-core was not found (required v7.2.11) Downloading portable powershell-core 7.2.11... Downloading powershell-core... https://github.com/PowerShell/PowerShell/releases/download/v7.2.11/PowerShell-7.2.11-win-x86.zip->F:\projects\git.vcpkg\downloads\PowerShell-7.2.11-win-x86.zip Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.2.11/PowerShell-7.2.11-win-x86.zip [DEBUG] Trying to hash F:\projects\git.vcpkg\downloads\PowerShell-7.2.11-win-x86.zip.12076.part [DEBUG] F:\projects\git.vcpkg\downloads\PowerShell-7.2.11-win-x86.zip.12076.part has hash e9581122101ad161ad628a6feb63e61d3ef8f064a3f325465e8a1a4a6cfc1affbc9bf63146efae0aa65ff9ea5c93018af2c413dc0940f0d162edef805659ec84 Extracting powershell-core... [DEBUG] 1004: CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" -E tar xzf "F:\projects\git.vcpkg\downloads\PowerShell-7.2.11-win-x86.zip") [DEBUG] 1004: cmd_execute() returned (error: calling CreateProcessW failed with 1450 (������������ ��������� �������� ��� ���������� ��������.)) after 2857 us 'CMake' failed while extracting F:\projects\git.vcpkg\downloads\PowerShell-7.2.11-win-x86.zip. [DEBUG] D:\a\_work\1\s\src\vcpkg\archives.cpp(323): [DEBUG] Time in subprocesses: 150732us [DEBUG] Time in parsing JSON: 116us [DEBUG] Time in JSON reader: 399us [DEBUG] Time in filesystem: 2422us [DEBUG] Time in loading ports: 1576us [DEBUG] Exiting after 19 s (19398887us)
I executed git clean -dfx
bootstrap-vcpkg.bat before each test. |
latest bits are still failing in my case:
|
@HappySeaFox @greenozon Are these both Windows 7? |
@BillyONeal Yes it's Win7 in my case. |
as well, w7 x64 SP1 |
'CMake' failed while extracting
'CMake' failed while extracting
I had the same issue (but with |
I'm getting the same problem as SunBlack. The latest vcpkg at commit ce46ba8 with a fresh setup and CMake 3.28.1 keeps giving the "failed while extracting" error. Reverting to CMake 3.27.9 fixes the problem. I'm running up-to-date Windows 11. Is any other information needed? |
@BillyONeal I had the same issue too when installing any packages.
I am using VS2019, on Windows 7 SP1. with powershell 7.2.17. if I install the package with --debug:
and at the same time, the dialog bellow shows up, saying that the vcpkg.exe has stopped working... There is an empty folder named "7zip-23.01-windows.partial.5768" be created in the "vcpkg\downloads\tools" dir. But the " "D:\Libs\vcpkg\downloads\tools\cmake-3.27.1-windows |
'CMake' failed while extracting
I did some testing and when running vcpkg with
The command to extract the file seems to come from here: https://github.com/microsoft/vcpkg-tool/blob/710a3116bbd615864eef5f9010af178034cb9b44/src/vcpkg/archives.cpp#L316-L328 Digging through the calls the problem seems to be happening here: https://github.com/microsoft/vcpkg-tool/blob/710a3116bbd615864eef5f9010af178034cb9b44/src/vcpkg/base/system.process.cpp#L760-L773 One of the parameters passed in to Running the extract command directly works just fine so CMake itself doesn't seem to be at fault here, unless some property of the executable changed in a way that causes The Using a shorter path to the Git repository does not stop this from happening. Sidenote: CMake's Relevant info: |
I built auto maybe_error = proc_attribute_list.update_attribute(
PROC_THREAD_ATTRIBUTE_HANDLE_LIST, handles_to_inherit, number_of_handles * sizeof(HANDLE));
if (!maybe_error.has_value())
{
return maybe_error.error();
} Commenting out this code allows the process to be created successfully. I printed out the handle values as integers to see what's going on: constexpr size_t number_of_candidate_handles = 3;
HANDLE handles_to_inherit[number_of_candidate_handles] = {
GetStdHandle(STD_INPUT_HANDLE), GetStdHandle(STD_OUTPUT_HANDLE), GetStdHandle(STD_ERROR_HANDLE)};
//Util::sort(handles_to_inherit);
size_t number_of_handles =
std::unique(handles_to_inherit, handles_to_inherit + number_of_candidate_handles) - handles_to_inherit;
Debug::println(fmt::format("number of handles: {}", number_of_handles));
for (int i = 0; i < 3; ++i)
{
Debug::println(fmt::format("handle {}: {:x}", i, (uintptr_t)handles_to_inherit[i]));
} This printed:
Standard input's value is My guess is that CMake 3.28 is making the handle invalid somehow. Perhaps a change in how CMake handles Looking at CMake's history for that command i can see one change that might be the cause: https://gitlab.kitware.com/cmake/cmake/-/commit/5420639a8d696055577de638e0952d6936706f18 The way standard input is set might be incorrect here: builder.SetExternalStream(cmUVProcessChainBuilder::Stream_INPUT, cm_fileno(stdin)); Note how output and error streams use a different function: builder.SetBuiltinStream(cmUVProcessChainBuilder::Stream_OUTPUT); However the code to set a builtin input stream has this: // FIXME To confirm this i used execute_process(
INPUT_FILE "foo.txt"
COMMAND "${Z_VCPKG_EXECUTABLE}" install
--triplet "${VCPKG_TARGET_TRIPLET}"
--vcpkg-root "${Z_VCPKG_ROOT_DIR}"
"--x-wait-for-lock"
"--x-manifest-root=${VCPKG_MANIFEST_DIR}"
"--x-install-root=${_VCPKG_INSTALLED_DIR}"
${Z_VCPKG_FEATURE_FLAGS}
${Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS}
${VCPKG_INSTALL_OPTIONS}
OUTPUT_VARIABLE Z_VCPKG_MANIFEST_INSTALL_LOGTEXT
ERROR_VARIABLE Z_VCPKG_MANIFEST_INSTALL_LOGTEXT
RESULT_VARIABLE Z_VCPKG_MANIFEST_INSTALL_RESULT
${Z_VCPKG_MANIFEST_INSTALL_ECHO_PARAMS}
) The file Running CMake with that works (using freshly downloaded vcpkg, not my local build):
I checked again and the handle is valid this time around. I've reported this bug on the CMake issue tracker here: https://gitlab.kitware.com/cmake/cmake/-/issues/25625 |
@SamVanheer Thanks for the great investigation! I've just cloned a fresh copy of
|
You're getting error 1450 when vcpkg calls Both result in the same error message (failed while extracting) but the cause is completely different. Error 1450 is most likely caused by a problem with the local system rather than vcpkg or CMake. I searched for the error code and found that there could be several causes like the system running out of memory or disk space. Given that you're running Windows 7 this may be caused by vcpkg relying on something that only newer versions of Windows can do, but i've no way to determine this. You reported that older versions of vcpkg work so you could try checking which change causes the problem by finding the last working version and the first broken version, and then checking the changes made in-between until you find the commit where it first manifests the problem. You'll have to clone Once you've found the commit it should be as simple as checking which changes were made. The cause is possibly the use of a Win32 API that has version-specific requirements or behavior but the cause may be at the start of a long chain of function calls that eventually pass data into a Win32 function. Since i'm not getting this error (i'm on Windows 11) i can't do this myself. |
Cannot build vcpkg-tool locally due to numerous
errors. Tried the latest master and the |
This happens because vcpkg has a lot of declarations that use There is a compiler setting to allow for the correct behavior which is described here: https://learn.microsoft.com/en-us/cpp/build/reference/zc-externconstexpr?view=msvc-170 I tested it with 2019 and it does build with this setting enabled. 2022 enables this behavior through the I don't know which version of VS you're supposed to use when building vcpkg (should really be mentioned somewhere), perhaps there is a need to set that option in its |
The problem in CMake is fixed and should be working correctly starting with version 3.28.2. Based on some of the reports in this issue it's possible for vcpkg itself to encounter the same problem where the standard stream handles are invalid. The CRT won't open the streams if there is no console: https://github.com/huangqinjin/ucrt/blob/f941b374deb33b1bce9c8d7e3064c7b652d172c4/stdio/_file.cpp#L97-L109 If vcpkg is launched without a console any processes created using
So, from what i can see there are 3 different causes of the "failed while extracting" error:
Note that users started getting error 1450 in the first vcpkg release after the one that started passing vcpkg's CMake changed how they pass handles starting with version 3.28 which is months after this problem was first reported so i doubt that is related to error 1450. But perhaps handle inheritance behavior was already broken on Windows 7 starting with vcpkg version The fastest way to find out would be to build vcpkg from the latest commit with handle inheritance disabled (note: you must also disable the attribute list being passed in according to this article) and then testing if it works. If it does, then something is going wrong with explicit handle inheritance on Windows 7. I compared the current code with the article i linked and it looks just about the same, so it seems unlikely that this change is responsible but i can't test this myself due since i'm not getting that error myself. Anybody who is experiencing it should be able to test it using a custom built vcpkg. If this isn't the cause then pinpointing the commit that introduces the problem is the way to identify the actual cause. |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
OK, got some time & desire to play again with this old issue... so the thing is that the old issue when we have got an error on unpacking initial cmake archive is gone! but seems like cmake guys changed the way they are unpacking the archive, they are not using anymore the
but instead they started to use this:
then above new approach - works and ...... it still produces mysterious error 1450 but later on.... details
No way!!! it still fails on the same pattern as 3.28.1 !!!! -E tar xzf any ideas? |
OS: Windows 7 x64 sp3 |
I was poking around and found similar issue in go repo Loos like this is purely Windows 7 issue and who knows how to fix andd whether it'll be fixed ever.... maybe there wil be someone brave enough to make it happen :) |
Describe the bug
I've just cloned and bootstrapped vcpkg. Cannot install any package because CMake cannot be unpacked. The antivirus software is disabled.
Environment
To Reproduce
P.S. Is there a way to get more logs?
The text was updated successfully, but these errors were encountered: