-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
_msvccompiler.py doesn't properly support manifests #68986
Comments
I have been using _msvcompiler.py from Python 3.5 to build some executables but I have been unable to get it to generate and embed a manifest. When I looked into this I found that the subroutine that sets up the parameters for generating a manifest ('manifest_get_embed_info' at around line 471) has the line: ld_args.append('/MANIFESTFILE:' + temp_manifest) to set the manifest's name but doesn't actually ask for a manifest to be generated. Here is what is said about /MANIFESTFILE on MSDN: "/MANIFESTFILE will have no effect if you do not also link with /MANIFEST." After adding: ld_args.append('/MANIFEST') before the above line, I then succeed in obtaining the manifest. |
It looks like manifests aren't generated with CRT version info anymore either, so I'll take this opportunity to clean up the build process some more too. |
I've simplified the manifest handling:
Not necessarily going to wait for lots of reviews, as I know very few people are interested in distutils, but feel free to chime in if you like. I'll give it a day or so. |
New changeset 8e966eba2b5e by Steve Dower in branch '3.5': New changeset f61a083b843f by Steve Dower in branch 'default': |
Made a couple more changes (including a fix for vcruntime140.dll embedding) after testing numpy's build, but that worked fine with the final fixes. |
This change broke all my builds that link statically against 3rd party libraries built with the The build errors are of this kind: The linker throws the following warning: |
Please open a new issue, referencing this one. Priority should be set to release blocker. (I forget if regular users can do that; if you can't I will.) |
It seems the switch to '/MT' was consciously intended as Python 3.5 itself is now compiled with '/MT'. |
Those libraries will depend on vcruntime140.dll which is not installed with CPython right now. In order for packages built with future compilers to work we need to statically link that dependency but not ucrt, which there are linker options for. I'm thinking hard to come up with better approaches, but most of them require predicting the future. Create a new issue if you like or I'll make one when I have something to propose. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: