New submission from patrik <[email protected]>:
Compiling python 3.6.8 configured with --without-threads (no other options)
fails, with undefined references to PyGILState_GetThisThreadState in
pylifecycle.c, and PyGILState_Ensure and PyGILState_Release in object.c.
I used Louis' fix from issue #24784 in pylifecycle.c, and placed #ifdef
WITH_THREADS around the undefined calls in object.c (both in _PyObject_dump).
With this, compiling works.
Installing then fails because Lib/threading.py attempts to import _thread,
which is not available. This can be fixed by replacing the import with the
pattern described in _dummy_thread:
try:
import _thread
except ImportError:
import _dummy_thread as _thread
import _thread happens in two places in threading.py (the second is "from
_thread import stack_size"); both have to be rewritten as above.
There is also an unguarded import _thread in telnetlib, but it's inside a
method def (mt_interact in class Telnet) so perhaps it does not cause
installation to fail.
----------
components: Build
messages: 339009
nosy: patrik
priority: normal
severity: normal
status: open
title: Compile errors --without-threads
type: compile error
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36458>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com