microsoft / vcpkg

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

[CMake 3.29] - Directory does not exist: C:/Windows/System32/config/systemprofile/AppData/Local/vcpkg/registries/git-trees/SHA1 #38501

Open bansan85 opened 2 weeks ago

bansan85 commented 2 weeks ago

Describe the bug Related to https://github.com/microsoft/vcpkg/issues/38329

I have multiple VM that run gitlab-runner. In one Windows VM, vcpkg fails since commit dd9f9d5371e539e5c760d5e4a524b81376f42ad1 (Update CMake to 3.29.0 (#37457)).

I have error:

D:\CI\builds\common\sw\urx\vcpkg-registry\triplets\x64-windows-static-md-release-env.cmake: info: loaded overlay triplet from here
C:\Windows\System32\config\systemprofile\AppData\Local\vcpkg\registries\git-trees\88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a: info: installing overlay port from here
CMake Error at scripts/ports.cmake:138 (message):
  Cannot find port: vcpkg-cmake
    Directory does not exist: C:/Windows/System32/config/systemprofile/AppData/Local/vcpkg/registries/git-trees/88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a
error: building vcpkg-cmake:x64-windows-static-md-release-env failed with: BUILD_FAILED

I have the error with CMake downloaded by vcpkg or with CMake accessible from the path.

I have no idea if the problem comes from CMake or from vcpkg.

Environment

Failure logs Before CMake 3.29: success.log

Since CMake 3.29: failure.log

Cheney-W commented 1 week ago

The cmake in vcpkg has been update to 3.29.2, dose this issue still exist?

bansan85 commented 1 week ago

@Cheney-W Yes CMake 3.29.2 fixes the issue. Strange... I was pretty sure I tested a commit after this one. I will repoen the issue if problem appears again.

bansan85 commented 6 days ago

@Cheney-W I tried to update to master (cbf4a6641528cee6f172328984576f51698de726) and problem appears again. I bisected (problem is reproducible) and found that 2eab0f6ee8ee96703175c7bfcc9dd5d4a5816bad is bad.

2eab0f6ee-bad.log

4af63c6-ok.log

And again, I have no idea what's wrong and set $Env:LOCALAPPDATA to a temporary directory is a good workaround.

dg0yt commented 6 days ago
-- Running vcpkg install
Fetching registry information from https://git.moduleus.com/common/sw/3rdparty/vcpkg.git (master)...
Detecting compiler hash for triplet x64-windows-static-md-release-env...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe
The following packages will be built and installed:
    catch2:x64-windows-static-md-release-env@3.5.4 -- C:\Windows\System32\config\systemprofile\AppData\Local\vcpkg\registries\git-trees\79536429a52319190e793f8ec7c19c6142b26bd4
    hdf5[core,cpp]:x64-windows-static-md-release-env@1.8.23 -- D:\CI\builds\common\sw\urx\vcpkg-registry\ports/hdf5/1.8.23
    pybind11:x64-windows-static-md-release-env@2.12.0 -- C:\Windows\System32\config\systemprofile\AppData\Local\vcpkg\registries\git-trees\fdb8e4d4c69b8a217e5cfc387ec750d4143738cc
    vcpkg-cmake:x64-windows-static-md-release-env@2024-04-18 -- C:\Windows\System32\config\systemprofile\AppData\Local\vcpkg\registries\git-trees\a10a94e8d0071ed4804d40d0f0f0c5e4e7180afd
    vcpkg-cmake-config:x64-windows-static-md-release-env@2022-02-06#1 -- C:\Windows\System32\config\systemprofile\AppData\Local\vcpkg\registries\git-trees\8d54cc4f487d51b655abec5f9c9c3f86ca83311f

You are not using only the vcpkg registry. Maybe you need to include about your registry setup.