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

removal of deprecated numpy APIs breaks pandas/scipy builds #2569

Closed
tacaswell opened this issue Aug 22, 2018 · 1 comment
Closed

removal of deprecated numpy APIs breaks pandas/scipy builds #2569

tacaswell opened this issue Aug 22, 2018 · 1 comment

Comments

@tacaswell
Copy link
Contributor

222334c which looks like it is part of the code from #2559 has broken building of scipy and pandas. In both cases I see failures like:

   gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ipandas/_libs -I./pandas/_libs -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include -I/home/tcaswell/.virtualenvs/bleeding/include -I/home/tcaswell/source/other_source/cpython/Include -I/home/tcaswell/source/other_source/cpython -c pandas/_libs/window.cpp -o build/temp.linux-x86_64-3.8/pandas/_libs/window.o -Wno-unused-function
    In file included from /home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821,
                     from /home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from pandas/_libs/window.cpp:656:
    /home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^~~~~~~
    pandas/_libs/window.cpp: In function ‘PyObject* __pyx_pf_6pandas_5_libs_6window_30ewmcov(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_5numpy_double_t, int, int, int, int)’:
    pandas/_libs/window.cpp:45373:27: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare]
       __pyx_t_2 = ((__pyx_t_1 != __pyx_v_N) != 0);
                     ~~~~~~~~~~^~~~~~~~~~~~
    In file included from /home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from pandas/_libs/window.cpp:656:
    pandas/_libs/window.cpp: In function ‘int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject*, Py_buffer*, int)’:
    /home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1571:67: error: cannot convert ‘PyArray_Descr*’ {aka ‘_PyArray_Descr*’} to ‘PyObject*’ {aka ‘_object*’} in assignment
     #define PyArray_DESCR(obj) (((PyArrayObject_fields *)(obj))->descr)
                                                                       ^
    pandas/_libs/window.cpp:48256:15: note: in expansion of macro ‘PyArray_DESCR’
       __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
                   ^~~~~~~~~~~~~
    error: command 'gcc' failed with exit status 1
error

and

    compiling C++ sources
    C compiler: g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC

    compile options: '-I/usr/include/python3.7m -I/tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include -Iscipy/_lib -Iscipy/spatial/ckdtree/src -I/tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include -I/tmp/scipy_test/include -I/usr/include/python3.7m -c'
    g++: scipy/spatial/ckdtree.cxx
    In file included from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821,
                     from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from scipy/spatial/ckdtree.cxx:616:
    /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^~~~~~~
    In file included from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from scipy/spatial/ckdtree.cxx:616:
    scipy/spatial/ckdtree.cxx: In function ‘int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject*, Py_buffer*, int)’:
    /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1571:67: error: cannot convert ‘PyArray_Descr*’ {aka ‘_PyArray_Descr*’} to ‘PyObject*’ {aka ‘_object*’} in assignment
     #define PyArray_DESCR(obj) (((PyArrayObject_fields *)(obj))->descr)
                                                                       ^
    scipy/spatial/ckdtree.cxx:16607:15: note: in expansion of macro ‘PyArray_DESCR’
       __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
                   ^~~~~~~~~~~~~
    In file included from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821,
                     from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from scipy/spatial/ckdtree.cxx:616:
    /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^~~~~~~
    In file included from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from scipy/spatial/ckdtree.cxx:616:
    scipy/spatial/ckdtree.cxx: In function ‘int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject*, Py_buffer*, int)’:
    /tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1571:67: error: cannot convert ‘PyArray_Descr*’ {aka ‘_PyArray_Descr*’} to ‘PyObject*’ {aka ‘_object*’} in assignment
     #define PyArray_DESCR(obj) (((PyArrayObject_fields *)(obj))->descr)
                                                                       ^
    scipy/spatial/ckdtree.cxx:16607:15: note: in expansion of macro ‘PyArray_DESCR’
       __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
                   ^~~~~~~~~~~~~
    error: Command "g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -I/usr/include/python3.7m -I/tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include -Iscipy/_lib -Iscipy/spatial/ckdtree/src -I/tmp/scipy_test/lib/python3.7/site-packages/numpy/core/include -I/tmp/scipy_test/include -I/usr/include/python3.7m -c scipy/spatial/ckdtree.cxx -o build/temp.linux-x86_64-3.7/scipy/spatial/ckdtree.o -MMD -MF build/temp.linux-x86_64-3.7/scipy/spatial/ckdtree.o.d" failed with exit status 1
error

Reverting to 387c503 builds both pandas and scipy without error.

I am in significantly over my head and do not know where to start getting a minimal example, sorry.

@scoder
Copy link
Contributor

scoder commented Aug 23, 2018

Sorry about that, and thanks for the quick heads-up. Should be fixed by 5000e1a.

@scoder scoder closed this as completed Aug 23, 2018
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