Skip to content
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

msvcr140.dll has been replaced with vcruntime140.dll #76716

Closed
BrunoAbreuCalfa mannequin opened this issue Jan 11, 2018 · 6 comments
Closed

msvcr140.dll has been replaced with vcruntime140.dll #76716

BrunoAbreuCalfa mannequin opened this issue Jan 11, 2018 · 6 comments
Labels
OS-windows stdlib Python modules in the Lib dir

Comments

@BrunoAbreuCalfa
Copy link
Mannequin

BrunoAbreuCalfa mannequin commented Jan 11, 2018

BPO 32535
Nosy @pfmoore, @tjguk, @merwok, @zware, @zooba, @dstufft

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2018-01-12.02:09:09.187>
created_at = <Date 2018-01-11.16:34:33.151>
labels = ['library', 'OS-windows']
title = 'msvcr140.dll has been replaced with vcruntime140.dll'
updated_at = <Date 2018-01-12.02:09:09.176>
user = 'https://bugs.python.org/BrunoAbreuCalfa'

bugs.python.org fields:

activity = <Date 2018-01-12.02:09:09.176>
actor = 'steve.dower'
assignee = 'none'
closed = True
closed_date = <Date 2018-01-12.02:09:09.187>
closer = 'steve.dower'
components = ['Distutils', 'Windows']
creation = <Date 2018-01-11.16:34:33.151>
creator = 'Bruno Abreu Calfa'
dependencies = []
files = []
hgrepos = []
issue_num = 32535
keywords = []
message_count = 6.0
messages = ['309816', '309831', '309833', '309834', '309835', '309836']
nosy_count = 7.0
nosy_names = ['paul.moore', 'tim.golden', 'eric.araujo', 'zach.ware', 'steve.dower', 'dstufft', 'Bruno Abreu Calfa']
pr_nums = []
priority = 'normal'
resolution = 'third party'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue32535'
versions = ['Python 3.6']

@BrunoAbreuCalfa
Copy link
Mannequin Author

BrunoAbreuCalfa mannequin commented Jan 11, 2018

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 (#880).

In sum, I suggest replacing

return ['msvcr140']

with

return ['vcruntime140']

@BrunoAbreuCalfa BrunoAbreuCalfa mannequin added the stdlib Python modules in the Lib dir label Jan 11, 2018
@zooba
Copy link
Member

zooba commented Jan 11, 2018

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).

@BrunoAbreuCalfa
Copy link
Mannequin Author

BrunoAbreuCalfa mannequin commented Jan 11, 2018

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?

@zooba
Copy link
Member

zooba commented Jan 12, 2018

A little bit. You're trying to build with mingw32? Do they support linking against the UCRT?

@BrunoAbreuCalfa
Copy link
Mannequin Author

BrunoAbreuCalfa mannequin commented Jan 12, 2018

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. :)

@zooba
Copy link
Member

zooba commented Jan 12, 2018

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.)

@zooba zooba closed this as completed Jan 12, 2018
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants