AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.47k stars 294 forks source link

Build breaks with Python-3.11: error: member access into incomplete type 'PyFrameObject' #1759

Open yurivict opened 5 months ago

yurivict commented 5 months ago

Required:


[x] I believe this isn't a duplicate topic
[x] This report is not related to an adapter

Select One:

[x] Build problem
[ ] Incorrect Functionality or bug
[ ] New feature or functionality

Description

In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/py-opentimelineio/opentimelineio-bindings/otio_imath.cpp:4:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/pybind11.h:13:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/attr.h:13:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/cast.h:16:
/wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/detail/type_caster_base.h:482:26: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
            frame = frame->f_back;
                         ^
/usr/local/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
               ^
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/py-opentimelineio/opentimelineio-bindings/otio_errorStatusHandler.cpp:4:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/py-opentimelineio/opentimelineio-bindings/otio_errorStatusHandler.h:6:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/pybind11.h:13:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/attr.h:13:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/cast.h:16:
/wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/detail/type_caster_base.h:482:26: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
            frame = frame->f_back;
                         ^
/usr/local/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
               ^
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/py-opentimelineio/opentimelineio-bindings/otio_anyVector.cpp:4:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/pybind11.h:13:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/attr.h:13:
In file included from /wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/cast.h:16:
/wrkdirs/usr/ports/multimedia/py-opentimelineio/work-py311/OpenTimelineIO-0.16.0/src/deps/pybind11/include/pybind11/detail/type_caster_base.h:482:26: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
            frame = frame->f_back;
                         ^
/usr/local/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
               ^

Optional


Environment

Operating System: FreeBSD 14.0 Python version if appropriate: 3.11

Reproduction Steps

Regular build.

Log output if appropriate

https://pkg-status.freebsd.org/beefy22/data/140amd64-default/28444692ea26/logs/py311-opentimelineio-0.16.0.log

yurivict commented 3 months ago

@semagnum @reinecke

Hello,

Do you know why does the Python binding breaks with Python-3.11?

Thank you, Yuri

meshula commented 3 months ago

If you go into src/deps/pybind11, and git pull to the latest pybind11, does the problem resolve? Our copy of pybind11 is over a year old, and I wonder if there are fixes that we need.

yurivict commented 3 months ago

The build succeeds with the latest pybind11 release. Why don't you just add it to the "required" set?

meshula commented 3 months ago

Thanks for investigating. We should bump it. A blocker is that the CI is currently failing so we'll need to take a look at that. Something is attempting to invoke a 32 bit msvc toolchain.

https://github.com/AcademySoftwareFoundation/OpenTimelineIO/actions/runs/10033325821/job/27726400320?pr=1785

darbyjohnston commented 3 months ago

Do we support 32-bits? It looks like that action is trying to build for both x64 and x86:

cibuildwheel version 2.16.5

Build options:
  platform: windows
  architectures: AMD64, x86

Doing a quick search, it looks like the docs say it tries to build both arches by default on Windows: https://cibuildwheel.pypa.io/en/stable/options/#archs