◐ Shell
clean mode source ↗

fix: linking error building `_testcapi` in Python 3.12 #434 by Andrej730 · Pull Request #435 · python-cmake-buildsystem/python-cmake-buildsystem

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@Andrej730

@Andrej730 Andrej730 commented

Dec 6, 2025

edited

Loading

Copy link Copy Markdown

Resolves #434.

In 3.12 _testcapi now had a file with Py_LIMITED_API so it was requiring python3.lib to link.

https://github.com/python/cpython/blob/3.12/Modules/_testcapi/heaptype_relative.c

Though issue is resolved, it might be still worth investigating why CI didn't catched that error.

@jcfr

@Andrej730 Andrej730 force-pushed the fix-linking-_testcapi branch from 777576c to 31e8fa1 Compare

December 6, 2025 16:47

@Andrej730

Copy link Copy Markdown

Author

image

Error seems unrelated to the change. I've force pushed the branch with the same commit and now 3.9.22 failed, though previously 3.8.20 was failing.

@Andrej730 Andrej730 force-pushed the fix-linking-_testcapi branch from 31e8fa1 to 1f6a6a7 Compare

April 8, 2026 20:35

@Andrej730

Copy link Copy Markdown

Author

@jcfr can you please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Linking error building with BUILD_LIBPYTHON_SHARED=ON - cannot open file 'python3.lib'

1 participant

@Andrej730