Bug 2359499 - python-greenlet fails to build with Python 3.14: src/greenlet/TGreenlet.cpp:626:29: error: aggregate ‘_PyInterpreterFrame iframe_copy’ has incomplete type and cannot be defined - and more
Summary: python-greenlet fails to build with Python 3.14: src/greenlet/TGreenlet.cpp:6...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-greenlet
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14 2350336
TreeView+ depends on / blocked
 
Reported: 2025-04-14 13:20 UTC by Karolina Surma
Modified: 2025-04-24 03:24 UTC (History)
7 users (show)

Fixed In Version: python-greenlet-3.1.1-3.fc43
Clone Of:
Environment:
Last Closed: 2025-04-24 03:24:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-greenlet pull-request 18 0 None None None 2025-04-15 12:58:12 UTC
Github python-greenlet greenlet pull 442 0 None Merged Add initial support for Python 3.14a7. 2025-04-15 11:47:30 UTC

Description Karolina Surma 2025-04-14 13:20:36 UTC
python-greenlet fails to build with Python 3.14.0a7.

  g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/include/python3.14 -c src/greenlet/greenlet.cpp -o build/temp.linux-x86_64-cpython-314/src/greenlet/greenlet.o
  In file included from src/greenlet/greenlet.cpp:31:
  src/greenlet/TGreenlet.cpp: In member function ‘void greenlet::Greenlet::expose_frames()’:
  src/greenlet/TGreenlet.cpp:626:29: error: aggregate ‘_PyInterpreterFrame iframe_copy’ has incomplete type and cannot be defined
    626 |         _PyInterpreterFrame iframe_copy;
        |                             ^~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:627:65: error: invalid application of ‘sizeof’ to incomplete type ‘_PyInterpreterFrame’
    627 |         this->stack_state.copy_from_stack(&iframe_copy, iframe, sizeof(*iframe));
        |                                                                 ^~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:628:14: error: ‘_PyFrame_IsIncomplete’ was not declared in this scope
    628 |         if (!_PyFrame_IsIncomplete(&iframe_copy)) {
        |              ^~~~~~~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.14/Python.h:19,
                   from src/greenlet/greenlet.cpp:16:
  src/greenlet/TGreenlet.cpp:635:41: error: ‘FRAME_OWNED_BY_CSTACK’ was not declared in this scope
    635 |             assert(iframe_copy.owner != FRAME_OWNED_BY_CSTACK);
        |                                         ^~~~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:654:24: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    654 |             if (!iframe->frame_obj) {
        |                        ^~
  In file included from /usr/include/python3.14/pyframe.h:19,
                   from /usr/include/python3.14/Python.h:104:
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:656:37: error: aggregate ‘_PyInterpreterFrame dummy_iframe’ has incomplete type and cannot be defined
    656 |                 _PyInterpreterFrame dummy_iframe;
        |                                     ^~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:661:38: error: ‘FRAME_OWNED_BY_GENERATOR’ was not declared in this scope
    661 |                 dummy_iframe.owner = FRAME_OWNED_BY_GENERATOR;
        |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:667:30: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    667 |                 assert(iframe->frame_obj);
        |                              ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:682:26: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    682 |             assert(iframe->owner == FRAME_OWNED_BY_THREAD
        |                          ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:682:37: error: ‘FRAME_OWNED_BY_THREAD’ was not declared in this scope
    682 |             assert(iframe->owner == FRAME_OWNED_BY_THREAD
        |                                     ^~~~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:683:29: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    683 |                    || iframe->owner == FRAME_OWNED_BY_GENERATOR);
        |                             ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:683:40: error: ‘FRAME_OWNED_BY_GENERATOR’ was not declared in this scope
    683 |                    || iframe->owner == FRAME_OWNED_BY_GENERATOR);
        |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:685:44: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    685 |                 assert(last_complete_iframe->frame_obj);
        |                                            ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:686:45: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    686 |                 memcpy(&last_complete_iframe->frame_obj->_f_frame_data[0],
        |                                             ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:687:45: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    687 |                        &last_complete_iframe->previous, sizeof(void *));
        |                                             ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:688:37: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    688 |                 last_complete_iframe->previous = iframe;
        |                                     ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:704:36: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    704 |         assert(last_complete_iframe->frame_obj);
        |                                    ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:705:37: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    705 |         memcpy(&last_complete_iframe->frame_obj->_f_frame_data[0],
        |                                     ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:706:37: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    706 |                &last_complete_iframe->previous, sizeof(void *));
        |                                     ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TGreenlet.cpp:707:29: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    707 |         last_complete_iframe->previous = nullptr;
        |                             ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  In file included from src/greenlet/greenlet.cpp:36:
  src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::unexpose_frames()’:
  src/greenlet/TPythonState.cpp:179:51: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    179 |         _PyInterpreterFrame *prev_exposed = iframe->previous;
        |                                                   ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TPythonState.cpp:180:22: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    180 |         assert(iframe->frame_obj);
        |                      ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TPythonState.cpp:181:23: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    181 |         memcpy(&iframe->previous, &iframe->frame_obj->_f_frame_data[0],
        |                       ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~
  src/greenlet/TPythonState.cpp:181:42: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
    181 |         memcpy(&iframe->previous, &iframe->frame_obj->_f_frame_data[0],
        |                                          ^~
  /usr/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
     25 | struct _PyInterpreterFrame;
        |        ^~~~~~~~~~~~~~~~~~~

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08899319-python-greenlet/

For all our attempts to build python-greenlet with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-greenlet/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 2 Fedora Update System 2025-04-24 00:23:35 UTC
FEDORA-2025-17a3d488c8 (python-greenlet-3.1.1-3.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-17a3d488c8

Comment 3 Fedora Update System 2025-04-24 03:24:58 UTC
FEDORA-2025-17a3d488c8 (python-greenlet-3.1.1-3.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.