Skip to content
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

[vcpkg] Missing compile_wrapper_consider_clang-cl.patch file in vcpkg which installed by Visual Studio installer #31565

Closed
hgbutte opened this issue May 22, 2023 · 8 comments · Fixed by #32375
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@hgbutte
Copy link

hgbutte commented May 22, 2023

Operating system

Windows

Compiler

Visual Studio 2022 17.6

Steps to reproduce the behavior

Try to use VCPKG installed with VS 17.6 and manifest mode for the first time.
Until now i have used stand-alone vcpkg in classic-mode.


C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg\vcpkg.exe" install  --x-wait-for-lock --triplet "x86-windows" --vcpkg-root "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg\\" "--x-manifest-root=D:\Projekte\D0xxx\PCSW\Quellcode\\" "--x-install-root=D:\Projekte\D0xxx\PCSW\Quellcode\vcpkg_installed\x86-windows\\"


vcpkg.json:

{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
  "dependencies": [
    "libxml2",
    "curl"
  ]
}

vcpkg-configuration.json

{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
  "default-registry": {
    "kind": "builtin",
    "baseline": "656fcc6ab2b05c6d999b7eaca717027ac3738f71"
  }
}

Failure logs

Building libiconv[core]:x86-windows...
-- Installing port from location: C:\Users\bm1682\AppData\Local\vcpkg\registries\git-trees\4226589d5d658f4d96df83f8539de54dc57a5996
-- Using cached libiconv-1.17.tar.gz.
-- Extracting source C:/Users/bm1682/AppData/Local/vcpkg/downloads/libiconv-1.17.tar.gz
-- Applying patch 0002-Config-for-MSVC.patch
-- Applying patch 0003-Add-export.patch
-- Applying patch 0004-ModuleFileName.patch
-- Applying patch clang-fortify.patch
-- Using source at D:/Projekte/D0519/PCSW/Quellcode/vcpkg_installed/vcpkg/blds/libiconv/src/v1.17-84a471678e.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x86-windows
-- Using cached msys-gzip-1.11-1-x86_64.pkg.tar.zst.
-- Using cached msys-bash-5.1.008-1-x86_64.pkg.tar.zst.
-- Using cached msys-autoconf-2.71-3-any.pkg.tar.zst.
-- Using cached msys-diffutils-3.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-binutils-2.37-5-x86_64.pkg.tar.zst.
-- Using cached msys-libtool-2.4.7-3-x86_64.pkg.tar.zst.
-- Using cached msys-file-5.41-2-x86_64.pkg.tar.zst.
-- Using cached msys-zlib-1.2.11-1-x86_64.pkg.tar.xz.
-- Using cached msys-libbz2-1.0.8-3-x86_64.pkg.tar.zst.
-- Using cached msys-coreutils-8.32-2-x86_64.pkg.tar.zst.
-- Using cached msys-grep-3.0-2-x86_64.pkg.tar.xz.
-- Using cached msys-sed-4.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-libpcre-8.45-1-x86_64.pkg.tar.zst.
-- Using cached msys-m4-1.4.19-2-x86_64.pkg.tar.zst.
-- Using cached msys-automake-wrapper-11-4-any.pkg.tar.zst.
-- Using cached msys-gawk-5.1.0-2-x86_64.pkg.tar.zst.
-- Using cached msys-mpfr-4.1.0-1-x86_64.pkg.tar.zst.
-- Using cached msys-gmp-6.2.1-1-x86_64.pkg.tar.zst.
-- Using cached msys-libreadline-8.1.001-1-x86_64.pkg.tar.zst.
-- Using cached msys-ncurses-6.2-2-x86_64.pkg.tar.zst.
-- Using cached msys-automake1.16-1.16.3-3-any.pkg.tar.zst.
CMake Error at scripts/cmake/vcpkg_acquire_msys.cmake:79 (file):
file SHA512 failed to read file "C:/Program Files/Microsoft Visual
Studio/2022/Enterprise/VC/vcpkg/scripts/msys/compile_wrapper_consider_clang-cl.patch":
No such file or directory
Call Stack (most recent call first):
scripts/cmake/vcpkg_acquire_msys.cmake:274 (z_vcpkg_acquire_msys_declare_package)
scripts/cmake/vcpkg_configure_make.cmake:224 (vcpkg_acquire_msys)
C:/Users/bm1682/AppData/Local/vcpkg/registries/git-trees/4226589d5d658f4d96df83f8539de54dc57a5996/portfile.cmake:29 (vcpkg_configure_make)
scripts/ports.cmake:147 (include)

