Source: python-greenlet
Version: 3.0.1-3
Tags: upstream patch
Severity: normal
User: debian-pyt...@lists.debian.org
Usertags: python3.13
Forwarded: https://github.com/python-greenlet/greenlet/issues/392

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html

Log snippet:

creating build/temp.linux-aarch64-cpython-313/<<PKGBUILDDIR>>/src/greenlet
aarch64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -mbranch-protection=standard -Wdate-time 
-D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.13 -c 
/<<PKGBUILDDIR>>/src/greenlet/greenlet.cpp -o 
build/temp.linux-aarch64-cpython-313/<<PKGBUILDDIR>>/src/greenlet/greenlet.o
In file included from /<<PKGBUILDDIR>>/src/greenlet/greenlet_greenlet.hpp:26,
                 from /<<PKGBUILDDIR>>/src/greenlet/greenlet_internal.hpp:20,
                 from /<<PKGBUILDDIR>>/src/greenlet/greenlet.cpp:19:
/usr/include/python3.13/internal/pycore_frame.h:8:4: error: #error "this header 
requires Py_BUILD_CORE define"
    8 | #  error "this header requires Py_BUILD_CORE define"
      |    ^~~~~
In file included from /usr/include/python3.13/internal/pycore_frame.h:13:
/usr/include/python3.13/internal/pycore_code.h:8:4: error: #error "this header 
requires Py_BUILD_CORE define"
    8 | #  error "this header requires Py_BUILD_CORE define"
      |    ^~~~~
In file included from /usr/include/python3.13/internal/pycore_code.h:11:
/usr/include/python3.13/internal/pycore_lock.h:13:4: error: #error "this header 
requires Py_BUILD_CORE define"
   13 | #  error "this header requires Py_BUILD_CORE define"
      |    ^~~~~
In file included from /usr/include/python3.13/internal/pycore_code.h:12:
/usr/include/python3.13/internal/pycore_backoff.h:9:4: error: #error "this 
header requires Py_BUILD_CORE define"
    9 | #  error "this header requires Py_BUILD_CORE define"
      |    ^~~~~
/<<PKGBUILDDIR>>/src/greenlet/greenlet_greenlet.hpp:104:9: error: ‘_PyCFrame’ 
does not name a type; did you mean ‘_frame’?
  104 |         _PyCFrame* cframe;
      |         ^~~~~~~~~
      |         _frame
/<<PKGBUILDDIR>>/src/greenlet/greenlet_greenlet.hpp:138:29: error: ‘_PyCFrame’ 
has not been declared
  138 |         void set_new_cframe(_PyCFrame& frame) noexcept;
      |                             ^~~~~~~~~
In file included from /<<PKGBUILDDIR>>/src/greenlet/greenlet.cpp:33:
/<<PKGBUILDDIR>>/src/greenlet/TUserGreenlet.cpp: In member function ‘virtual 
greenlet::Greenlet::switchstack_result_t 
greenlet::UserGreenlet::g_initialstub(void*)’:
/<<PKGBUILDDIR>>/src/greenlet/TUserGreenlet.cpp:280:5: error: ‘_PyCFrame’ was 
not declared in this scope; did you mean ‘_frame’?
  280 |     _PyCFrame trace_info;
      |     ^~~~~~~~~
      |     _frame
/<<PKGBUILDDIR>>/src/greenlet/TUserGreenlet.cpp:282:39: error: ‘trace_info’ was 
not declared in this scope
  282 |     this->python_state.set_new_cframe(trace_info);
      |                                       ^~~~~~~~~~
In file included from /<<PKGBUILDDIR>>/src/greenlet/greenlet.cpp:36:
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp: In constructor 
‘greenlet::PythonState::PythonState()’:
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:12:6: error: class 
‘greenlet::PythonState’ does not have any field named ‘cframe’
   12 |     ,cframe(nullptr)
      |      ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:82:11: error: ‘class 
