Fix Windows cibuildwheel failure: linker cannot find openblas.lib#1
Closed
Copilot wants to merge 4 commits into
Closed
Fix Windows cibuildwheel failure: linker cannot find openblas.lib#1Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failure of cibuildwheel on Windows platform
Fix Windows cibuildwheel failure: linker cannot find openblas.lib
Feb 18, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes Windows cibuildwheel failures caused by the linker being unable to locate openblas.lib. The root issue was that environment variables defined in the GitHub Actions workflow YAML were not propagating to cibuildwheel's isolated build environment.
Changes:
- Relocated Windows-specific cibuildwheel configuration from workflow YAML to
pyproject.toml - Added library and include path environment variables pointing to vcpkg installation directories
- Enhanced vcpkg caching with hash-based keys and restore fallbacks
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Added Windows cibuildwheel configuration with vcpkg setup command and environment variables for library/include paths |
| .github/workflows/cibuildwheel.yml | Removed Windows environment variables from workflow and improved vcpkg cache configuration |
Comments suppressed due to low confidence (2)
pyproject.toml:32
- The command string uses semicolons to chain PowerShell commands, which can fail silently if any intermediate command fails. Consider using
-ErrorAction Stopand separating commands with&&or properly handling errors to ensure the vcpkg installation doesn't proceed if cloning or bootstrapping fails.
before-all = "powershell -Command \"if (!(Test-Path C:\\vcpkg\\vcpkg.exe)) { git clone https://github.com/microsoft/vcpkg.git C:\\vcpkg; C:\\vcpkg\\bootstrap-vcpkg.bat -disableMetrics }; C:\\vcpkg\\vcpkg.exe install openblas:x64-windows\""
pyproject.toml:33
- The hardcoded paths
C:\\vcpkg\\installed\\x64-windows\\includeandC:\\vcpkg\\installed\\x64-windows\\libare duplicated from the before-all command and tightly couple the configuration to this specific installation location. Consider using a variable or ensuring consistency if the vcpkg path ever needs to change.
environment = { EASYSBA_LAPACK_LIBS = "openblas", EASYSBA_INCLUDE_DIRS = "C:\\vcpkg\\installed\\x64-windows\\include", EASYSBA_LIBRARY_DIRS = "C:\\vcpkg\\installed\\x64-windows\\lib" }
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows builds were failing with
LNK1181: cannot open input file 'openblas.lib'. Environment variables for library paths defined in workflow YAML were not propagating to cibuildwheel's isolated build environment.Changes
CIBW_BEFORE_ALL_WINDOWSandCIBW_ENVIRONMENT_WINDOWSnow defined in[tool.cibuildwheel.windows]section where cibuildwheel correctly passes them to the buildEASYSBA_INCLUDE_DIRSandEASYSBA_LIBRARY_DIRSpoint to vcpkg's x64-windows installation pathsConfiguration
The
setup.pyalready parses these environment variables via_parse_path_env()and adds them tolibrary_dirsfor the Extension.💡 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.