Skip to content

Fix MSVC build for Python 3.6#12878

Closed
smessmer wants to merge 1 commit intopytorch:masterfrom
smessmer:export-D10467239
Closed

Fix MSVC build for Python 3.6#12878
smessmer wants to merge 1 commit intopytorch:masterfrom
smessmer:export-D10467239

Conversation

@smessmer
Copy link
Copy Markdown
Contributor

@smessmer smessmer commented Oct 19, 2018

Stack:
    :black_circle:  #12878 Fix MSVC build for Python 3.6  💚

Python 3.6 headers define their own ssize_t, which clashes with our definition.
Luckily, they also define a HAVE_SSIZE_T macro we can use to check for this case.

Differential Revision: D10467239

@yf225
Copy link
Copy Markdown
Contributor

yf225 commented Oct 19, 2018

It's weird that our current Windows CI didn't catch this problem. @peterjc123 Do you have any insights?

@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Oct 19, 2018

We are building with Python 3.7. Did 3.7 get rid of this macro?

@peterjc123
Copy link
Copy Markdown
Collaborator

We did't set the Python version explicitly so it is actually building for Python 3.7.

Summary:
Pull Request resolved: pytorch#12878

Python 3.6 headers define their own ssize_t, which clashes with our definition.
Luckily, they also define a `HAVE_SSIZE_T` macro we can use to check for this case.

Reviewed By: ezyang

Differential Revision: D10467239

fbshipit-source-id: bf9397f9fbbc10b6fb13c500b616c83c72480598
zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 23, 2018
Summary:
Pull Request resolved: pytorch/pytorch#12878

Python 3.6 headers define their own ssize_t, which clashes with our definition.
Luckily, they also define a `HAVE_SSIZE_T` macro we can use to check for this case.

Reviewed By: ezyang

Differential Revision: D10467239

fbshipit-source-id: 661675ad1e30a6ca26d6790eaa75657ef6bf37c2
@ezyang ezyang added the merged label Jun 25, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: pytorch#12878

Python 3.6 headers define their own ssize_t, which clashes with our definition.
Luckily, they also define a `HAVE_SSIZE_T` macro we can use to check for this case.

Reviewed By: ezyang

Differential Revision: D10467239

fbshipit-source-id: 661675ad1e30a6ca26d6790eaa75657ef6bf37c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants