You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configuring with LIBS=-lrt leaves _posixshmem without -lrt #162243
Building Python with LIBS=-lrt leaves _posixshmem without -lrt in its link flags. I think this is meant to work, since the documentation lists -lrt as an example.
The check for shm_open succeeds because it already has -lrt from LIBS, so configure decides it doesn’t need to add anything. That works for the check, but _posixshmem is linked separately and doesn’t use LIBS. It still needs -lrt in its own link flags.
This reproduces on Linux systems where shared-memory functions need librt:
cpython_src="$PWD"
mkdir -p build/shmem-repro
cd build/shmem-repro
MODULE__POSIXSHMEM_LDFLAGS is empty. The build reports undefined symbol: shm_unlink, and the import fails with ModuleNotFoundError for _posixshmem. I’d expect configure to give the module -lrt so it can load.
Clearing LIBS for this check gets configure to record -lrt for the module. LIBS is restored afterward. This looks similar to the curses detection problem fixed in PR #156130.
Activity