HearthSim / decrunch

Python wrapper around Crunch DXTc decompressor
https://hearthsim.info
zlib License
14 stars 23 forks source link

‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ on Ubuntu 21.04 #22

Open iebb opened 3 years ago

iebb commented 3 years ago

decrunch.cpp: In function ‘int Pyx_modinit_type_init_code()’: decrunch.cpp:3372:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 3372 | pyx_type_8decrunch_UnpackContext.tp_print = 0;

System: Ubuntu 21.04 (GNU/Linux 5.11.0-16-generic x86_64)

iebb commented 3 years ago

installing from source using Cython works, while pip failed.

lauhayden commented 3 years ago

Root of the problem is that python3.9 removed tp_print, causing the pre-generated decrunch.cpp in the PyPI release to not compile. Installing from source using Cython works because the newer versions of Cython don't emit C++ sources that use tp_print.

See also: https://stackoverflow.com/questions/65462530/pyclipper-installation-error-tp-print-is-not-a-member-of-typeobject