rspeer / wordfreq

Access a database of word frequencies, in various natural languages.
Other
1.41k stars 100 forks source link

Install fails #86

Closed lt20kmph closed 3 years ago

lt20kmph commented 3 years ago

I'm getting the following error when I try to install:

src/marisa_trie.cpp:17944:34: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
17944 |   __pyx_type_11marisa_trie__Trie.tp_print = 0;
      |                                  ^~~~~~~~
src/marisa_trie.cpp:17968:39: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
17968 |   __pyx_type_11marisa_trie_BinaryTrie.tp_print = 0;
      |                                       ^~~~~~~~
src/marisa_trie.cpp:17981:46: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
17981 |   __pyx_type_11marisa_trie__UnicodeKeyedTrie.tp_print = 0;
      |                                              ^~~~~~~~
src/marisa_trie.cpp:17995:33: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
17995 |   __pyx_type_11marisa_trie_Trie.tp_print = 0;
      |                                 ^~~~~~~~
src/marisa_trie.cpp:18014:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18014 |   __pyx_type_11marisa_trie_BytesTrie.tp_print = 0;
      |                                      ^~~~~~~~
src/marisa_trie.cpp:18039:40: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18039 |   __pyx_type_11marisa_trie__UnpackTrie.tp_print = 0;
      |                                        ^~~~~~~~
src/marisa_trie.cpp:18052:39: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18052 |   __pyx_type_11marisa_trie_RecordTrie.tp_print = 0;
      |                                       ^~~~~~~~
src/marisa_trie.cpp:18070:57: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18070 |   __pyx_type_11marisa_trie___pyx_scope_struct____init__.tp_print = 0;
      |                                                         ^~~~~~~~
src/marisa_trie.cpp:18076:57: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18076 |   __pyx_type_11marisa_trie___pyx_scope_struct_1_genexpr.tp_print = 0;
      |                                                         ^~~~~~~~
src/marisa_trie.cpp:18082:58: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18082 |   __pyx_type_11marisa_trie___pyx_scope_struct_2_iterkeys.tp_print = 0;
      |                                                          ^~~~~~~~
src/marisa_trie.cpp:18088:63: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18088 | __pyx_type_11marisa_trie___pyx_scope_struct_3_iter_prefixes.tp_print = 0
;
      |                                                             ^~~~~~~~

src/marisa_trie.cpp:18094:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18094 |   __pyx_type_11marisa_trie___pyx_scope_struct_4_iteritems.tp_print = 0;
      |                                                           ^~~~~~~~
src/marisa_trie.cpp:18100:63: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18100 | __pyx_type_11marisa_trie___pyx_scope_struct_5_iter_prefixes.tp_print = 0
;
      |                                                             ^~~~~~~~

src/marisa_trie.cpp:18106:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18106 |   __pyx_type_11marisa_trie___pyx_scope_struct_6_iteritems.tp_print = 0;
      |                                                           ^~~~~~~~
src/marisa_trie.cpp:18112:58: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18112 |   __pyx_type_11marisa_trie___pyx_scope_struct_7___init__.tp_print = 0;
      |                                                          ^~~~~~~~
src/marisa_trie.cpp:18118:57: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18118 |   __pyx_type_11marisa_trie___pyx_scope_struct_8_genexpr.tp_print = 0;
      |                                                         ^~~~~~~~
src/marisa_trie.cpp:18124:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18124 |   __pyx_type_11marisa_trie___pyx_scope_struct_9_iteritems.tp_print = 0;
      |                                                           ^~~~~~~~
src/marisa_trie.cpp:18130:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18130 |   __pyx_type_11marisa_trie___pyx_scope_struct_10_iterkeys.tp_print = 0;
      |                                                           ^~~~~~~~
src/marisa_trie.cpp:18136:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18136 |   __pyx_type_11marisa_trie___pyx_scope_struct_11___init__.tp_print = 0;
      |                                                           ^~~~~~~~
src/marisa_trie.cpp:18142:58: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18142 |   __pyx_type_11marisa_trie___pyx_scope_struct_12_genexpr.tp_print = 0;
      |                                                          ^~~~~~~~
src/marisa_trie.cpp:18148:60: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18148 |   __pyx_type_11marisa_trie___pyx_scope_struct_13_iteritems.tp_print = 0;
      |                                                            ^~~~~~~~
src/marisa_trie.cpp:18154:58: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} h
as no member named ‘tp_print’
18154 |   __pyx_type_11marisa_trie___pyx_scope_struct_14_genexpr.tp_print = 0;
      |                                                          ^~~~~~~~
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from src/marisa_trie.cpp:4:
src/marisa_trie.cpp: In function ‘int __Pyx_ParseOptionalKeywords(PyObject*, PyO
bject***, PyObject*, PyObject**, Py_ssize_t, const char*)’:
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  261 |       PyUnicode_WSTR_LENGTH(op) :                    \
      |       ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18940:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18940 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(ke
y)) ? 1 :
      |                      ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyU
nicode_AsUnicode(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  262 |       ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
      |                                                    ^
src/marisa_trie.cpp:18940:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18940 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(ke
y)) ? 1 :
      |                      ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  264 |        PyUnicode_WSTR_LENGTH(op)))
      |        ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18940:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18940 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(ke
y)) ? 1 :
      |                      ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  261 |       PyUnicode_WSTR_LENGTH(op) :                    \
      |       ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18940:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18940 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(ke
y)) ? 1 :
      |                                                    ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyU
nicode_AsUnicode(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  262 |       ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
      |                                                    ^
src/marisa_trie.cpp:18940:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18940 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(ke
y)) ? 1 :
      |                                                    ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  264 |        PyUnicode_WSTR_LENGTH(op)))
      |        ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18940:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18940 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(ke
y)) ? 1 :
      |                                                    ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  261 |       PyUnicode_WSTR_LENGTH(op) :                    \
      |       ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18956:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18956 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_
SIZE(key)) ? 1 :
      |                          ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyU
nicode_AsUnicode(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  262 |       ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
      |                                                    ^
src/marisa_trie.cpp:18956:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18956 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_
SIZE(key)) ? 1 :
      |                          ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  264 |        PyUnicode_WSTR_LENGTH(op)))
      |        ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18956:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18956 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_
SIZE(key)) ? 1 :
      |                          ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  261 |       PyUnicode_WSTR_LENGTH(op) :                    \
      |       ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18956:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18956 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_
SIZE(key)) ? 1 :
      |                                                           ^~~~~~~~~~~~~~
~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyU
nicode_AsUnicode(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  262 |       ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
      |                                                    ^
src/marisa_trie.cpp:18956:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18956 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_
SIZE(key)) ? 1 :
      |                                                           ^~~~~~~~~~~~~~
~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyU
nicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
  451 | ine PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
      |                                                                       ^

/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macr
o ‘PyUnicode_WSTR_LENGTH’
  264 |        PyUnicode_WSTR_LENGTH(op)))
      |        ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp:18956:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
18956 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_
SIZE(key)) ? 1 :
      |                                                           ^~~~~~~~~~~~~~
~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp: In function ‘PyObject* __Pyx_PyUnicode_Substring(PyObject*,
 Py_ssize_t, Py_ssize_t)’:
src/marisa_trie.cpp:20109:45: warning: ‘PyObject* PyUnicode_FromUnicode(const Py
_UNICODE*, Py_ssize_t)’ is deprecated [-Wdeprecated-declarations]
20109 |         return PyUnicode_FromUnicode(NULL, 0);
      |                                             ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from src/marisa_trie.cpp:4:
/usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
  551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      |                                          ^~~~~~~~~~~~~~~~~~~~~
src/marisa_trie.cpp: In function ‘PyObject* __Pyx_decode_c_string(const char*, P
y_ssize_t, Py_ssize_t, const char*, const char*, PyObject* (*)(const char*, Py_s
size_t, const char*))’:
src/marisa_trie.cpp:20142:45: warning: ‘PyObject* PyUnicode_FromUnicode(const Py
_UNICODE*, Py_ssize_t)’ is deprecated [-Wdeprecated-declarations]
20142 |         return PyUnicode_FromUnicode(NULL, 0);
      |                                             ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from src/marisa_trie.cpp:4:
/usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
  551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      |                                          ^~~~~~~~~~~~~~~~~~~~~
error: Setup script exited with error: command '/usr/bin/gcc' failed with exit c
ode 1
rspeer commented 3 years ago

This is currently fixed by an update to langcodes to use marisa-trie-m, which now builds on Python 3.9. I'm also working on further reworking the dependencies, because wordfreq doesn't need the trie functionality at all.

rspeer commented 3 years ago

wordfreq 2.4.2 has the reworked dependencies, so installation should be much smoother now.