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

Build error with Numpy (Python 3.10) #390

Open
meerfrau opened this issue Oct 31, 2023 · 0 comments
Open

Build error with Numpy (Python 3.10) #390

meerfrau opened this issue Oct 31, 2023 · 0 comments

Comments

@meerfrau
Copy link

Python 3.10
Cython 3.0.5
numpy 1.26.1

      numpy/core/src/multiarray/scalartypes.c.src: In function 'float_arrtype_hash':
      numpy/core/src/multiarray/scalartypes.c.src:2967:27: error: incompatible type for argument 1 of '_Py_HashDouble'
       2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
      In file included from /usr/include/python3.10/Python.h:77,
                       from numpy/core/src/multiarray/scalartypes.c.src:3:
      /usr/include/python3.10/pyhash.h:10:38: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'double'
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                                      ^~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2967:12: error: too few arguments to function '_Py_HashDouble'
       2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
            |            ^~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                       ^~~~~~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src: In function 'cfloat_arrtype_hash':
      numpy/core/src/multiarray/scalartypes.c.src:2975:31: error: incompatible type for argument 1 of '_Py_HashDouble'
       2975 |     hashreal = _Py_HashDouble((double)
            |                               ^~~~~~~~
            |                               |
            |                               double
       2976 |             PyArrayScalar_VAL(obj, C@name@).real);
            |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:38: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'double'
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                                      ^~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2975:16: error: too few arguments to function '_Py_HashDouble'
       2975 |     hashreal = _Py_HashDouble((double)
            |                ^~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                       ^~~~~~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2981:31: error: incompatible type for argument 1 of '_Py_HashDouble'
       2981 |     hashimag = _Py_HashDouble((double)
            |                               ^~~~~~~~
            |                               |
            |                               double
       2982 |             PyArrayScalar_VAL(obj, C@name@).imag);
            |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:38: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'double'
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                                      ^~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2981:16: error: too few arguments to function '_Py_HashDouble'
       2981 |     hashimag = _Py_HashDouble((double)
            |                ^~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                       ^~~~~~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src: In function 'longdouble_arrtype_hash':
      numpy/core/src/multiarray/scalartypes.c.src:2967:27: error: incompatible type for argument 1 of '_Py_HashDouble'
       2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
      /usr/include/python3.10/pyhash.h:10:38: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'double'
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                                      ^~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2967:12: error: too few arguments to function '_Py_HashDouble'
       2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
            |            ^~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                       ^~~~~~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src: In function 'clongdouble_arrtype_hash':
      numpy/core/src/multiarray/scalartypes.c.src:2975:31: error: incompatible type for argument 1 of '_Py_HashDouble'
       2975 |     hashreal = _Py_HashDouble((double)
            |                               ^~~~~~~~
            |                               |
            |                               double
       2976 |             PyArrayScalar_VAL(obj, C@name@).real);
            |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:38: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'double'
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                                      ^~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2975:16: error: too few arguments to function '_Py_HashDouble'
       2975 |     hashreal = _Py_HashDouble((double)
            |                ^~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                       ^~~~~~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2981:31: error: incompatible type for argument 1 of '_Py_HashDouble'
       2981 |     hashimag = _Py_HashDouble((double)
            |                               ^~~~~~~~
            |                               |
            |                               double
       2982 |             PyArrayScalar_VAL(obj, C@name@).imag);
            |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:38: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'double'
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                                      ^~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2981:16: error: too few arguments to function '_Py_HashDouble'
       2981 |     hashimag = _Py_HashDouble((double)
            |                ^~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                       ^~~~~~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src: In function 'half_arrtype_hash':
      numpy/core/src/multiarray/scalartypes.c.src:2997:27: error: incompatible type for argument 1 of '_Py_HashDouble'
       2997 |     return _Py_HashDouble(npy_half_to_double(PyArrayScalar_VAL(obj, Half)));
            |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                           |
            |                           double
      /usr/include/python3.10/pyhash.h:10:38: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'double'
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                                      ^~~~~~~~~~
      numpy/core/src/multiarray/scalartypes.c.src:2997:12: error: too few arguments to function '_Py_HashDouble'
       2997 |     return _Py_HashDouble(npy_half_to_double(PyArrayScalar_VAL(obj, Half)));
            |            ^~~~~~~~~~~~~~
      /usr/include/python3.10/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
            |                       ^~~~~~~~~~~~~~

This is the very same error as numpy/numpy#19033

My local numpy is not used, instead PyRate does dist.fetch_build_eggs(dist.setup_requires)

numpy-1.16.4-py3.7-linux-x86_64.egg seems very old. How do I override this behaviour?

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

1 participant