Skip to content

gh-162243: Fix shared-memory library detection with LIBS - #162244

Open
computerquip-work wants to merge 1 commit into
python:mainfrom
computerquip-work:upstream/posixshmem-libs
Open

computerquip-work wants to merge 1 commit into
python:mainfrom
computerquip-work:upstream/posixshmem-libs

Conversation

@computerquip-work

@computerquip-work computerquip-work commented Nov 18, 2026 •

Copy link
Copy Markdown

Fixes #162243.

When LIBS already contains -lrt, the shm_open check succeeds without recording -lrt for _posixshmem. Clear LIBS just for that check so the module gets its own required link flag, following the curses fix in #156130.

The module fails to import before the fix and shared-memory operations work afterward. The full test suite passes, and configure was regenerated with CPython's pinned Autoconf image.

An existing -lrt in LIBS lets the shm_open probe succeed without recording
librt for _posixshmem. The module is linked separately without LIBS, so its
required library is missing on systems where libc does not provide it.

Clear LIBS within the saved probe environment to determine the module's
own requirements, following the curses fix in pythonGH-156130. The actual module
fails to import before the fix and shared-memory operations pass afterward.
The full test suite passes, and configure is regenerated with the pinned
Autoconf image.
@python-cla-bot

python-cla-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuring with LIBS=-lrt leaves _posixshmem without -lrt

1 participant