error: building libiconv:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libiconv
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[libiconv]+Build+error&body=Copy+issue+body+from+D%3A%2FProjekte%2FD0519%2FPCSW%2FQuellcode%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

Additional context

No response

@hgbutte hgbutte added the category:port-bug The issue is with a library, which is something the port should already support label May 22, 2023
@dg0yt
Copy link
Contributor

dg0yt commented May 22, 2023

failed to read file "C:/Program Files/Microsoft Visual
Studio/2022/Enterprise/VC/vcpkg/scripts/msys/compile_wrapper_consider_clang-cl.patch":
No such file or directory

This file is part of the vcpkg repo:
https://github.com/microsoft/vcpkg/blob/master/scripts/msys/compile_wrapper_consider_clang-cl.patch
Is your vcpkg checkout healthy and up-to-date?

@hgbutte
Copy link
Author

hgbutte commented May 22, 2023

This Installation was done by Visual Studio Installer. Folder "msys" does not exist at all.
Thought this might be part of the packages downloaded before. Will try to repair or reinstall vcpkg package through VS Installer.

@Cheney-W Cheney-W added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) and removed category:port-bug The issue is with a library, which is something the port should already support labels May 23, 2023
@Cheney-W
Copy link
Contributor

Cheney-W commented May 23, 2023

This issue is caused by missing vcpkg\msys\compile_wrapper_consider_clang-cl.patch in the vcpkg installed through the VS installer. I tested with VS 2022 17.7.0-pre.1.0, and this issue still persists.

Furthermore, even if I manually add the missing files to the vcpkg folder(C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg), a new problem arises:

msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst fails to download

This is because an outdated version of vcpkg_acquire_msys.cmake is being used, and the required version 3.2.0-8 of msys2-runtime has been removed from https://repo.msys2.org/msys/x86_64.
vcpkg itself has updated this part, but the vcpkg installed through the VS installer does not include the updated content.

@dan-shaw @BillyONeal @vicroms @JavierMatosD @ras0219-msft

@kcgen
Copy link

kcgen commented Jun 2, 2023

libiconv has failed to build under GitHub's CI + NuGet system for most of this week, taking with it DOSBox Staging's Windows-based unit tests.

2023-06-02_07-08

and in text form:

     2>C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: building libiconv:x86-windows failed with: BUILD_FAILED [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
         Then check for known issues at:
             https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libiconv
         You can submit a new issue at:
             https://github.com/microsoft/vcpkg/issues/new?title=[libiconv]+Build+error&body=Copy+issue+body+from+D%3A%2Fa%2Fdosbox-staging%2Fdosbox-staging%2Fvcpkg_installed%2Fx86-windows%2Fvcpkg%2Fissue_body.md
         You can also sumbit an issue by running (GitHub cli must be installed):
             gh issue create -R microsoft/vcpkg --title "[libiconv] Build failure" --body-file D:/a/dosbox-staging/dosbox-staging/vcpkg_installed/x86-windows/vcpkg/issue_body.md
     2>C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): error MSB3073: The command ""C:\vcpkg\vcpkg.exe" install  --x-wait-for-lock --triplet "x86-windows" --vcpkg-root "C:\vcpkg\\" "--x-manifest-root=D:\a\dosbox-staging\dosbox-staging\\" "--x-install-root=D:\a\dosbox-staging\dosbox-staging\vcpkg_installed\x86-windows\\" " exited with code 1. [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
     2>Done Building Project "D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj" (Rebuild target(s)) -- FAILED.
     1>Done Building Project "D:\a\dosbox-staging\dosbox-staging\vs\dosbox.sln" (tests:Rebuild target(s)) -- FAILED.

Build FAILED.

       "D:\a\dosbox-staging\dosbox-staging\vs\dosbox.sln" (tests:Rebuild target) (1) ->
       "D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj" (Rebuild target) (2) ->
       (VcpkgInstallManifestDependencies target) -> 
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : warning: Download failed -- retrying after 1000ms [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : warning: Download failed -- retrying after 2000ms [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : warning: Download failed -- retrying after 4000ms [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: Failed to download from mirror set [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://repo.msys2.org/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: failed: status code 404 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: failed: status code 404 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: failed: status code 404 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: failed: status code 404 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirrors.ustc.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: failed: status code 404 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirror.bit.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12007 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirror.bit.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12007 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirror.bit.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12007 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirror.bit.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12007 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirror.selfnet.de/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: failed: status code 404 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz: failed: status code 404 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning :       Failed to download file with error: 1 [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): warning : error: building libiconv:x86-windows failed with: BUILD_FAILED [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]


       "D:\a\dosbox-staging\dosbox-staging\vs\dosbox.sln" (tests:Rebuild target) (1) ->
       "D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj" (Rebuild target) (2) ->
       (VcpkgInstallManifestDependencies target) -> 
         C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): error MSB3073: The command ""C:\vcpkg\vcpkg.exe" install  --x-wait-for-lock --triplet "x86-windows" --vcpkg-root "C:\vcpkg\\" "--x-manifest-root=D:\a\dosbox-staging\dosbox-staging\\" "--x-install-root=D:\a\dosbox-staging\dosbox-staging\vcpkg_installed\x86-windows\\" " exited with code 1. [D:\a\dosbox-staging\dosbox-staging\tests\vs\tests.vcxproj]

kcgen added a commit to dosbox-staging/dosbox-staging that referenced this issue Jun 2, 2023
This is a temporary exclusion to work-around ongoing false-positive
CI failures.

Revert this when microsoft/vcpkg#31565 is fixed.
@cenit
Copy link
Contributor

cenit commented Jun 21, 2023

is there any news on timeline for vcpkg fixes propagation within Visual Studio installer?
the propagation of a broken vcpkg within github actions runners because integrated in visual studio is getting more damage than expected (it is found by many pipeline scripts and as such it is used without downloading a custom one, but then it is broken for any port depending on msys...)

@PhoebeHui PhoebeHui changed the title [libiconv] build failure [libiconv] build failure - vcpkg version need update in Visual Studio installer Jun 27, 2023
@Cheney-W Cheney-W changed the title [libiconv] build failure - vcpkg version need update in Visual Studio installer [vcpkg] Missing compile_wrapper_consider_clang-cl.patch file in vcpkg which installed by Visual Studio installer Jun 27, 2023
@BillyONeal BillyONeal reopened this Jul 27, 2023
@BillyONeal BillyONeal added the requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof label Jul 27, 2023
@cenit
Copy link
Contributor

cenit commented Jul 31, 2023

any news on when a corrected vcpkg will be included in vs?

@BillyONeal
Copy link
Member

Was fixed in #32885 , will be in whichever VS release picks us up.

@Cheney-W Cheney-W removed the requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof label Aug 9, 2023
@oyvindln
Copy link

If anyone else comes across this issue searching for workarounds - the fix is still not in latest stable release (17.7.4 as of writing this) but is included in Visual studio 2022 17.8.0 preview 2.0 (possibly also preview 1.0 but not much point using that).

Copying the file as shown in the linked issue from another project seems to also have worked for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants