Skip to content

Build error with Numpy (Python 3.10) #390

@meerfrau

Description

@meerfrau

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions