-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
[x264] build failure on x86-windows-static when WSL2 is installed #29658
Comments
I'm on Windows 11 Pro x64 22H2 if that helps
Let me know if there's a better way to dump debugging info. Weird though, I'm able to hit this 100% of the time. Maybe one thing to notice is that I use VSCode with the Cmake extension which triggers the build, but I don't think it's related to it. I'll give it a try to trigger a build manually from the console. Thanks for the feedback in the meantime. //EDIT: I tested the console and it's still the same issue, so it's not related to VSCode and the CMake extension. Maybe I need to give you the full picture. As you notice from the manifest I'm actually building //EDIT2: I tested to install it on a completely new folder totally separate from my own current project and it fails equally the same: $ vcpkg install x264[asm,core,default-features]:x86-windows-static
Computing installation plan...
The following packages will be built and installed:
* vcpkg-cmake[core]:x64-windows -> 2022-12-22
* vcpkg-cmake-get-vars[core]:x64-windows -> 2022-12-16
x264[asm,core,default-features]:x86-windows-static -> 0.164.3095#2
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Detecting compiler hash for triplet x86-windows-static...
A suitable version of 7zip was not found (required v21.7.0) Downloading portable 7zip 21.7.0...
Downloading 7zip...
https://www.7-zip.org/a/7z2107-extra.7z->C:\vcpkg\downloads\7z2107-extra.7z
Downloading https://www.7-zip.org/a/7z2107-extra.7z
Extracting 7zip...
Restored 2 package(s) from C:\Users\julia\AppData\Local\vcpkg\archives in 779.6 ms. Use --debug to see more details.
Installing 1/3 vcpkg-cmake:x64-windows...
Elapsed time to handle vcpkg-cmake:x64-windows: 6.603 ms
Installing 2/3 vcpkg-cmake-get-vars:x64-windows...
Elapsed time to handle vcpkg-cmake-get-vars:x64-windows: 5.868 ms
Installing 3/3 x264:x86-windows-static...
Building x264[asm,core,default-features]:x86-windows-static...
warning: -- Using community triplet x86-windows-static. This triplet configuration is not guaranteed to succeed.
-- [COMMUNITY] Loading triplet configuration from: C:\vcpkg\triplets\community\x86-windows-static.cmake
-- Downloading https://github.com/mirror/x264/archive/baee400fa9ced6f5481a728138fed6e867b0ff7f.tar.gz -> mirror-x264-baee400fa9ced6f5481a728138fed6e867b0ff7f.tar.gz...
-- Extracting source C:/vcpkg/downloads/mirror-x264-baee400fa9ced6f5481a728138fed6e867b0ff7f.tar.gz
-- Applying patch uwp-cflags.patch
-- Applying patch parallel-install.patch
-- Applying patch allow-clang-cl.patch
-- Applying patch configure-as.patch
-- Using source at C:/vcpkg/buildtrees/x264/src/e867b0ff7f-fb2486f1d0.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x86-windows-static
-- Downloading https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip -> nasm-2.16.01-win64.zip...
-- Getting CMake variables for x86-windows-static
-- Downloading https://repo.msys2.org/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/gzip-1.11-1-x86_64.pkg.tar.zst -> msys-gzip-1.11-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/bash-5.1.008-1-x86_64.pkg.tar.zst -> msys-bash-5.1.008-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/autoconf-2.71-3-any.pkg.tar.zst -> msys-autoconf-2.71-3-any.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/diffutils-3.8-2-x86_64.pkg.tar.zst -> msys-diffutils-3.8-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/binutils-2.37-5-x86_64.pkg.tar.zst -> msys-binutils-2.37-5-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst -> msys-libtool-2.4.7-3-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/file-5.41-2-x86_64.pkg.tar.zst -> msys-file-5.41-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz;https://mirror.bit.edu.cn/msys2/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz;https://mirror.selfnet.de/msys2/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz -> msys-zlib-1.2.11-1-x86_64.pkg.tar.xz...
-- Downloading https://repo.msys2.org/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libbz2-1.0.8-3-x86_64.pkg.tar.zst -> msys-libbz2-1.0.8-3-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/coreutils-8.32-2-x86_64.pkg.tar.zst -> msys-coreutils-8.32-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz;https://mirror.bit.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz;https://mirror.selfnet.de/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz -> msys-grep-3.0-2-x86_64.pkg.tar.xz...
-- Downloading https://repo.msys2.org/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/sed-4.8-2-x86_64.pkg.tar.zst -> msys-sed-4.8-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libpcre-8.45-1-x86_64.pkg.tar.zst -> msys-libpcre-8.45-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/m4-1.4.19-2-x86_64.pkg.tar.zst -> msys-m4-1.4.19-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/automake-wrapper-11-4-any.pkg.tar.zst -> msys-automake-wrapper-11-4-any.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/gawk-5.1.0-2-x86_64.pkg.tar.zst -> msys-gawk-5.1.0-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst -> msys-mpfr-4.1.0-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/gmp-6.2.1-1-x86_64.pkg.tar.zst -> msys-gmp-6.2.1-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libreadline-8.1.001-1-x86_64.pkg.tar.zst -> msys-libreadline-8.1.001-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/ncurses-6.2-2-x86_64.pkg.tar.zst -> msys-ncurses-6.2-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/automake1.16-1.16.3-3-any.pkg.tar.zst -> msys-automake1.16-1.16.3-3-any.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/perl-5.32.1-2-x86_64.pkg.tar.zst -> msys-perl-5.32.1-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst -> msys-libcrypt-2.1-3-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst -> msys-pkg-config-0.29.2-4-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/make-4.3-3-x86_64.pkg.tar.zst -> msys-make-4.3-3-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/findutils-4.8.0-1-x86_64.pkg.tar.zst -> msys-findutils-4.8.0-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libintl-0.21-1-x86_64.pkg.tar.zst -> msys-libintl-0.21-1-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst -> msys-libiconv-1.16-2-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/gcc-libs-11.2.0-3-x86_64.pkg.tar.zst -> msys-gcc-libs-11.2.0-3-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst -> msys-msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst...
-- Downloading https://repo.msys2.org/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst;https://mirror.selfnet.de/msys2/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/which-2.21-4-x86_64.pkg.tar.zst -> msys-which-2.21-4-x86_64.pkg.tar.zst...
-- Applying patch C:/vcpkg/scripts/msys/compile_wrapper_consider_clang-cl.patch
-- Using msys root at C:/vcpkg/downloads/tools/msys2/ca907ea16f6f2ba5
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst -> msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst...
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst...
-- Using msys root at C:/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Configuring x86-windows-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
Command failed: C:/vcpkg/downloads/tools/msys2/ca907ea16f6f2ba5/usr/bin/bash.exe --noprofile --norc --debug -c "V=1 CPP='cl.exe -E' CC='cl.exe' CC_FOR_BUILD='touch a.out | touch conftest.exe | true' CPP_FOR_BUILD='touch a.out | touch conftest.exe | true' CXX_FOR_BUILD='touch a.out | touch conftest.exe | true' CXX='cl.exe' RC='rc.exe' WINDRES='rc.exe' AR='lib.exe' LD='link.exe -verbose' RANLIB=':' STRIP=':' NM='dumpbin.exe -symbols -headers' DLLTOOL='link.exe -verbose -dll' CCAS=':' AS='C:/vcpkg/downloads/tools/nasm/nasm-2.16.01/nasm.exe' AS='C:/vcpkg/downloads/tools/nasm/nasm-2.16.01/nasm.exe' ./../src/e867b0ff7f-fb2486f1d0.clean/configure --build=x86_64-pc-mingw32 --host=i686-pc-mingw32 \"--disable-lavf\" \"--disable-swscale\" \"--disable-avs\" \"--disable-ffms\" \"--disable-gpac\" \"--disable-lsmash\" \"--disable-bashcompletion\" \"ac_cv_prog_ac_ct_STRIP=:\" \"gl_cv_double_slash_root=yes\" \"ac_cv_func_memmove=yes\" \"--disable-silent-rules\" \"--verbose\" \"--disable-shared\" \"--enable-static\" \"--enable-debug\" \"--disable-cli\" \"--prefix=/C/vcpkg/installed/x86-windows-static/debug\""
Working Directory: C:/vcpkg/buildtrees/x264/x86-windows-static-dbg
Error code: 2
See logs for more information:
C:\vcpkg\buildtrees\x264\config-x86-windows-static-dbg-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_make.cmake:812 (vcpkg_execute_required_process)
ports/x264/portfile.cmake:88 (vcpkg_configure_make)
scripts/ports.cmake:147 (include)
error: building x264:x86-windows-static failed with: BUILD_FAILED
error: 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+x264
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[x264]+Build+error
Include '[x264] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2023-01-24-8a88d63f241d391772fbde69af9cab96c3c64c75
vcpkg-scripts version: 959f8e317 2023-02-15 (2 days ago)
Please use the prefilled template from C:\vcpkg\installed\vcpkg\issue_body.md when reporting your issue. I'm on the |
I did some further investigations around this issue and it looks like my Question now is: why is this happening and before it was not? //EDIT: I also double checked that the official //EDIT2: Ok double confirmed it is NOT being generated as I initially thought but the |
I found the culprit! This line on the portfile ( https://github.com/microsoft/vcpkg/blob/master/ports/x264/portfile.cmake#L14 ) is actually touching my Looking a the function definition, it seems to use pure Cmake logics ( https://github.com/microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_replace_string.cmake ) so I wonder if there's a way to enforce CMake to save using IMHO this is a vcpkg bug and should be fixed within the //EDIT: Looks like there is a way using
Ref. https://cmake.org/cmake/help/latest/command/file.html#writing //EDIT2: Even easier, it's enough to add the //EDIT4: I created a super simple example in CMake to replicate this issue on my own end but CMake is saving the file using cmake_minimum_required(VERSION 3.25)
project(test)
file(WRITE "test.txt" "hello world") Somehow //EDIT5: I created a small project and I finally managed to replicate the issue. It seems to be related on how the file is being read and its content stored in the variable! |
Thanks for the investigation. |
Thanks for coming back @dg0yt, as you can see per my example you're able to replicate this issue also using my simple CMake project. I've got nothing fancy installed, I used the official CMake from their website ( https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-windows-x86_64.msi ), Git for Windows ( https://github.com/git-for-windows/git/releases/download/v2.39.2.windows.1/Git-2.39.2-64-bit.exe ) and Visual Studio 2022. I even uninstalled CMake and Git on my own side to make sure it wasn't that one and vcpkg was still failing. IMHO it is how we replace strings using CMake, the pattern used in I even tested step by step by:
Can you at least try to run my example project on your own end? All you need is Windows and Cmake installation. Nothing else. Thank you in advance! |
I haven't got a MSVC toolchain, but this port builds in vcpkg CI at least three times a week, so there isn't much too learn from that POV. And there are countless uses of So that's why the focus is on why it doesn't work on your machine. find_program(CHECK_ENV NAMES env PATHS ENV PATH NO_DEFAULT_PATH)
message(STATUS "Got env: ${CHECK_ENV}")
find_program(CHECK_BASH NAMES bash PATHS ENV PATH NO_DEFAULT_PATH)
message(STATUS "Got bash: ${CHECK_BASH}") |
To be honest I don't think is anything special in my own machine as the vcpkg build is run inside the This is my PATH:
As I mentioned before I uninstalled both Git and Cmake earlier to exclude them from the equation and it's still failing. I'll try to run now a custom script made with Regaring CI setup: the machines you use comes provided with tooling already installed. Maybe the msys2 installation is configured to run CRLF anyway but maybe this behavior doesn't come by default, on the env vcpkg configures and provides automatically. So I wouldn't take this as granted at least for now. |
Note that CI is not using the standard AZP images. It doesn't come with any msys. |
I guess this is how msys solves the CRLF issue: The situation is as follows:
There are some operations which modify |
Thanks, I'll try that scenario so at least I can attempt to replicate what is going on. I was trying to create a simple env where I could replicate this behavior, but ironically everything works: cmake_minimum_required(VERSION 3.25)
project(test)
file(READ "test.sh.in" contents)
string(REPLACE [[/bin/bash]] [[/usr/bin/env bash]] contents "${contents}")
file(WRITE "test.sh" "${contents}")
execute_process(
COMMAND C:/vcpkg/downloads/tools/msys2/ca907ea16f6f2ba5/usr/bin/bash.exe --noprofile --norc --debug -c './test.sh'
OUTPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/stdout.log"
ERROR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/stderr.log"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
) test.sh.in ( saved with LF file ending ) #!/bin/bash
echo "Hello world!" Let's see what we get out of the port env... |
Oh wow, looks like I managed to replace the
I wonder how this happens though because when I run the same //EDIT: Ohhhhh looks like that based on my PATH setup //EDIT2: Probably a simpler way would be to prepend the msys path to the |
👀 However, many portfile scripts look for additonal tools, and sometimes do prepend the tools' directories to PATH. For x264, the following tools will have their dir prepended to PATH when their path contains spaces:
|
Right but that happens until the first $ C:/vcpkg/downloads/tools/msys2/ca907ea16f6f2ba5/usr/bin/bash.exe --noprofile --norc --debug -c "V=1 CPP='cl.exe -E' CC='cl.exe' CC_FOR_BUILD='touch a.out | touch conftest.exe | true' CPP_FOR_BUILD='touch a.out | touch conftest.exe | true' CXX_FOR_BUILD='touch a.out | touch conftest.exe | true' CXX='cl.exe' RC='rc.exe' WINDRES='rc.exe' AR='lib.exe' LD='link.exe -verbose' RANLIB=':' STRIP=':' NM='dumpbin.exe -symbols -headers' DLLTOOL='link.exe -verbose -dll' CCAS=':' AS='C:/vcpkg/downloads/tools/nasm/nasm-2.16.01/nasm.exe' AS='C:/vcpkg/downloads/tools/nasm/nasm-2.16.01/nasm.exe' ./../src/e867b0ff7f-fb2486f1d0.clean/configure --build=x86_64-pc-mingw32 --host=i686-pc-mingw32 \"--disable-lavf\" \"--disable-swscale\" \"--disable-avs\" \"--disable-ffms\" \"--disable-gpac\" \"--disable-lsmash\" \"--disable-bashcompletion\" \"ac_cv_prog_ac_ct_STRIP=:\" \"gl_cv_double_slash_root=yes\" \"ac_cv_func_memmove=yes\" \"--disable-silent-rules\" \"--verbose\" \"--disable-shared\" \"--enable-static\" \"--enable-debug\" \"--disable-cli\" \"--prefix=/C/Users/julia/source/repos/julianxhokaxhiu/FFNx/.build/vcpkg_installed/x86-windows-static/debug\"" Problem is that when it detects the //EDIT2: I start to wonder if this behavior was happening since the beginning but I'm the first to notice because most probably who uses vcpkg does not have WSL installed and/or with the //EDIT3: Probably the easiest fix for this entire issue is to wrap the line https://github.com/microsoft/vcpkg/blob/master/ports/x264/portfile.cmake#L14 with something like |
At least the outer bash is called by absolute path based on MSYS_ROOT from I'm still curious about your environment's PATH at the time
This would be a workaround for this particular port. We don't know when you run into the next script with CRLF line endings. Given that |
Any hint how I can catch that?
Fully agree. |
You might add We might also create a separate test port which checks for a sane environment. It could be run on demand when users report errors, to provide good diagnostics on demand for rare but reproducible problems. |
This would have helped a lot to troubleshoot. Would be fantastic to have something like this. Ideally run by using
I did try that but all you'll get is already inside the WSL bash env ( this comment is part of that dump ), not before. Is that useful anyway to you? |
Maybe. #!/usr/bin/bash
echo "PATH=$PATH"
exit 1 This shouldn't escape MSYS2 bash. |
There you go:
|
The given output is probably from WSL bash. With line breaks and comments added:
Note how vcpgk msys is just before I started to wonder if |
Yep it is from the WSL bash, which still doesn't explain to me why it is being triggered if the first bash session is anyway run through msys2. Something's not right...
I just checked and no, there's no |
Cf. #29658 (comment) bullet point two - only that there is no MSYS |
Ohhh now it's clear, so the msys2 bash is asking the I'll try to do some tests here to see how we can add the Thank you so far! //EDIT: I just checked and //EDIT2: A-ha! I think I found where the issue is and how to fix it! The //EDIT3: Bingo! Here we have a new-line delimited list of PATHs I do get in my PATH while MSYS2 bash execs!
As you can notice the |
It is not missing: from the perspective of MSYS2 bash (i.e. "MSYS environment"), it comes as |
Oh I see, this although doesn't explain then why the MSYS2 //EDIT1: Ohhh wow! Look at this, I found out there's a //EDIT2: Ok now this is challenging. We need to find a way to move the vcpkg msys2 root before this local path too IF present. Guess it's standard on Win11, or maybe on Win10 now as well... |
Now you see why I insisted on looking at |
Can someone in the vcpkg team pick up this please? I'm totally blocked here and I'm not able to build locally anymore. I even did try to approach the WSL team to ask how to delete the |
Thanks for posting this issue. We'll be working on it this week. |
@julianxhokaxhiu You can modify the ending symbol in |
@jimwang118 How is this going to help though? That was not the issue in the first place. The issue is that the entire I consider this still being a vcpkg core bug as it should not run the bash session within WSL but use the MSYS2 one. |
I followed your steps to install wsl2 locally. But when I installed vcpkg, I correctly identified bash.exe under msys. I'm not sure what's the difference between mine and yours?
Step:
|
Can you share your PATH please? Also I'm on Windows 11 22H2 here. |
Note that you have to look for |
@jimwang118 can you go to your //EDIT: Also, please send your PATH from the |
I don't have an alias for bash.exe in %LOCALAPPDATA%\Microsoft\WindowsApps.
This is my PATH: |
Ok now this is weird though. do you have WSL installed via the Microsoft Store? Guess that's the issue. Try installing it using this link: https://www.microsoft.com/store/productId/9P9TQF7MRM4R If you have it installed via MS Store and you DO NOT have a //EDIT: Can you also please do run $ wsl --version
Versione WSL: 1.1.3.0
Versione kernel: 5.15.90.1
Versione WSLg: 1.0.49
Versione MSRDC: 1.2.3770
Versione Direct3D: 1.608.2-61064218
Versione DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
versione Windows: 10.0.22621.1344 and paste the output here? Thank you. //EDIT2: Can you also please do run $ where bash
C:\Windows\System32\bash.exe
C:\Users\julia\AppData\Local\Microsoft\WindowsApps\bash.exe and paste as well the output here? Thanks! |
@jimwang118 is there any update on this issue? |
//EDIT1 result:
I downloaded wsl2 from MS Store. |
This doesn't make any sense. I asked multiple friends to do the same and they all have a symlink in their |
Summoning @JackBoosY and @BillyONeal at this stage, we clearly need some help understanding what is going on. |
This maybe a common issue, @Neumann-A I think we should handle the scene in |
Were the test here run in So from the discussion: Win11 + WSL might have problems due to a different bash? Vcpkg could just force msys bash for windows since it will download it anyway. |
Yes but in the end it didn't make much a difference, I was able to trigger it also on
Yes, that's basically the root cause. We initially thought it was about the triplet but @dg0yt pointed me to the right direction and we found out it was all about PATH, which further discoveries led us to find out the WSL bash was called because currently So yeah, long story short we need to find a way to tell vcpkg to use ONLY the MSYS2 bash no matter if I have WSL installed or not. Thanks for looking into this! |
This is my breakdown:
IMO vcpkg needs to sanitize the |
@julianxhokaxhiu Did you install PowerShell as a Windows App from the Microsoft Store? Could you uninstall it? #30172 (comment) |
Yes I did install Powershell via MS Store and I could but may I ask why? Which is the angle of this request? |
This suggestion was meant to verify the theoretical reasoning from the linked comment. |
Will do and let you know how it goes! Thanks @dg0yt |
I just discovered and fixed an error. Now it should be good. |
@dg0yt Tested and works like a charm :) Thanks! |
Host Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install x264[asm,core,default-features]:x86-windows-static
Failure logs
Console output:
stdout-x86-windows-static.log
config-x86-windows-static-dbg-err.log
Additional context
This is the
vcpkg.json
manifest.The text was updated successfully, but these errors were encountered: