Fix Windows build: Use forward slashes in vcpkg paths#2
Conversation
Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the Windows cibuildwheel GitHub Actions workflow so OpenBLAS (installed via vcpkg) can be found reliably during wheel builds, addressing a Windows linker failure caused by path escaping/formatting.
Changes:
- Switch
CIBW_ENVIRONMENT_WINDOWSvcpkg paths from backslashes to forward slashes. - Keep the OpenBLAS/vcpkg environment variables aligned with the x64-windows vcpkg install location.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| INCLUDE=C:/vcpkg/installed/x64-windows/include | ||
| LIB=C:/vcpkg/installed/x64-windows/lib |
There was a problem hiding this comment.
INCLUDE and LIB are being overwritten to only the vcpkg paths. This can unintentionally drop the MSVC/Windows SDK include+lib search paths depending on how the toolchain env is initialized, leading to brittle builds. Safer options are to (a) rely solely on EASYSBA_INCLUDE_DIRS/EASYSBA_LIBRARY_DIRS (setup.py already consumes these), or (b) append to the existing values (similar to PATH) instead of replacing them.
| INCLUDE=C:/vcpkg/installed/x64-windows/include | |
| LIB=C:/vcpkg/installed/x64-windows/lib | |
| INCLUDE=C:/vcpkg/installed/x64-windows/include;{INCLUDE} | |
| LIB=C:/vcpkg/installed/x64-windows/lib;{LIB} |
Windows builds failed with
LNK1181: cannot open input file 'openblas.lib'. The linker couldn't find the library despite vcpkg installing it correctly toC:\vcpkg\installed\x64-windows\lib.Root cause: Backslashes in
CIBW_ENVIRONMENT_WINDOWSpaths were being stripped during YAML processing, resulting in malformed paths likeC:vcpkginstalledx64-windowslibpassed to the compiler.Changes
Changed all Windows path separators in
.github/workflows/cibuildwheel.ymlfrom backslashes to forward slashes:Windows accepts both separators; forward slashes avoid escaping issues in YAML multiline strings.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh gh pr view --json number,state,title(http block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.