• Bug#1094884: mathgl FTBFS with numpy 2

    From Rafael =?utf-8?Q?Laboissi=C3=A8re?=@21:1/5 to All on Thu Mar 13 11:30:02 2025
    Control: forwarded -1 https://sourceforge.net/p/mathgl/bugs/53/

    * Adrian Bunk <bunk@debian.org> [2025-02-01 02:04]:

    Source: mathgl
    Version: 8.0.2-4
    Severity: serious
    Tags: ftbfs

    https://buildd.debian.org/status/logs.php?pkg=mathgl&ver=8.0.2-4%2Bb1

    ... /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: In function ‘PyArrayObject* obj_to_array_no_conversion(PyObject*, int)’:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3810:27: error: ‘PyArray_NOTYPE’ was not declared in this scope; did you mean ‘PyArray_TYPE’?
    3810 | #define NPY_NOTYPE PyArray_NOTYPE
    | ^~~~~~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3899:41: note: in expansion of macro ‘NPY_NOTYPE’
    3899 | if (is_array(input) && (typecode == NPY_NOTYPE ||
    | ^~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3900:62: error: cannot convert ‘PyObject*’ {aka ‘_object*’} to ‘const PyArrayObject*’ {aka ‘const tagPyArrayObject_fields*’}
    3900 | PyArray_EquivTypenums(array_type(input), typecode)))
    | ^~~~~
    | |
    | PyObject* {aka _object*}
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3841:51: note: in definition of macro ‘array_type’
    3841 | #define array_type(a) (int)(PyArray_TYPE(a))
    | ^ /usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include/numpy/ndarraytypes.h:1567:35: note: initializing argument 1 of ‘int PyArray_TYPE(const PyArrayObject*)’
    1567 | PyArray_TYPE(const PyArrayObject *arr)
    | ~~~~~~~~~~~~~~~~~~~~~^~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3907:55: error: cannot convert ‘PyObject*’ {aka ‘_object*’} to ‘const PyArrayObject*’ {aka ‘const tagPyArrayObject_fields*’}
    3907 | char* actual_type = typecode_string(array_type(input));
    | ^~~~~
    | |
    | PyObject* {aka _object*}
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3841:51: note: in definition of macro ‘array_type’
    3841 | #define array_type(a) (int)(PyArray_TYPE(a))
    | ^ /usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include/numpy/ndarraytypes.h:1567:35: note: initializing argument 1 of ‘int PyArray_TYPE(const PyArrayObject*)’
    1567 | PyArray_TYPE(const PyArrayObject *arr)
    | ~~~~~~~~~~~~~~~~~~~~~^~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: In function ‘PyArrayObject* obj_to_array_allow_conversion(PyObject*, int, int*)’:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3810:27: error: ‘PyArray_NOTYPE’ was not declared in this scope; did you mean ‘PyArray_TYPE’?
    3810 | #define NPY_NOTYPE PyArray_NOTYPE
    | ^~~~~~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3935:41: note: in expansion of macro ‘NPY_NOTYPE’
    3935 | if (is_array(input) && (typecode == NPY_NOTYPE ||
    | ^~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3936:62: error: cannot convert ‘PyObject*’ {aka ‘_object*’} to ‘const PyArrayObject*’ {aka ‘const tagPyArrayObject_fields*’}
    3936 | PyArray_EquivTypenums(array_type(input),typecode)))
    | ^~~~~
    | |
    | PyObject* {aka _object*}
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3841:51: note: in definition of macro ‘array_type’
    3841 | #define array_type(a) (int)(PyArray_TYPE(a))
    | ^ /usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include/numpy/ndarraytypes.h:1567:35: note: initializing argument 1 of ‘int PyArray_TYPE(const PyArrayObject*)’
    1567 | PyArray_TYPE(const PyArrayObject *arr)
    | ~~~~~~~~~~~~~~~~~~~~~^~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: At global scope:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3813:27: error: ‘intp’ has not been declared
    3813 | #define npy_intp intp
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:4144:40: note: in expansion of macro ‘npy_intp’
    4144 | int require_size(PyArrayObject* ary, npy_intp* size, int n)
    | ^~~~~~~~
    [ 52%] Linking CXX executable mgltask
    cd /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/utils && /usr/bin/cmake -E cmake_link_script CMakeFiles/mgltask.dir/link.txt --verbose=1
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: In function ‘int require_fortran(PyArrayObject*)’:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3833:27: error: ‘FARRAY’ was not declared in this scope
    3833 | #define NPY_FARRAY FARRAY
    | ^~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:4200:18: note: in expansion of macro ‘NPY_FARRAY’
    4200 | ary->flags = NPY_FARRAY;
    | ^~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_mglData__SWIG_4(PyObject*, Py_ssize_t, PyObject**)’:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3813:27: error: ‘intp’ was not declared in this scope; did you mean ‘intf’?
    3813 | #define npy_intp intp
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6614:5: note: in expansion of macro ‘npy_intp’
    6614 | npy_intp size[1] = {
    | ^~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3800:27: error: ‘PyArray_DOUBLE’ was not declared in this scope; did you mean ‘PyArray_DTYPE’?
    3800 | #define NPY_DOUBLE PyArray_DOUBLE
    | ^~~~~~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6617:68: note: in expansion of macro ‘NPY_DOUBLE’
    6617 | array1 = obj_to_array_contiguous_allow_conversion(swig_obj[0], NPY_DOUBLE,
    | ^~~~~~~~~~
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6620:29: error: ‘size’ was not declared in this scope; did you mean ‘std::size’?
    6620 | !require_size(array1, size, 1)) SWIG_fail;
    | ^~~~
    | std::size
    In file included from /usr/include/c++/14/string:53,
    from /usr/include/c++/14/stdexcept:39,
    from /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3305:
    /usr/include/c++/14/bits/range_access.h:272:5: note: ‘std::size’ declared here
    272 | size(const _Tp (&)[_Nm]) noexcept
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_mglData__SWIG_5(PyObject*, Py_ssize_t, PyObject**)’:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3813:27: error: ‘intp’ was not declared in this scope; did you mean ‘intf’?
    3813 | #define npy_intp intp
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6656:5: note: in expansion of macro ‘npy_intp’
    6656 | npy_intp size[2] = {
    | ^~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3800:27: error: ‘PyArray_DOUBLE’ was not declared in this scope; did you mean ‘PyArray_DTYPE’?
    3800 | #define NPY_DOUBLE PyArray_DOUBLE
    | ^~~~~~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6659:68: note: in expansion of macro ‘NPY_DOUBLE’
    6659 | array1 = obj_to_array_contiguous_allow_conversion(swig_obj[0], NPY_DOUBLE,
    | ^~~~~~~~~~
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6662:29: error: ‘size’ was not declared in this scope; did you mean ‘std::size’?
    6662 | !require_size(array1, size, 2)) SWIG_fail;
    | ^~~~
    | std::size /usr/include/c++/14/bits/range_access.h:272:5: note: ‘std::size’ declared here
    272 | size(const _Tp (&)[_Nm]) noexcept
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_mglData__SWIG_6(PyObject*, Py_ssize_t, PyObject**)’:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3813:27: error: ‘intp’ was not declared in this scope; did you mean ‘intf’?
    3813 | #define npy_intp intp
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6698:5: note: in expansion of macro ‘npy_intp’
    6698 | npy_intp size[1] = {
    | ^~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3800:27: error: ‘PyArray_DOUBLE’ was not declared in this scope; did you mean ‘PyArray_DTYPE’?
    3800 | #define NPY_DOUBLE PyArray_DOUBLE
    | ^~~~~~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6701:68: note: in expansion of macro ‘NPY_DOUBLE’
    6701 | array1 = obj_to_array_contiguous_allow_conversion(swig_obj[0], NPY_DOUBLE,
    | ^~~~~~~~~~
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6704:29: error: ‘size’ was not declared in this scope; did you mean ‘std::size’?
    6704 | !require_size(array1, size, 1)) SWIG_fail;
    | ^~~~
    | std::size /usr/include/c++/14/bits/range_access.h:272:5: note: ‘std::size’ declared here
    272 | size(const _Tp (&)[_Nm]) noexcept
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_mglData__SWIG_7(PyObject*, Py_ssize_t, PyObject**)’:
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3813:27: error: ‘intp’ was not declared in this scope; did you mean ‘intf’?
    3813 | #define npy_intp intp
    | ^~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6740:5: note: in expansion of macro ‘npy_intp’
    6740 | npy_intp size[2] = {
    | ^~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:3800:27: error: ‘PyArray_DOUBLE’ was not declared in this scope; did you mean ‘PyArray_DTYPE’?
    3800 | #define NPY_DOUBLE PyArray_DOUBLE
    | ^~~~~~~~~~~~~~ /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6743:68: note: in expansion of macro ‘NPY_DOUBLE’
    6743 | array1 = obj_to_array_contiguous_allow_conversion(swig_obj[0], NPY_DOUBLE,
    | ^~~~~~~~~~
    /build/reproducible-path/mathgl-8.0.2/obj-x86_64-linux-gnu/lang/CMakeFiles/mathgl.dir/mathglPYTHON_wrap.cxx:6746:29: error: ‘size’ was not declared in this scope; did you mean ‘std::size’?
    6746 | !require_size(array1, size, 2)) SWIG_fail;
    | ^~~~
    | std::size /usr/include/c++/14/bits/range_access.h:272:5: note: ‘std::size’ declared here
    272 | size(const _Tp (&)[_Nm]) noexcept
    | ^~~~
    ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)