python / python/cpython

getpath_noop link failure with MODULE_BUILDTYPE=static and _testinternalcapi

Open
#157,142 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.