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
Building Programs/_freeze_module sometimes fails with missing symbols, like undefined reference to PyErr_CheckSignals #161364
Sometimes, when I build Python incrementally (build Python with make, modify C code, run make again), the build fails with errors such as:
gcc -o Programs/_freeze_module Programs/_freeze_module.o Modules/getpath_noop.o (...) Modules/gcmodule.o -ldl -lm
/usr/bin/ld.bfd: Parser/myreadline.o: in function `my_fgets':
/home/vstinner/python/main/Parser/myreadline.c:105:(.text+0x64): undefined reference to `PyErr_CheckSignals'
The PyErr_CheckSignals() function is implemented by Modules/signalmodule.c, but it seems like Modules/signalmodule.o is not used to build Programs/_freeze_module program.
Activity
vstinner commentedon Nov 4, 2026
I removed all generated files and I built Python from scratch:
It fixed the issue: BOOTSTRAP_MODOBJS now contains
Modules/signalmodule.o.The question is why/how
BOOTSTRAP_MODOBJScan become empty sometimes.BOOTSTRAP_MODOBJS variable:
vstinner commentedon Nov 5, 2026
Example of the issue on FreeBSD. I updated my Git checkout and ran make, but then the BOOTSTRAP_MODOBJS variable was empty.
If I modify
Makefile.pre.in,makerebuildsMakefileand this time, it generates properly the BOOTSTRAP_MODOBJS variable: