Since I have some python packages, which depend on dev-python/protobuf-python, I tried to keyword for python3_11, but apprently, compilation fails. x86_64-pc-linux-gnu-g++ -shared -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-O1 -Wl,--sort-common -Wl,-z,now -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe /var/tmp/portage/dev-python/protobuf-python-3.19.3-r2/work/protobuf-3.19.3/python-python3_11/temp.linux-x86_64-3.11/google/protobuf/internal/api_implementation.o -L/usr/lib64 -o /var/tmp/portage/dev-python/protobuf-python-3.19.3-r2/work/protobuf-3.19.3/python-python3_11/lib/google/protobuf/internal/_api_implementation.cpython-311-x86_64-linux-gnu.so google/protobuf/pyext/descriptor.cc: In function ‘bool google::protobuf::python::_CalledFromGeneratedFile(int)’: google/protobuf/pyext/descriptor.cc:102:18: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 102 | frame = frame->f_back; | ^~ In file included from /usr/include/python3.11/Python.h:42, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ google/protobuf/pyext/descriptor.cc:108:12: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 108 | if (frame->f_code->co_filename == NULL) { | ^~ In file included from /usr/include/python3.11/Python.h:42, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ In file included from /usr/include/python3.11/Python.h:44, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: google/protobuf/pyext/descriptor.cc:113:37: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 113 | if (PyString_AsStringAndSize(frame->f_code->co_filename, | ^~ /usr/include/python3.11/object.h:774:59: note: in definition of macro ‘PyType_FastSubclass’ 774 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag) | ^~~~ /usr/include/python3.11/object.h:107:28: note: in expansion of macro ‘_Py_CAST’ 107 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) | ^~~~~~~~ /usr/include/python3.11/object.h:136:31: note: in expansion of macro ‘_PyObject_CAST’ 136 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) | ^~~~~~~~~~~~~~ /usr/include/python3.11/unicodeobject.h:115:25: note: in expansion of macro ‘Py_TYPE’ 115 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) | ^~~~~~~ google/protobuf/pyext/descriptor.cc:54:4: note: in expansion of macro ‘PyUnicode_Check’ 54 | (PyUnicode_Check(ob) ? ((*(charpp) = const_cast<char*>( \ | ^~~~~~~~~~~~~~~ google/protobuf/pyext/descriptor.cc:113:7: note: in expansion of macro ‘PyString_AsStringAndSize’ 113 | if (PyString_AsStringAndSize(frame->f_code->co_filename, | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.11/Python.h:42, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ google/protobuf/pyext/descriptor.cc:113:37: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 113 | if (PyString_AsStringAndSize(frame->f_code->co_filename, | ^~ google/protobuf/pyext/descriptor.cc:55:56: note: in definition of macro ‘PyString_AsStringAndSize’ 55 | PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL \ | ^~ In file included from /usr/include/python3.11/Python.h:42, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ google/protobuf/pyext/descriptor.cc:113:37: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 113 | if (PyString_AsStringAndSize(frame->f_code->co_filename, | ^~ google/protobuf/pyext/descriptor.cc:58:50: note: in definition of macro ‘PyString_AsStringAndSize’ 58 | : PyBytes_AsStringAndSize(ob, (charpp), (sizep))) | ^~ In file included from /usr/include/python3.11/Python.h:42, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ google/protobuf/pyext/descriptor.cc:134:12: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 134 | if (frame->f_globals != frame->f_locals) { | ^~ In file included from /usr/include/python3.11/Python.h:42, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ google/protobuf/pyext/descriptor.cc:134:32: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 134 | if (frame->f_globals != frame->f_locals) { | ^~ In file included from /usr/include/python3.11/Python.h:42, from ./google/protobuf/pyext/descriptor.h:37, from google/protobuf/pyext/descriptor.cc:33: /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ error: command '/usr/bin/x86_64-pc-linux-gnu-gcc' failed with exit code 1 * ERROR: dev-python/protobuf-python-3.19.3-r2::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 127: Called src_compile * environment, line 3311: Called distutils-r1_src_compile * environment, line 1538: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile' * environment, line 677: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 2963: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 2544: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 2542: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 1019: Called distutils-r1_run_phase 'distutils-r1_python_compile' * environment, line 1523: Called distutils-r1_python_compile * environment, line 1316: Called esetup.py 'build' '-j' '9' * environment, line 2083: Called die * The specific snippet of code: * "${@}" || die -n; * * If you need support, post the output of `emerge --info '=dev-python/protobuf-python-3.19.3-r2::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-python/protobuf-python-3.19.3-r2::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-python/protobuf-python-3.19.3-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/protobuf-python-3.19.3-r2/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/protobuf-python-3.19.3-r2/work/protobuf-3.19.3/python' * S: '/var/tmp/portage/dev-python/protobuf-python-3.19.3-r2/work/protobuf-3.19.3/python'
ping
This is still an issue with 3.20.1.
Looks as upstream fix is on the way. https://github.com/protocolbuffers/protobuf/pull/10403
(In reply to jospezial from comment #3) > Looks as upstream fix is on the way. > https://github.com/protocolbuffers/protobuf/pull/10403 thanks!
commit 8929b050d9b094018f94ef597276c01a5626136a Author: Thibaud CANALE <thican@thican.net> Date: Wed Aug 17 02:35:05 2022 +0200 dev-python/protobuf-python: add 3.19.6, 3.20.3, 4.21.8 Signed-off-by: Thibaud CANALE <thican@thican.net> Signed-off-by: Sam James <sam@gentoo.org>
Big thank you sam!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35c5ad765e20f14e514f79b77d633a4c2e220d4d commit 35c5ad765e20f14e514f79b77d633a4c2e220d4d Author: Sam James <sam@gentoo.org> AuthorDate: 2022-10-25 23:02:41 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-25 23:02:47 +0000 dev-python/protobuf-python: fix Python 3.11 build Bug: https://bugs.gentoo.org/844184 Signed-off-by: Sam James <sam@gentoo.org> .../files/protobuf-python-4.21.8-python311.patch | 132 +++++++++++++++++++++ .../protobuf-python/protobuf-python-4.21.8.ebuild | 1 + 2 files changed, 133 insertions(+)
(In reply to Conrad Kostecki from comment #6) > Big thank you sam! :)