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

Fix 'redefinition; different linkage' errors with cp313-win #115

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Oct 14, 2024

After updating mypyc to the latest pythoncapi_compat.h, the cp313-win wheel builds started to fail.

  C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.13.0\tools\include\internal\pycore_unicodeobject.h(262): error C2375: '_PyUnicode_Equal': redefinition; different linkage
  D:\a\mypy_mypyc-wheels\mypy_mypyc-wheels\mypy\mypyc\lib-rt\pythoncapi_compat.h(1540): note: see declaration of '_PyUnicode_Equal'

  C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.13.0\tools\include\internal\pycore_pyhash.h(24): error C2375: '_Py_HashBytes': redefinition; different linkage
  D:\a\mypy_mypyc-wheels\mypy_mypyc-wheels\mypy\mypyc\lib-rt\pythoncapi_compat.h(1567): note: see declaration of '_Py_HashBytes'

https://github.com/mypyc/mypy_mypyc-wheels/actions/runs/11327195039/job/31497783023#step:4:3766

MSVC seems to require that the signature matches the upstream one exactly.

--
The fix here worked for mypyc. Not sure if there is a better one.
/CC @vstinner

--
Refs:

@vstinner
Copy link
Member

Hi, the CI was broken, I just fixed it. Would you mind to update your branch? For example, rebase it on top on the up to date main branch.

@vstinner vstinner merged commit 6d8c17a into python:main Oct 14, 2024
21 checks passed
@vstinner
Copy link
Member

Merged, thank you!

@cdce8p cdce8p deleted the fix-cp313-win branch October 14, 2024 19:57
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.

2 participants