This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: msvcr140.dll has been replaced with vcruntime140.dll
Type: Stage: resolved
Components: Distutils, Windows Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Bruno Abreu Calfa, dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2018-01-11 16:34 by Bruno Abreu Calfa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (6)
msg309816 - (view) Author: Bruno Abreu Calfa (Bruno Abreu Calfa) Date: 2018-01-11 16:34
File msvcr140.dll does not exist after installing Microsoft Visual C++ 2015 Redistributable or Visual Studio 2015. It has been replaced with vcruntime140.dll. See discussion here: https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/yLH46ilPQeo

In addition, I was only able to build an extension (https://github.com/mattjj/pyhsmm) after copying the vcruntime140.dll from the Python installation folder (Anaconda 3 5.0.1 64-bit, Python 3.6.3) to the libs folder. I also had to change file include/pyconfig.h by removing the definitions of hypot (https://github.com/python/cpython/pull/880).

In sum, I suggest replacing

return ['msvcr140']

with

return ['vcruntime140']
msg309831 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-01-11 22:45
Where is that code? Presumably in distutils, and yet distutils has worked just fine for the 3.5 and 3.6 releases.

Perhaps you can clarify the bug report into something we can understand and investigate? That only thing in that thread I see that matches your suggestion is code that somebody *added* to distutils and found that it doesn't work (as expected).
msg309833 - (view) Author: Bruno Abreu Calfa (Bruno Abreu Calfa) Date: 2018-01-11 23:00
Steve, I tried building the pyhsmm project (https://github.com/mattjj/pyhsmm) using:

python setup.py build -c mingw32

I got a link error saying that -lmsvcr140 could not be found. Then I realized that msvcr140.dlll doesn't exist. Instead, vcruntime140.dll seems to be the correct DLL. I was only able to build that project after making the modifications mentioned in my previous message, which requires changing a few files.

In order to try to reproduce the problem, one should try to build that project after installing Visual C++ 2015 Redistributable or Visual Studio 2015 to fall into the same MSVC version case as mine.

Does this clarify the issue?
msg309834 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-01-12 00:41
A little bit. You're trying to build with mingw32? Do they support linking against the UCRT?
msg309835 - (view) Author: Bruno Abreu Calfa (Bruno Abreu Calfa) Date: 2018-01-12 00:54
Correct. I installed the x86_64 version from mingw32-w64 (https://mingw-w64.org, v5.0.3).

I found this post https://mingwpy.github.io/ucrt.html, which actually references a post of yours. I honestly don't know if UCRT is supported by MinGW compiler. What are you going for? After googling a lot, I found many complaints of "missing msvcr140.dll", so I'm pretty much convinced that doesn't exist and has been replaced. But what does this have to do with the UCRT business? This is a bit beyond my knowledge on the matter. :)
msg309836 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-01-12 02:09
The CRT isn't a simple DLL anymore, and MinGW isn't a fully supported compiler either. You're going to be best to work with the people behind mingwpy to get it working, as there really isn't anything we can do on our end (though I do what I can to help them out, short of committing code).

As I understand it, work on mingwpy has basically stopped right now for a variety of reasons, and most projects have found ways to work with MSVC. 

I'm going to close this bug as external. When there is something for us to change in core, then we can consider it. (About the only thing worth doing right now is fully removing the mingw support to avoid confusion, but there's no value in that so why bother.)
History
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76716
2018-01-12 02:09:09steve.dowersetstatus: open -> closed
resolution: third party
messages: + msg309836

stage: resolved
2018-01-12 00:54:42Bruno Abreu Calfasetmessages: + msg309835
2018-01-12 00:41:37steve.dowersetmessages: + msg309834
2018-01-11 23:00:29Bruno Abreu Calfasetmessages: + msg309833
2018-01-11 22:45:12steve.dowersetmessages: + msg309831
2018-01-11 20:31:50ned.deilysetnosy: + paul.moore, tim.golden, zach.ware, steve.dower
components: + Windows
2018-01-11 16:34:33Bruno Abreu Calfacreate