← 返回首页
fix: linking error building `_testcapi` in Python 3.12 #434 by Andrej730 · Pull Request #435 · python-cmake-buildsystem/python-cmake-buildsystem · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

fix: linking error building _testcapi in Python 3.12 #434#435

Open
Andrej730 wants to merge 3 commits into
python-cmake-buildsystem:masterfrom
Andrej730:fix-linking-_testcapi
Open

fix: linking error building _testcapi in Python 3.12 #434#435
Andrej730 wants to merge 3 commits into
python-cmake-buildsystem:masterfrom
Andrej730:fix-linking-_testcapi

Conversation

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 force-pushed the fix-linking-_testcapi branch from 777576c to 31e8fa1 Compare December 6, 2025 16:47

Copy link
Copy Markdown
Author

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 force-pushed the fix-linking-_testcapi branch from 31e8fa1 to 1f6a6a7 Compare April 8, 2026 20:35

Copy link
Copy Markdown
Author

@jcfr can you please take a look?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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

Footer

© 2026 GitHub, Inc.