Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip installing issue #55

Closed
sguysc opened this issue Jun 16, 2022 · 9 comments
Closed

pip installing issue #55

sguysc opened this issue Jun 16, 2022 · 9 comments

Comments

@sguysc
Copy link

sguysc commented Jun 16, 2022

On ubuntu 20.04, Python3.10 (under miniconda), I cannot install using pip install. This is the error I get:

Collecting pycddlib
  Using cached pycddlib-2.1.6.tar.gz (159 kB)
  Preparing metadata (setup.py) ... �[?25ldone
uilding wheels for collected packages: pycddlib
  Building wheel for pycddlib (setup.py) ... �[?25lerror
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [184 lines of output]
      running bdist_wheel
      running build
      running build_ext
      cythoning cdd.pyx to cdd.c
      building 'cdd' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/cddlib
      creating build/temp.linux-x86_64-cpython-310/cddlib/lib-src
      gcc -pthread -B /home/userrrr/miniconda3/envs/spyder-env/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -DGMPRATIONAL -Icddlib/lib-src -I/home/userrrr/miniconda3/envs/spyder-env/include/python3.10 -c cdd.c -o build/temp.linux-x86_64-cpython-310/cdd.o
      cdd.c: In function ‘__pyx_f_3cdd_libc_stdio_tmpfile’:
      cdd.c:2425:3: warning: label ‘__pyx_L1_error’ defined but not used [-Wunused-label]
       2425 |   __pyx_L1_error:;
            |   ^~~~~~~~~~~~~~
      cdd.c:2307:7: warning: unused variable ‘__pyx_t_1’ [-Wunused-variable]
       2307 |   int __pyx_t_1;
            |       ^~~~~~~~~
      cdd.c:2304:9: warning: unused variable ‘__pyx_v_name’ [-Wunused-variable]
       2304 |   char *__pyx_v_name;
            |         ^~~~~~~~~~~~
      cdd.c: In function ‘__pyx_f_3cdd__get_set’:
      cdd.c:2768:69: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2768 |     for (__pyx_7genexpr__pyx_v_elem = 1; __pyx_7genexpr__pyx_v_elem <= __pyx_t_2; __pyx_7genexpr__pyx_v_elem++) {
            |                                                                     ^~
      cdd.c: In function ‘__pyx_f_3cdd__set_set’:
      cdd.c:2863:39: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2863 |   for (__pyx_v_elem = 1; __pyx_v_elem <= __pyx_t_1; __pyx_v_elem++) {
            |                                       ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Matrix’:
      cdd.c:20463:5: error: lvalue required as increment operand
      20463 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20465:5: error: lvalue required as decrement operand
      20465 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_LinProg’:
      cdd.c:20668:5: error: lvalue required as increment operand
      20668 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20670:5: error: lvalue required as decrement operand
      20670 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Polyhedron’:
      cdd.c:20815:5: error: lvalue required as increment operand
      20815 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20817:5: error: lvalue required as decrement operand
      20817 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__Pyx_decode_c_bytes’:
      cdd.c:23923:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
      23923 |         return PyUnicode_FromUnicode(NULL, 0);
            |         ^~~~~~
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
        551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
            |                                          ^~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_ParseOptionalKeywords’:
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_Coroutine_Send’:
      cdd.c:27868:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                   ^~~~~~~~~~~
            |                   _PyGen_yf
      cdd.c:27868:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c:27873:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27873 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c: In function ‘__Pyx_Generator_Next’:
      cdd.c:27957:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27957 |             ret = _PyGen_Send((PyGenObject*)yf, NULL);
            |                 ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycddlib
nning setup.py clean for pycddlib
Failed to build pycddlib
Installing collected packages: pycddlib
  Running setup.py install for pycddlib ... �[?25lerror
  error: subprocess-exited-with-error
  
  × Running setup.py install for pycddlib did not run successfully.
  │ exit code: 1
  ╰─> [186 lines of output]
      running install
      /home/userrrr/miniconda3/envs/spyder-env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      skipping 'cdd.c' Cython extension (up-to-date)
      building 'cdd' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/cddlib
      creating build/temp.linux-x86_64-cpython-310/cddlib/lib-src
      gcc -pthread -B /home/userrrr/miniconda3/envs/spyder-env/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -DGMPRATIONAL -Icddlib/lib-src -I/home/userrrr/miniconda3/envs/spyder-env/include/python3.10 -c cdd.c -o build/temp.linux-x86_64-cpython-310/cdd.o
      cdd.c: In function ‘__pyx_f_3cdd_libc_stdio_tmpfile’:
      cdd.c:2425:3: warning: label ‘__pyx_L1_error’ defined but not used [-Wunused-label]
       2425 |   __pyx_L1_error:;
            |   ^~~~~~~~~~~~~~
      cdd.c:2307:7: warning: unused variable ‘__pyx_t_1’ [-Wunused-variable]
       2307 |   int __pyx_t_1;
            |       ^~~~~~~~~
      cdd.c:2304:9: warning: unused variable ‘__pyx_v_name’ [-Wunused-variable]
       2304 |   char *__pyx_v_name;
            |         ^~~~~~~~~~~~
      cdd.c: In function ‘__pyx_f_3cdd__get_set’:
      cdd.c:2768:69: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2768 |     for (__pyx_7genexpr__pyx_v_elem = 1; __pyx_7genexpr__pyx_v_elem <= __pyx_t_2; __pyx_7genexpr__pyx_v_elem++) {
            |                                                                     ^~
      cdd.c: In function ‘__pyx_f_3cdd__set_set’:
      cdd.c:2863:39: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2863 |   for (__pyx_v_elem = 1; __pyx_v_elem <= __pyx_t_1; __pyx_v_elem++) {
            |                                       ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Matrix’:
      cdd.c:20463:5: error: lvalue required as increment operand
      20463 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20465:5: error: lvalue required as decrement operand
      20465 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_LinProg’:
      cdd.c:20668:5: error: lvalue required as increment operand
      20668 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20670:5: error: lvalue required as decrement operand
      20670 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Polyhedron’:
      cdd.c:20815:5: error: lvalue required as increment operand
      20815 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20817:5: error: lvalue required as decrement operand
      20817 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__Pyx_decode_c_bytes’:
      cdd.c:23923:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
      23923 |         return PyUnicode_FromUnicode(NULL, 0);
            |         ^~~~~~
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
        551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
            |                                          ^~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_ParseOptionalKeywords’:
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_Coroutine_Send’:
      cdd.c:27868:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                   ^~~~~~~~~~~
            |                   _PyGen_yf
      cdd.c:27868:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c:27873:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27873 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c: In function ‘__Pyx_Generator_Next’:
      cdd.c:27957:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27957 |             ret = _PyGen_Send((PyGenObject*)yf, NULL);
            |                 ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycddlib

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
�[?25hNote: you may need to restart the kernel to use updated packages.

Any idea on how to solve this?

@sguysc
Copy link
Author

sguysc commented Jun 16, 2022

I also tried to python setup.py build this repository (master branch) and this is the error:

running build
running build_ext
cythoning cdd.pyx to cdd.c
building 'cdd' extension
gcc -pthread -B /home/userrrr/miniconda3/envs/spyder-env/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -DGMPRATIONAL -Icddlib/lib-src -I/home/userrrr/miniconda3/envs/spyder-env/include/python3.10 -c cdd.c -o build/temp.linux-x86_64-cpython-310/cdd.o
In file included from cdd.c:601:
cddlib/lib-src/cdd.h:26:10: fatal error: cdd_f.h: No such file or directory
   26 | #include "cdd_f.h"
      |          ^~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1

where is cdd_f.h coming from?

@sguysc
Copy link
Author

sguysc commented Jun 16, 2022

I also found this, downloaded the dist.zip file and tried to locally install it but it did not work for me. Also tried this, same error.

Processing ./pycddlib-2.1.6a0.tar.gz
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycddlib
  Building wheel for pycddlib (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [184 lines of output]
      running bdist_wheel
      running build
      running build_ext
      cythoning cdd.pyx to cdd.c
      building 'cdd' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/cddlib
      creating build/temp.linux-x86_64-cpython-310/cddlib/lib-src
      gcc -pthread -B /home/userrrr/miniconda3/envs/spyder-env/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -DGMPRATIONAL -Icddlib/lib-src -I/home/userrrr/miniconda3/envs/spyder-env/include/python3.10 -c cdd.c -o build/temp.linux-x86_64-cpython-310/cdd.o
      cdd.c: In function ‘__pyx_f_3cdd_libc_stdio_tmpfile’:
      cdd.c:2425:3: warning: label ‘__pyx_L1_error’ defined but not used [-Wunused-label]
       2425 |   __pyx_L1_error:;
            |   ^~~~~~~~~~~~~~
      cdd.c:2307:7: warning: unused variable ‘__pyx_t_1’ [-Wunused-variable]
       2307 |   int __pyx_t_1;
            |       ^~~~~~~~~
      cdd.c:2304:9: warning: unused variable ‘__pyx_v_name’ [-Wunused-variable]
       2304 |   char *__pyx_v_name;
            |         ^~~~~~~~~~~~
      cdd.c: In function ‘__pyx_f_3cdd__get_set’:
      cdd.c:2768:69: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2768 |     for (__pyx_7genexpr__pyx_v_elem = 1; __pyx_7genexpr__pyx_v_elem <= __pyx_t_2; __pyx_7genexpr__pyx_v_elem++) {
            |                                                                     ^~
      cdd.c: In function ‘__pyx_f_3cdd__set_set’:
      cdd.c:2863:39: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2863 |   for (__pyx_v_elem = 1; __pyx_v_elem <= __pyx_t_1; __pyx_v_elem++) {
            |                                       ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Matrix’:
      cdd.c:20463:5: error: lvalue required as increment operand
      20463 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20465:5: error: lvalue required as decrement operand
      20465 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_LinProg’:
      cdd.c:20668:5: error: lvalue required as increment operand
      20668 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20670:5: error: lvalue required as decrement operand
      20670 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Polyhedron’:
      cdd.c:20815:5: error: lvalue required as increment operand
      20815 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20817:5: error: lvalue required as decrement operand
      20817 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__Pyx_decode_c_bytes’:
      cdd.c:23923:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
      23923 |         return PyUnicode_FromUnicode(NULL, 0);
            |         ^~~~~~
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
        551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
            |                                          ^~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_ParseOptionalKeywords’:
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_Coroutine_Send’:
      cdd.c:27868:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                   ^~~~~~~~~~~
            |                   _PyGen_yf
      cdd.c:27868:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c:27873:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27873 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c: In function ‘__Pyx_Generator_Next’:
      cdd.c:27957:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27957 |             ret = _PyGen_Send((PyGenObject*)yf, NULL);
            |                 ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycddlib
  Running setup.py clean for pycddlib
Failed to build pycddlib
Installing collected packages: pycddlib
  Running setup.py install for pycddlib ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pycddlib did not run successfully.
  │ exit code: 1
  ╰─> [186 lines of output]
      running install
      /home/userrrr/miniconda3/envs/spyder-env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      skipping 'cdd.c' Cython extension (up-to-date)
      building 'cdd' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/cddlib
      creating build/temp.linux-x86_64-cpython-310/cddlib/lib-src
      gcc -pthread -B /home/userrrr/miniconda3/envs/spyder-env/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -DGMPRATIONAL -Icddlib/lib-src -I/home/userrrr/miniconda3/envs/spyder-env/include/python3.10 -c cdd.c -o build/temp.linux-x86_64-cpython-310/cdd.o
      cdd.c: In function ‘__pyx_f_3cdd_libc_stdio_tmpfile’:
      cdd.c:2425:3: warning: label ‘__pyx_L1_error’ defined but not used [-Wunused-label]
       2425 |   __pyx_L1_error:;
            |   ^~~~~~~~~~~~~~
      cdd.c:2307:7: warning: unused variable ‘__pyx_t_1’ [-Wunused-variable]
       2307 |   int __pyx_t_1;
            |       ^~~~~~~~~
      cdd.c:2304:9: warning: unused variable ‘__pyx_v_name’ [-Wunused-variable]
       2304 |   char *__pyx_v_name;
            |         ^~~~~~~~~~~~
      cdd.c: In function ‘__pyx_f_3cdd__get_set’:
      cdd.c:2768:69: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2768 |     for (__pyx_7genexpr__pyx_v_elem = 1; __pyx_7genexpr__pyx_v_elem <= __pyx_t_2; __pyx_7genexpr__pyx_v_elem++) {
            |                                                                     ^~
      cdd.c: In function ‘__pyx_f_3cdd__set_set’:
      cdd.c:2863:39: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
       2863 |   for (__pyx_v_elem = 1; __pyx_v_elem <= __pyx_t_1; __pyx_v_elem++) {
            |                                       ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Matrix’:
      cdd.c:20463:5: error: lvalue required as increment operand
      20463 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20465:5: error: lvalue required as decrement operand
      20465 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_LinProg’:
      cdd.c:20668:5: error: lvalue required as increment operand
      20668 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20670:5: error: lvalue required as decrement operand
      20670 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Polyhedron’:
      cdd.c:20815:5: error: lvalue required as increment operand
      20815 |     ++Py_REFCNT(o);
            |     ^~
      cdd.c:20817:5: error: lvalue required as decrement operand
      20817 |     --Py_REFCNT(o);
            |     ^~
      cdd.c: In function ‘__Pyx_decode_c_bytes’:
      cdd.c:23923:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
      23923 |         return PyUnicode_FromUnicode(NULL, 0);
            |         ^~~~~~
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
        551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
            |                                          ^~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_ParseOptionalKeywords’:
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                       from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                       from cdd.c:4:
      /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      cdd.c: In function ‘__Pyx_Coroutine_Send’:
      cdd.c:27868:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                   ^~~~~~~~~~~
            |                   _PyGen_yf
      cdd.c:27868:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c:27873:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27873 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
            |                 ^
      cdd.c: In function ‘__Pyx_Generator_Next’:
      cdd.c:27957:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      27957 |             ret = _PyGen_Send((PyGenObject*)yf, NULL);
            |                 ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycddlib

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

@mcmtroffaes
Copy link
Owner

Thank you for the detailed report! A few quick things to try:

@mcmtroffaes
Copy link
Owner

mcmtroffaes commented Jun 16, 2022

... oh, one final thought: can you see if installing with pip works any better (if not already using it - I'm not quite sure from the log).

@sguysc
Copy link
Author

sguysc commented Jun 16, 2022

Yes, libgmp-dev is installed.
I tried with ./cddlib-makefile-gmp.sh, didn't work. At this point, cdd_f.h is no longer an issue. Both trying to install locally or using pip install, yields the same error (see below). Making cddlib seem to work fine. It fails during python setup.py build build_ext command. Which gcc version should we use? Are you planning to include the linux wheel on pypi?

running build
running build_ext
skipping 'cdd.c' Cython extension (up-to-date)
building 'cdd' extension
gcc -pthread -B /home/userrrr/miniconda3/envs/spyder-env/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -O2 -isystem /home/userrrr/miniconda3/envs/spyder-env/include -fPIC -DGMPRATIONAL -Icddlib/lib-src -I/home/userrrr/miniconda3/envs/spyder-env/include/python3.10 -c cdd.c -o build/temp.linux-x86_64-cpython-310/cdd.o
cdd.c: In function ‘__pyx_f_3cdd_libc_stdio_tmpfile’:
cdd.c:2425:3: warning: label ‘__pyx_L1_error’ defined but not used [-Wunused-label]
 2425 |   __pyx_L1_error:;
      |   ^~~~~~~~~~~~~~
cdd.c:2307:7: warning: unused variable ‘__pyx_t_1’ [-Wunused-variable]
 2307 |   int __pyx_t_1;
      |       ^~~~~~~~~
cdd.c:2304:9: warning: unused variable ‘__pyx_v_name’ [-Wunused-variable]
 2304 |   char *__pyx_v_name;
      |         ^~~~~~~~~~~~
cdd.c: In function ‘__pyx_f_3cdd__get_set’:
cdd.c:2768:69: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
 2768 | (__pyx_7genexpr__pyx_v_elem = 1; __pyx_7genexpr__pyx_v_elem <= __pyx_t_2; __pyx_7genexpr__pyx_v_elem++) {
      |                                                             ^~

cdd.c: In function ‘__pyx_f_3cdd__set_set’:
cdd.c:2863:39: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
 2863 |   for (__pyx_v_elem = 1; __pyx_v_elem <= __pyx_t_1; __pyx_v_elem++) {
      |                                       ^~
cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Matrix’:
cdd.c:20463:5: error: lvalue required as increment operand
20463 |     ++Py_REFCNT(o);
      |     ^~
cdd.c:20465:5: error: lvalue required as decrement operand
20465 |     --Py_REFCNT(o);
      |     ^~
cdd.c: In function ‘__pyx_tp_dealloc_3cdd_LinProg’:
cdd.c:20668:5: error: lvalue required as increment operand
20668 |     ++Py_REFCNT(o);
      |     ^~
cdd.c:20670:5: error: lvalue required as decrement operand
20670 |     --Py_REFCNT(o);
      |     ^~
cdd.c: In function ‘__pyx_tp_dealloc_3cdd_Polyhedron’:
cdd.c:20815:5: error: lvalue required as increment operand
20815 |     ++Py_REFCNT(o);
      |     ^~
cdd.c:20817:5: error: lvalue required as decrement operand
20817 |     --Py_REFCNT(o);
      |     ^~
cdd.c: In function ‘__Pyx_decode_c_bytes’:
cdd.c:23923:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
23923 |         return PyUnicode_FromUnicode(NULL, 0);
      |         ^~~~~~
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
  551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      |                                          ^~~~~~~~~~~~~~~~~~~~~
cdd.c: In function ‘__Pyx_ParseOptionalKeywords’:
cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c:24309:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
cdd.c:24309:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24309 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c:24325:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
cdd.c:24325:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
24325 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/unicodeobject.h:1046,
                 from /home/userrrr/miniconda3/envs/spyder-env/include/python3.10/Python.h:83,
                 from cdd.c:4:
/home/userrrr/miniconda3/envs/spyder-env/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cdd.c: In function ‘__Pyx_Coroutine_Send’:
cdd.c:27868:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
      |                   ^~~~~~~~~~~
      |                   _PyGen_yf
cdd.c:27868:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
27868 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
      |                 ^
cdd.c:27873:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
27873 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
      |                 ^
cdd.c: In function ‘__Pyx_Generator_Next’:
cdd.c:27957:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
27957 |             ret = _PyGen_Send((PyGenObject*)yf, NULL);
      |                 ^
error: command '/usr/bin/gcc' failed with exit code 1

@sguysc
Copy link
Author

sguysc commented Jun 16, 2022

Ok, the problem is solved, I upgraded Cython from 0.29.14 to 0.29.30 and now it compiles fine. Even the pip install works perfectly! Thank you @mcmtroffaes .

@mcmtroffaes
Copy link
Owner

Great! Glad you figured it out. I probably ought to set a minimum Cython version in the build system requirements to avoid tripping this for others in the future. Would that be through pyproject.toml, setup_requires, ... or would you recommend something else?

@sguysc
Copy link
Author

sguysc commented Jun 16, 2022

Sorry, I have not made a python package before, so I'm not familiar with the differences. But it looks like it's a combination of python3.10 and Cython, that changed Py_REFCNT which causes the failure. Probably doesn't happen in python<=3.9 even with an older Cython.

@mcmtroffaes
Copy link
Owner

That's fine. I've merged in a commit that sets a minimum Cython version, so pip will give a much more useful error message rather than failing during the build itself.

Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants