dlib fails to build with Python 3.11.0a4. /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h: In function ‘std::string pybind11::detail::error_string()’: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:441:38: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 441 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:441:75: error: expected primary-expression before ‘>’ token 441 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:441:77: error: expected primary-expression before ‘)’ token 441 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:443:31: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 443 | handle(frame->f_code->co_name).cast<std::string>() + "\n"; | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:443:64: error: expected primary-expression before ‘>’ token 443 | handle(frame->f_code->co_name).cast<std::string>() + "\n"; | ^ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:443:66: error: expected primary-expression before ‘)’ token 443 | handle(frame->f_code->co_name).cast<std::string>() + "\n"; | ^ In file included from /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:16, from /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/attr.h:13, from /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:43, from /builddir/build/BUILD/dlib-19.23/dlib/../dlib/python/pybind_utils.h:6, from /builddir/build/BUILD/dlib-19.23/dlib/../dlib/python.h:6, from /builddir/build/BUILD/dlib-19.23/tools/python/src/opaque_types.h:6, from /builddir/build/BUILD/dlib-19.23/tools/python/src/matrix.cpp:4: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/detail/internals.h:194:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations] 194 | PyEval_InitThreads(); | ~~~~~~~~~~~~~~~~~~^~ In file included from /usr/include/python3.11/Python.h:93, from /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/detail/common.h:112, from /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pytypes.h:12, from /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:13: /usr/include/python3.11/ceval.h:132:37: note: declared here 132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void); | ^~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::get_type_overload(const void*, const detail::type_info*, const char*)’: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1890:49: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’? 1890 | PyFrameObject *frame = PyThreadState_Get()->frame; | ^~~~~ | cframe /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1891:43: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 1891 | if (frame && (std::string) str(frame->f_code->co_name) == name && | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1892:16: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 1892 | frame->f_code->co_argcount > 0) { | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1895:20: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_locals’ 1895 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0)); | ^~~~~~~~ In file included from /usr/include/python3.11/tupleobject.h:39, from /usr/include/python3.11/Python.h:57: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1895:54: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 1895 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0)); | ^~~~~~ /usr/include/python3.11/cpython/tupleobject.h:19:73: note: in definition of macro ‘_PyTuple_CAST’ 19 | #define _PyTuple_CAST(op) (assert(PyTuple_Check(op)), (PyTupleObject *)(op)) | ^~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1895:30: note: in expansion of macro ‘PyTuple_GET_ITEM’ 1895 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0)); | ^~~~~~~~~~~~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h: In function ‘std::string pybind11::detail::error_string()’: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:441:38: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 441 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:441:75: error: expected primary-expression before ‘>’ token 441 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:441:77: error: expected primary-expression before ‘)’ token 441 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:443:31: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 443 | handle(frame->f_code->co_name).cast<std::string>() + "\n"; | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:443:64: error: expected primary-expression before ‘>’ token 443 | handle(frame->f_code->co_name).cast<std::string>() + "\n"; | ^ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/cast.h:443:66: error: expected primary-expression before ‘)’ token 443 | handle(frame->f_code->co_name).cast<std::string>() + "\n"; | ^ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::get_type_overload(const void*, const detail::type_info*, const char*)’: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1890:49: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’? 1890 | PyFrameObject *frame = PyThreadState_Get()->frame; | ^~~~~ | cframe /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1891:43: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 1891 | if (frame && (std::string) str(frame->f_code->co_name) == name && | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1892:16: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 1892 | frame->f_code->co_argcount > 0) { | ^~~~~~ /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1895:20: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_locals’ 1895 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0)); | ^~~~~~~~ In file included from /usr/include/python3.11/tupleobject.h:39, from /usr/include/python3.11/Python.h:57: /builddir/build/BUILD/dlib-19.23/dlib/external/pybind11/include/pybind11/pybind11.h:1895:54: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_code’ 1895 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0)); | ^~~~~~ Changes of the private PyFrameObject structure members. While the documentation notes that the fields of PyFrameObject are subject to change at any time, they have been stable for a long time and were used in several popular extensions. In Python 3.11, the frame struct was reorganized to allow performance optimizations. Rather than reading the fields directly, extensions should use functions: f_code: removed, use PyFrame_GetCode() instead. Warning: the function returns a strong reference, need to call Py_DECREF(). f_back: changed (see below), use PyFrame_GetBack(). f_builtins: removed, use PyObject_GetAttrString(frame, "f_builtins"). f_globals: removed, use PyObject_GetAttrString(frame, "f_globals"). f_locals: removed, use PyObject_GetAttrString(frame, "f_locals"). f_lasti: removed, use PyObject_GetAttrString(frame, "f_lasti"). The following fields were removed entirely, as they were details of the old implementation: f_valuesstack f_stackdepth f_gen f_iblock f_state f_blockstack f_localsplus The Python frame object is now created lazily. A side effect is that the f_back member must not be accessed directly, since its value is now also computed lazily. The PyFrame_GetBack() function must be called instead. https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03270596-dlib/ For all our attempts to build dlib with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/dlib/ 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.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. 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.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
FEDORA-2022-9cf243c869 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9cf243c869
FEDORA-2022-216876ff34 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-216876ff34
FEDORA-2022-ea138b11d8 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-ea138b11d8
FEDORA-2022-ea138b11d8 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-ea138b11d8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-ea138b11d8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-9cf243c869 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-9cf243c869` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9cf243c869 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-216876ff34 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-216876ff34` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-216876ff34 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-216876ff34 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-ea138b11d8 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-9cf243c869 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.