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

[msquic] Build error on arm64-windows if vcpkg dir parent path more than 64 chars #41870

Open
redbaron opened this issue Oct 30, 2024 · 4 comments
Assignees
Labels
category:question This issue is a question

Comments

@redbaron
Copy link
Contributor

redbaron commented Oct 30, 2024

This was a bit of a nightmare to figure out. For a reason I can't explain msquic fails to build if vcpkg is cloned into a path with more than 64 chars. Steps to reproduce:

cd C:/
mkdir 01234567890123456789012345678901234567890123456789012345678901
cd 01234567890123456789012345678901234567890123456789012345678901
git clone https://github.com/microsoft/vcpkg vcpkg
cd vcpkg
./bootstrap-vcpkg.bat
vcpkg.exe install msquic

If you clone vcpkg into dir which path, including drive letter, is 64 chars or less then it builds just fine.

Package: msquic:[email protected]#1

Host Environment

  • Host: arm64-windows
  • Compiler: MSVC 19.41.34123.0
  • vcpkg-tool version: 2024-10-18-e392d7347fe72dff56e7857f7571c22301237ae6
    vcpkg-scripts version: bb1ca27 2024-10-29 (20 hours ago)

To Reproduce

vcpkg install msquic

Failure logs

-- Using cached microsoft-msquic-v2.4.5.tar.gz.
-- Cleaning sources at C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/src/v2.4.5-9d07a67b94.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/downloads/microsoft-msquic-v2.4.5.tar.gz
-- Applying patch fix-install.patch
-- Applying patch fix-uwp-crt.patch
-- Applying patch fix-comparing-system-processor-with-win32.patch
-- Applying patch all_headers.patch
-- Using source at C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/src/v2.4.5-9d07a67b94.clean
-- Using cached quictls-openssl-openssl-3.1.7-quic1.tar.gz.
-- Extracting source C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/downloads/quictls-openssl-openssl-3.1.7-quic1.tar.gz
-- Using source at C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/src/.1.7-quic1-3ed24a3d6a.clean
-- Using cached microsoft-xdp-for-windows-v1.0.2.tar.gz.
-- Extracting source C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/downloads/microsoft-xdp-for-windows-v1.0.2.tar.gz
-- Using source at C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/src/v1.0.2-1c61aa6a98.clean
-- Configuring arm64-windows
-- Building arm64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j5
    Working Directory: C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/arm64-windows-dbg
    See logs for more information:
      C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\install-arm64-windows-dbg-out.log

Call Stack (most recent call first):
  installed/arm64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/arm64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/msquic/portfile.cmake:73 (vcpkg_cmake_install)
  scripts/ports.cmake:192 (include)



C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\install-arm64-windows-dbg-out.log
Change Dir: 'C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/arm64-windows-dbg'

Run Build Command(s): C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v -v -j5 install
[1/63] C:\Windows\system32\cmd.exe /C "cd /D C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\arm64-windows-dbg && mc.exe -um -h C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/arm64-windows-dbg/inc -r C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/arm64-windows-dbg/inc C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/src/v2.4.5-9d07a67b94.clean/src/manifest/MsQuicEtw.man"
[2/63] C:/PROGRA~1/CMake/bin/cmcldeps.exe RC C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\arm64-windows-dbg\inc\MsQuicEtw.rc CMakeFiles\MsQuicEtw_Resource.dir\inc\MsQuicEtw.rc.res.d CMakeFiles\MsQuicEtw_Resource.dir\inc\MsQuicEtw.rc.res "Note: including file: " "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.41.34120/bin/Hostarm64/arm64/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\arm64\rc.exe   -c65001 /DWIN32 -D_DEBUG /fo CMakeFiles\MsQuicEtw_Resource.dir\inc\MsQuicEtw.rc.res C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\arm64-windows-dbg\inc\MsQuicEtw.rc
[3/63] C:\Windows\system32\cmd.exe /C "cd /D C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\arm64-windows-dbg\_deps\opensslquic-build\submodules\openssl3\debug && perl C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/src/v2.4.5-9d07a67b94.clean/submodules/openssl3/Configure enable-tls1_3 no-makedepend no-dgram no-ssl3 no-psk no-srp no-zlib no-egd no-idea no-rc5 no-rc4 no-afalgeng no-comp no-cms no-ct no-srp no-srtp no-ts no-gost no-dso no-ec2m no-tls1 no-tls1_1 no-tls1_2 no-dtls no-dtls1 no-dtls1_2 no-ssl no-ssl3-method no-tls1-method no-tls1_1-method no-tls1_2-method no-dtls1-method no-dtls1_2-method no-siphash no-whirlpool no-aria no-bf no-blake2 no-sm2 no-sm3 no-sm4 no-camellia no-cast no-md4 no-mdc2 no-ocb no-rc2 no-rmd160 no-scrypt no-seed no-weak-ssl-ciphers no-shared no-tests no-uplink no-cmp no-fips no-padlockeng no-siv no-legacy no-dtls no-deprecated --libdir=lib --openssldir="C:\Program Files\Common Files\SSL" VC-WIN64-ARM /Qspectre --debug --prefix=C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/arm64-windows-dbg/_deps/opensslquic-build/openssl3/debug "
FAILED: _deps/opensslquic-build/submodules/openssl3/debug/makefile C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/arm64-windows-dbg/_deps/opensslquic-build/submodules/openssl3/debug/makefile 
C:\Windows\system32\cmd.exe /C "cd /D C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\arm64-windows-dbg\_deps\opensslquic-build\submodules\openssl3\debug && perl C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/src/v2.4.5-9d07a67b94.clean/submodules/openssl3/Configure enable-tls1_3 no-makedepend no-dgram no-ssl3 no-psk no-srp no-zlib no-egd no-idea no-rc5 no-rc4 no-afalgeng no-comp no-cms no-ct no-srp no-srtp no-ts no-gost no-dso no-ec2m no-tls1 no-tls1_1 no-tls1_2 no-dtls no-dtls1 no-dtls1_2 no-ssl no-ssl3-method no-tls1-method no-tls1_1-method no-tls1_2-method no-dtls1-method no-dtls1_2-method no-siphash no-whirlpool no-aria no-bf no-blake2 no-sm2 no-sm3 no-sm4 no-camellia no-cast no-md4 no-mdc2 no-ocb no-rc2 no-rmd160 no-scrypt no-seed no-weak-ssl-ciphers no-shared no-tests no-uplink no-cmp no-fips no-padlockeng no-siv no-legacy no-dtls no-deprecated --libdir=lib --openssldir="C:\Program Files\Common Files\SSL" VC-WIN64-ARM /Qspectre --debug --prefix=C:/01234567890123456789012345678901234567890123456789012345678901/vcpkg/buildtrees/msquic/arm64-windows-dbg/_deps/opensslquic-build/openssl3/debug "
Configuring OpenSSL version 3.1.7+quic for target VC-WIN64-ARM
Using os-specific seed configuration

Failure!  makefile wasn't produced.
Please read INSTALL.md and associated NOTES-* files.  You may also have to
look over your available compiler tool chain or change your configuration.

*** Couldn't find any of:
..\..\..\..\..\..\src\v2.4.5-9d07a67b94.clean\submodules\openssl3\Configurations\windows-makefile.tmpl
..\..\..\..\..\..\src\v2.4.5-9d07a67b94.clean\submodules\openssl3\Configurations\makefile.tmpl
[4/63] C:\PROGRA~2\MICROS~2\2022\BUILDT~1\VC\Tools\MSVC\1441~1.341\bin\HOSTAR~1\arm64\cl.exe   -DQUIC_DISABLE_SHARED_PORT_TESTS -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB -DQUIC_TEST_OPENSSL_FLAGS=1 -DSECURITY_WIN32 -DVER_BUILD_ID=0 -DVER_SUFFIX=-private -DWIN32_LEAN_AND_MEAN -IC:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\inc /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c11 -MDd /analyze /Qspectre /guard:cf /MP /WX /W4 /sdl /wd4206 /showIncludes /Fosrc\core\CMakeFiles\core.dir\binding.c.obj /Fdsrc\core\CMakeFiles\core.dir\core.pdb /FS -c C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\core\binding.c
[5/63] C:\PROGRA~2\MICROS~2\2022\BUILDT~1\VC\Tools\MSVC\1441~1.341\bin\HOSTAR~1\arm64\cl.exe   -DQUIC_DISABLE_SHARED_PORT_TESTS -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB -DQUIC_TEST_OPENSSL_FLAGS=1 -DSECURITY_WIN32 -DVER_BUILD_ID=0 -DVER_SUFFIX=-private -DWIN32_LEAN_AND_MEAN -IC:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\inc /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c11 -MDd /analyze /Qspectre /guard:cf /MP /WX /W4 /sdl /wd4206 /showIncludes /Fosrc\core\CMakeFiles\core.dir\api.c.obj /Fdsrc\core\CMakeFiles\core.dir\core.pdb /FS -c C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\core\api.c
[6/63] C:\PROGRA~2\MICROS~2\2022\BUILDT~1\VC\Tools\MSVC\1441~1.341\bin\HOSTAR~1\arm64\cl.exe   -DQUIC_DISABLE_SHARED_PORT_TESTS -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB -DQUIC_TEST_OPENSSL_FLAGS=1 -DSECURITY_WIN32 -DVER_BUILD_ID=0 -DVER_SUFFIX=-private -DWIN32_LEAN_AND_MEAN -IC:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\inc /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c11 -MDd /analyze /Qspectre /guard:cf /MP /WX /W4 /sdl /wd4206 /showIncludes /Fosrc\core\CMakeFiles\core.dir\ack_tracker.c.obj /Fdsrc\core\CMakeFiles\core.dir\core.pdb /FS -c C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\core\ack_tracker.c
[7/63] C:\PROGRA~2\MICROS~2\2022\BUILDT~1\VC\Tools\MSVC\1441~1.341\bin\HOSTAR~1\arm64\cl.exe   -DQUIC_DISABLE_SHARED_PORT_TESTS -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB -DQUIC_TEST_OPENSSL_FLAGS=1 -DSECURITY_WIN32 -DVER_BUILD_ID=0 -DVER_SUFFIX=-private -DWIN32_LEAN_AND_MEAN -IC:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\inc /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c11 -MDd /analyze /Qspectre /guard:cf /MP /WX /W4 /sdl /wd4206 /showIncludes /Fosrc\core\CMakeFiles\core.dir\configuration.c.obj /Fdsrc\core\CMakeFiles\core.dir\core.pdb /FS -c C:\01234567890123456789012345678901234567890123456789012345678901\vcpkg\buildtrees\msquic\src\v2.4.5-9d07a67b94.clean\src\core\configuration.c
ninja: build stopped: subcommand failed.
@redbaron redbaron changed the title [msquic] Build error on arm64-windows if vcpkg dir parent path more than 63 chars [msquic] Build error on arm64-windows if vcpkg dir parent path more than 64 chars Oct 30, 2024
@JonLiu1993 JonLiu1993 added the category:question This issue is a question label Oct 31, 2024
@JonLiu1993
Copy link
Member

@redbaron, thanks for posting this question, you can use the parameter --x-buildtrees-root= to specify the path to install, such as:
./vcpkg.exe install msquic --x-buildtrees-root=F:\test\012\vcpkg

@redbaron
Copy link
Contributor Author

yes, that's what I ended up using. IDK why this bug report was categorised as question.

@JonLiu1993
Copy link
Member

Because this has nothing to do with the port, it is a design limitation of vcpkg.

@redbaron
Copy link
Contributor Author

It is a build failure report, certainly not a question. I spend 2 hours reducing unexplainable build failure to this minimal case and I can't be the only one.

if it is a known limitation, vcpkg could do A LOT more:

  1. vcpkg should at least document it
  2. vcpkg should read builtree path from env var and setup instructions should encourage users to use it. It will help users who pull vcpkg as a submodule, not a standalone ENV{VCPKG_ROOT} clone
  3. if it detects long path on build error it could hint a user that it might be due to it
  4. there seems to be avcpkg_buildpath_length_warning helper. Each individual port has to self-report as potentially problematic, even though my understanding that ALL of them can fail build given long enough vcpkg clone location. Now that msquic is known to be susceptible to it this build failure report definitely has something to do with port: it should make use of vcpkg_buildpath_length_warning at the very least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants