getpath_noop link failure with MODULE_BUILDTYPE=static and _testinternalcapi
Open
@gpshead is already working on this.
Since Sep 8, 2026.
build
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
Minor issue when statically linking extension modules:
Programs/_freeze_module is linked with Modules/getpath_noop.o rather than Modules/getpath.o. With MODULE_BUILDTYPE=static, _testinternalcapi.o is part of LIBRARY_OBJS_OMIT_FROZEN and its get_getpath_codeobject() left _Py_Get_Getpath_CodeObject() as an undefined reference.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-157143
- gh-157148
- gh-157149
- gh-157150
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.