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

Building extensions with MSVC 2015 Express fails #70037

Closed
SamiSalonen mannequin opened this issue Dec 12, 2015 · 6 comments
Closed

Building extensions with MSVC 2015 Express fails #70037

SamiSalonen mannequin opened this issue Dec 12, 2015 · 6 comments
Assignees
Labels
extension-modules C modules in the Modules dir OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@SamiSalonen
Copy link
Mannequin

SamiSalonen mannequin commented Dec 12, 2015

BPO 25850
Nosy @pfmoore, @vstinner, @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 = 'https://github.com/zooba'
closed_at = <Date 2016-01-16.20:41:48.996>
created_at = <Date 2015-12-12.21:20:25.416>
labels = ['extension-modules', 'type-bug', 'library', 'OS-windows']
title = 'Building extensions with MSVC 2015 Express fails'
updated_at = <Date 2016-01-26.13:10:03.877>
user = 'https://bugs.python.org/SamiSalonen'

bugs.python.org fields:

activity = <Date 2016-01-26.13:10:03.877>
actor = 'vstinner'
assignee = 'steve.dower'
closed = True
closed_date = <Date 2016-01-16.20:41:48.996>
closer = 'steve.dower'
components = ['Distutils', 'Extension Modules', 'Windows']
creation = <Date 2015-12-12.21:20:25.416>
creator = 'Sami Salonen'
dependencies = []
files = []
hgrepos = []
issue_num = 25850
keywords = []
message_count = 6.0
messages = ['256296', '256309', '256313', '258406', '258408', '258955']
nosy_count = 9.0
nosy_names = ['paul.moore', 'vstinner', 'tim.golden', 'eric.araujo', 'python-dev', 'zach.ware', 'steve.dower', 'dstufft', 'Sami Salonen']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue25850'
versions = ['Python 3.5', 'Python 3.6']

@SamiSalonen
Copy link
Mannequin Author

SamiSalonen mannequin commented Dec 12, 2015

MSVC 2015 Express doesn't include the 64-bit compiler [1], and this causes distutils to fail to load proper compiler settings when using a 64-bit machine to compile extensions for 64-bit python. _msvccompiler.py tries to call "vcvarsall.bat amd64", but the VC\bin\amd64 directory contains only one file "vcmeta.dll".

[1] https://msdn.microsoft.com/en-us/library/hs24szh9(v=vs.140).aspx

@SamiSalonen SamiSalonen mannequin added stdlib Python modules in the Lib dir extension-modules C modules in the Modules dir OS-windows labels Dec 12, 2015
@zware
Copy link
Member

zware commented Dec 13, 2015

I'm inclined to close this as 'not a bug'. There's not much we can do about that (if you want 64 bit extensions, you need a 64 bit compiler), and 2015 Community Edition does include the 64 bit compiler (if you select it).

I'm not sure if there's anything to be done in distutils to handle things more gracefully.

@zooba
Copy link
Member

zooba commented Dec 13, 2015

There is: we can fall back on the cross compilers if the native ones are not there.

Not a huge change, and safe enough.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Jan 16, 2016

New changeset fc117df27143 by Steve Dower in branch '3.5':
Issue bpo-25850: Use cross-compilation by default for 64-bit Windows.
https://hg.python.org/cpython/rev/fc117df27143

New changeset 37dc870175be by Steve Dower in branch 'default':
Issue bpo-25850: Use cross-compilation by default for 64-bit Windows.
https://hg.python.org/cpython/rev/37dc870175be

@zooba zooba closed this as completed Jan 16, 2016
@zooba zooba self-assigned this Jan 16, 2016
@zooba zooba added the type-bug An unexpected behavior, bug, or error label Jan 16, 2016
@zooba
Copy link
Member

zooba commented Jan 16, 2016

For anyone interested, there's no issue with using the cross compilers even on a 64-bit system. The same code will be generated, the only difference is that the native 64-bit compilers can keep more in memory than the 32-bit cross compilers. For most Python extensions this won't matter (it matters for building huge projects like an operating system).

@vstinner
Copy link
Member

test_distutils is now failing on "AMD64 Windows7 SP1 3.x" buildbot: please see issue bpo-26207.

@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
extension-modules C modules in the Modules dir OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants