davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
197 stars 58 forks source link

gcc-python-plugin doesn't build with GCC 10 #181

Open doko42 opened 4 years ago

doko42 commented 4 years ago

gcc-python-plugin doesn't build with GCC 10, first error is to include the params.h file, removed in GCC 10.

davidmalcolm commented 3 years ago

Possibly fixed by b6cb6bbf181ba91960208f7a7e911315c8d9ba97.

I'm now seeing "TypeError: 'gcc.WrapperMeta' object is not iterable" with Python 3.8 and GCC 10. My current hunch is that it's an issue with Python 3.8's typeobject change (tp_vectorcall_offset), but that's a hunch right now.

nzinfo commented 2 years ago

The error "TypeError: 'gcc.WrapperMeta' object is not iterable" is caused by generate-gimple-c.py with the tp_flag Py_TPFLAGS_DEFAULT in series of generated classes pytype = PyGccWrapperTypeObject(identifier = 'PyGcc%s_TypeObj' . When changes it to Py_TPFLAGS_BASETYPE . The error will disappear, although this will lead to a crash. The reason is clear, in py38 some logic changed in PyType_Ready function.

jmikedupont2 commented 2 years ago

My solution was to strip out the entire metaclass #192 It seems there is another patch possible #188