Skip to content

error building wrappers with python 12.3: error: ‘PyArray_Descr’ has no member named ‘subarray’` #692

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

Open
surreal6 opened this issue May 26, 2025 · 0 comments

Comments

@surreal6
Copy link

Hi. I'm trying to build libfreenect python wrappers with python 12.3 with no luck.

I found this PyArray_Descr error when running make:

wrappers/python/freenect3.c:9104:39: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’

Also have a warning on deprecated numpy Api, not sure if related.

I was able to build it with python 3.13.3 with same deps versions (Cython 0.29.37, numpy 2.2.6, cv2 4.11.0), but unfortunately i do need a 12.3 build :/

Any idea on how to solve this?

Here is the full console log:

carlos@ryzen-de-menta:~/sources/libfreenect/build$ cmake -L .. -DBUILD_PYTHON3=ON
-- Operating system is Linux
-- Got System Processor x86_64
-- Linux x86_64 Detected
-- libfreenect will be installed to /usr/local
-- Headers will be installed to /usr/local/include/libfreenect
-- Libraries will be installed to /usr/local/lib
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/carlos/sources/libfreenect/build
-- Cache values
BUILD_AS3_SERVER:BOOL=OFF
BUILD_CPACK_DEB:BOOL=OFF
BUILD_CPACK_RPM:BOOL=OFF
BUILD_CPACK_TGZ:BOOL=OFF
BUILD_CPP:BOOL=ON
BUILD_CV:BOOL=OFF
BUILD_C_SYNC:BOOL=ON
BUILD_EXAMPLES:BOOL=ON
BUILD_FAKENECT:BOOL=ON
BUILD_OPENNI2_DRIVER:BOOL=OFF
BUILD_PYTHON:BOOL=OFF
BUILD_PYTHON2:BOOL=OFF
BUILD_PYTHON3:BOOL=ON
BUILD_REDIST_PACKAGE:BOOL=ON
CMAKE_BUILD_TYPE:STRING=
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CYTHON_EXECUTABLE:FILEPATH=/home/carlos/.local/bin/cython
LIBUSB_1_INCLUDE_DIR:PATH=/usr/include/libusb-1.0
LIBUSB_1_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libusb-1.0.so
Python2_EXACTVERSION:STRING=
Python3_EXACTVERSION:STRING=
carlos@ryzen-de-menta:~/sources/libfreenect/build$ make
[ 96%] Built target freenect
[ 96%] Built target freenectstatic
[ 96%] Built target freenect-camtest
[ 96%] Built target freenect-wavrecord
[ 96%] Built target freenect-glview
[ 96%] Built target freenect-regview
[ 96%] Built target freenect-hiview
[ 96%] Built target freenect-chunkview
[ 96%] Built target freenect-micview
[ 96%] Built target freenect_sync
[ 96%] Built target freenect-regtest
[ 96%] Built target freenect-tiltdemo
[ 96%] Built target freenect-glpclview
[ 96%] Built target fakenect
[ 96%] Built target fakenect-record
[ 96%] Built target freenect_sync_static
[ 96%] Built target freenect-cppview
[ 96%] Built target freenect-cpp_pcview
[ 96%] Building C object wrappers/python/CMakeFiles/cython3_freenect.dir/freenect3.c.o
In file included from /home/carlos/.pyenv/versions/3.12-dev/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h:1913,
                 from /home/carlos/.pyenv/versions/3.12-dev/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h:12,
                 from /home/carlos/.pyenv/versions/3.12-dev/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h:5,
                 from /home/carlos/sources/libfreenect/build/wrappers/python/freenect3.c:753:
/home/carlos/.pyenv/versions/3.12-dev/lib/python3.12/site-packages/numpy/_core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
In file included from /home/carlos/.pyenv/versions/3.12-dev/include/python3.12/Python.h:38,
                 from /home/carlos/sources/libfreenect/build/wrappers/python/freenect3.c:6:
/home/carlos/sources/libfreenect/build/wrappers/python/freenect3.c: In function ‘__pyx_f_5numpy_PyDataType_SHAPE’:
/home/carlos/sources/libfreenect/build/wrappers/python/freenect3.c:9104:39: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
 9104 |     __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
      |                                       ^~
/home/carlos/.pyenv/versions/3.12-dev/include/python3.12/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
   24 | #define _Py_CAST(type, expr) ((type)(expr))
      |                                      ^~~~
/home/carlos/.pyenv/versions/3.12-dev/include/python3.12/object.h:661:35: note: in expansion of macro ‘_PyObject_CAST’
  661 | #  define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
      |                                   ^~~~~~~~~~~~~~
/home/carlos/sources/libfreenect/build/wrappers/python/freenect3.c:1351:27: note: in expansion of macro ‘Py_INCREF’
 1351 |   #define __Pyx_INCREF(r) Py_INCREF(r)
      |                           ^~~~~~~~~
/home/carlos/sources/libfreenect/build/wrappers/python/freenect3.c:9104:5: note: in expansion of macro ‘__Pyx_INCREF’
 9104 |     __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
      |     ^~~~~~~~~~~~
/home/carlos/sources/libfreenect/build/wrappers/python/freenect3.c:9105:36: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
 9105 |     __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
      |                                    ^~
make[2]: *** [wrappers/python/CMakeFiles/cython3_freenect.dir/build.make:80: wrappers/python/CMakeFiles/cython3_freenect.dir/freenect3.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:713: wrappers/python/CMakeFiles/cython3_freenect.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
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