-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: error compiling on MSVC 141 toolchain #21346
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
Comments
@serge-sans-paille Thoughts? |
This intrinsic comes with Looks like an MSVC issue: https://godbolt.org/z/nz63xTv8d |
Hmm, the 1.41 library is five years old, maybe too early. |
OTOH, VS2017 (which comes with VC141) is EOL now; as long as things like matthew-brett/dll_investigation#1 can be solved (which looks like it can be done with an extra flag), I think the cost/benefit of dropping VC141 should be considered, especially vis-à-vis how much dev time gets eaten by bugs like this one. |
Conda-forge is on 14.1, as are our wheel builds. So we should just fix this right? Now that the problem is identified it shouldn't be too hard I'd think. A little surprising that we didn't notice this elsewhere yet. Maybe we're not using 14.1 in regular CI anywhere yet, and didn't see it in the weekly |
I checked that they are all being built and uploaded.
I agree with the sentiment, the question seems to be how to manage that for conda-forge. |
I don't think scipy is running a CI build against the weekly numpy wheels. The PyPI wheels are still built with visual 2017. |
Yes we are, two of them I believe. Although one of them may be structurally timing out. But we've done this in SciPy for years. |
The 1.22.3+ wheels are built with vs2019 using the 1.41 toolchain. I'm not clear at this point what that all means :) |
Right, so either 2017 or the 1.41 toolchain, but not the 1.42 toolchain. PR 151 goes to quite a bit of effort to make sure numpy-wheels produces wheels using the 1.41 toolchain.
I see the |
My (personal) take is that conda-forge could easily make the move to vc142 - not least because we have complete control over the conda-forge-wide toolchain. The discussion already came up in the context of Azure deprecating VS2017, and all that's missing is someone to champion that change. I've been holding off on doing that because it's not a fun discussion to have, but it's IMO overdue (e.g. LLVM 14 already moved to require VS2019+, and we have followed suit there as well.) - the only concern was for people using conda-environments to develop on windows, but having VS2017 installed locally. I claim (and would like to be challenged on this) that the set of affected users (who develop on windows using conda, aren't already directly or indirectly** affected by CI providers dropping VS2017, and cannot upgrade to a 100% ABI-compatible, 1:1 drop-in & free compiler) is empty, or very very close to it. ** Based on the aggressive removal of VS2017, many open source projects have already moved away (at the very least unintentionally, as numpy did originally for 1.22) from vc141, and that means bitrot & breakage for those using any such project as a dependency while trying to keep on living with an EOL compiler. |
PS. I continue to think that we should have a toolchain-equivalent of NEP29. It's IMO not a productive use of everyone's time to keep rehashing many of the same points when it comes to toolchain upgrades. It think it would be worth the effort to come up with a reasonable policy for the various platforms / scenarios, and then stick to that. I might even be convinced to write such a NEP, but last time I proposed this, the appetite for it was low. |
If we choose to require MSVC 142 or greater as a solution to this issue, we should document it in the release notes. The code was introduced in PR #20133 and will be part of the upcoming 1.23 release. This means we require conda-forge to update before the release. I started to try to work around the missing intrinsic in #21361, but the same CI commands that worked to set the toolchain in numpy-wheels did not work for me in that PR. I will see if I can set up a 141 toolchain locally. |
@mattip - what didn't work - I'd like to know to make sure we're doing it right. Here's what I use locally:
|
The changes in the |
@mattip - does the step lack a |
You can also use EDIT: That is for azure-pipelines, but perhaps for github actions as well. |
Maybe this is the contrast between Azure workflows and Github actions? Setting paths in Github actions is via environment files - e.g. https://github.com/actions/toolkit/blob/main/docs/commands.md#powershell |
Let's continue the CI disussion in #21361, and leave this issue for the compilation error itself |
I opened conda-forge/conda-forge.github.io#1732 to discuss this on the conda-forge side. |
Describe the issue:
When compiling current Numpy main (ae13307) on MSVC v141, with
pip install -v -v .
, I get the following compilation error:This is with:
If I'm using the 142 toolchain, Numpy compiles to completion:
In both cases:
Reproduce the code example:
Error message:
NumPy/Python version information:
See above.
The text was updated successfully, but these errors were encountered: