This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Build fails when threads are disabled during configure step
Type: compile error Stage: resolved
Components: Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Jeffrey.Armstrong, python-dev
Priority: normal Keywords: patch

Created on 2015-04-06 12:48 by Jeffrey.Armstrong, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pylifecycle-threads-3.5.0a3.patch Jeffrey.Armstrong, 2015-04-06 12:48 Simple patch to check if WITH_THREADS is defined
Messages (3)
msg240154 - (view) Author: Jeffrey Armstrong (Jeffrey.Armstrong) * Date: 2015-04-06 12:48
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.
msg240155 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-04-06 13:59
New changeset 29f51c4ae11a by Benjamin Peterson in branch 'default':
fix building without threads (closes #23877)
https://hg.python.org/cpython/rev/29f51c4ae11a
msg240167 - (view) Author: Jeffrey Armstrong (Jeffrey.Armstrong) * Date: 2015-04-06 17:39
Oops, I meant WITH_THREAD.  Thanks for the quick fix!
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68065
2015-04-06 17:39:22Jeffrey.Armstrongsetmessages: + msg240167
2015-04-06 13:59:32python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg240155

resolution: fixed
stage: resolved
2015-04-06 12:48:51Jeffrey.Armstrongcreate