greenlet::PythonState’ has no member named ‘cframe’
   82 |     this->cframe = &PyThreadState_GET()->root_cframe;
      |           ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:82:42: error: ‘PyThreadState’ 
{aka ‘struct _ts’} has no member named ‘root_cframe’
   82 |     this->cframe = &PyThreadState_GET()->root_cframe;
      |                                          ^~~~~~~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp: In member function ‘void 
greenlet::PythonState::operator<<(const PyThreadState*)’:
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:128:11: error: ‘class 
greenlet::PythonState’ has no member named ‘cframe’
  128 |     this->cframe = tstate->cframe;
      |           ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:128:28: error: ‘const 
PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
  128 |     this->cframe = tstate->cframe;
      |                            ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:136:31: error: 
‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean 
‘Py_C_RECURSION_LIMIT’?
  136 |     this->c_recursion_depth = C_RECURSION_LIMIT - 
tstate->c_recursion_remaining;
      |                               ^~~~~~~~~~~~~~~~~
      |                               Py_C_RECURSION_LIMIT
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:140:35: error: ‘const 
PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
  140 |     this->current_frame = tstate->cframe->current_frame;
      |                                   ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:156:42: error: ‘const 
PyThreadState’ {aka ‘const struct _ts’} has no member named ‘trash’
  156 |     this->trash_delete_nesting = tstate->trash.delete_nesting;
      |                                          ^~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp: In member function ‘void 
greenlet::PythonState::operator>>(PyThreadState*)’:
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:175:13: error: ‘PyThreadState’ 
{aka ‘struct _ts’} has no member named ‘cframe’
  175 |     tstate->cframe = this->cframe;
      |             ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:175:28: error: ‘class 
greenlet::PythonState’ has no member named ‘cframe’
  175 |     tstate->cframe = this->cframe;
      |                            ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:189:37: error: 
‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean 
‘Py_C_RECURSION_LIMIT’?
  189 |     tstate->c_recursion_remaining = C_RECURSION_LIMIT - 
this->c_recursion_depth;
      |                                     ^~~~~~~~~~~~~~~~~
      |                                     Py_C_RECURSION_LIMIT
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:200:13: error: ‘PyThreadState’ 
{aka ‘struct _ts’} has no member named ‘cframe’
  200 |     tstate->cframe->current_frame = this->current_frame;
      |             ^~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:206:13: error: ‘PyThreadState’ 
{aka ‘struct _ts’} has no member named ‘trash’
  206 |     tstate->trash.delete_nesting = this->trash_delete_nesting;
      |             ^~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp: At global scope:
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:266:6: error: variable or field 
‘set_new_cframe’ declared void
  266 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
      |      ^~~~~~~~~~~
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:266:34: error: ‘_PyCFrame’ was 
not declared in this scope; did you mean ‘_frame’?
  266 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
      |                                  ^~~~~~~~~
      |                                  _frame
/<<PKGBUILDDIR>>/src/greenlet/TPythonState.cpp:266:45: error: ‘frame’ was not 
declared in this scope; did you mean ‘_frame’?
  266 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
      |                                             ^~~~~
      |                                             _frame
/<<PKGBUILDDIR>>/src/greenlet/greenlet.cpp: In function ‘PyObject* 
mod_get_tstate_trash_delete_nesting(PyObject*)’:
/<<PKGBUILDDIR>>/src/greenlet/greenlet.cpp:1340:36: error: ‘PyThreadState’ {aka 
‘struct _ts’} has no member named ‘trash’
 1340 |     return PyLong_FromLong(tstate->trash.delete_nesting);
      |                                    ^~~~~
error: command '/usr/bin/aarch64-linux-gnu-g++' failed with exit code 1
E: pybuild pybuild:389: build: plugin distutils failed with: exit code=1: 
/usr/bin/python3.13 setup.py build 

If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/705520/

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

Reply via email to