-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
BLD: fix build issues with MSVC10 on Windows. Closes gh-4245. #4892
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
Conversation
I get:
at config.py line 80 |
right you can't access double underscore names in python, they are mangled |
distutils.msvccompiler.get_build_version() might work |
Right, forgot about that one. Why mangle a version number? I'll update to |
updated. skipping Travis tests, changes not covered by any tests anyway. |
seems to get past the point that caused problems before, now failing due to ldexp/frexp stuff, probably related to the generation of these ufuncs not this PR |
For reference, ldexp/frexp pr is gh-4852. |
So when I got the bug last time I was using Here is the last few lines, though I'm not sure it's very helpful.
|
@mcleung yes, @juliantaylor also just noticed that. That should be a recently introduced regression. I'll create a second branch based on a commit just before that regression for you to test now. |
@mcleung could you try this branch: https://github.com/rgommers/numpy/tree/msvc10-fix-test? Regressions with MSVC happen once in a while unfortunately because we don't have CI set up for it. |
I'm just testing based on the 1.9 branch with 2.7, 3.3 and 3.4, seems to be working fine and does the same thing I always patched my local python installations too anyway so it should be safe. @rgommers can you rebase it onto the branch point, I think this should go into 1.9
possibly the commits could also be squashed. |
Note that there are a few similar patches posted to numpygh-4101 and numpygh-4245. Those were all patches to msvc9compiler in Python distutils. Monkeypatching ``MSVCCompiler.link`` is less easy than this change to ``config._check_compiler``; effect should be the same. Also updates the error message shown when initializing MSVC fails. [ci skip]
sure, done. |
# flags. See issues gh-4245 and gh-4101 for details. Also | ||
# relevant are issues 4431 and 16296 on the Python bug tracker. | ||
from distutils import msvc9compiler | ||
if msvc9compiler.get_build_version() >= 10: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to put this block into a try..except
newer python versions will use newer compilers and could fix the distutils issue we are working around
when this happens this could break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added one at first, but then removed it because a try-except block isn't going to help in that case (the code below can't really fail, and get_build_version
shouldn't either). Doesn't hurt either though.
It installed correctly, and then when I opened python and imported numpy I got errors. A quick reboot seemed to have fixed it.
A quick test shows that all seems to be working fine. |
k in it goes, thanks |
BLD: fix build issues with MSVC10 on Windows. Closes gh-4245.
BLD: fix build issues with MSVC10 on Windows. Closes gh-4245.
You may have merged the wrong one. I'm not too sure what the rebasing did. |
the master branch is 1.10 and currently does not compile with msvc, please try the |
@mcleung thanks for testing. Julian did merge the right branch. The |
Thanks to you guys for fixing it so quickly. I'm just doing my part reporting bugs when I find them. I'm a regular user and want to say thanks. Upgrading to 3.4 from 2.X is causing more trouble then I anticipated. Oh well, at least it's fixed now when others adopt 3.X! |
@mcleung thank you for the help. And it wasn't that quick, first issue opened for this was in December... |
Note that there are a few similar patches posted to gh-4101 and gh-4245. Those were all patches to msvc9compiler in Python distutils. Monkeypatching
MSVCCompiler.link
is less easy than this change toconfig._check_compiler
; effect should be the same.I don't have MSVC and TravisCI tests don't help here, so needs some manual testing. I'll ping some people who have had issues with this.