Issue 23877: Build fails when threads are disabled during configure step (original) (raw)
If threads are disabled, either via --disable-threads or using a compiler/standard library that doesn't support threads, the build will fail when linking the Python interpreter because the following is undefined:
PyGILState_GetThisThreadState
The error is caused by a change since 3.5.0a1 that uses a call to this function in Python/pylifecycle.c:1303 without first checking if the WITH_THREADS macro is defined. If WITH_THREADS is undefined, the function PyGILState_GetThisThreadState is not built.
I've attached a simple patch correcting the issue, but it should be trivial to add a simple macro check around the call.