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

PyDataType_* not declared #241

Open
skriesch opened this issue Jul 2, 2024 · 0 comments
Open

PyDataType_* not declared #241

skriesch opened this issue Jul 2, 2024 · 0 comments
Labels

Comments

@skriesch
Copy link

skriesch commented Jul 2, 2024

Description
We wanted to build Pyfhel on aarch64 (Raspberry Pi 4).
During the build of the 'Pyfhel.Pyfhel' extension the following error is appearing:

 Pyfhel/Pyfhel.cpp: In function ‘npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr*)’:
      Pyfhel/Pyfhel.cpp:24737:13: error: ‘PyDataType_ELSIZE’ was not declared in this scope; did you mean ‘PyDataType_ISSIGNED’?
      24737 |   __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~
            |             PyDataType_ISSIGNED
      Pyfhel/Pyfhel.cpp: In function ‘npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr*)’:
      Pyfhel/Pyfhel.cpp:24771:13: error: ‘PyDataType_ALIGNMENT’ was not declared in this scope; did you mean ‘PyDataType_ISSIGNED’?
      24771 |   __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~
            |             PyDataType_ISSIGNED
      Pyfhel/Pyfhel.cpp: In function ‘PyObject* __pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr*)’:
      Pyfhel/Pyfhel.cpp:24809:15: error: ‘PyDataType_FIELDS’ was not declared in this scope; did you mean ‘PyDataType_HASFIELDS’?
      24809 |   __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
            |               ^~~~~~~~~~~~~~~~~
            |               PyDataType_HASFIELDS
      Pyfhel/Pyfhel.cpp: In function ‘PyObject* __pyx_f_5numpy_5dtype_5names_names(PyArray_Descr*)’:
      Pyfhel/Pyfhel.cpp:24851:15: error: ‘PyDataType_NAMES’ was not declared in this scope; did you mean ‘PyDataType_ISNUMBER’?
      24851 |   __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
            |               ^~~~~~~~~~~~~~~~
            |               PyDataType_ISNUMBER
      Pyfhel/Pyfhel.cpp: In function ‘PyArray_ArrayDescr* __pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr*)’:
      Pyfhel/Pyfhel.cpp:24889:13: error: ‘PyDataType_SUBARRAY’ was not declared in this scope; did you mean ‘PyDataType_HASSUBARRAY’?
      24889 |   __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~
            |             PyDataType_HASSUBARRAY
      Pyfhel/Pyfhel.cpp: In function ‘npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr*)’:
      Pyfhel/Pyfhel.cpp:24923:13: error: ‘PyDataType_FLAGS’ was not declared in this scope; did you mean ‘PyDataType_FLAGCHK’?
      24923 |   __pyx_r = PyDataType_FLAGS(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~
            |             PyDataType_FLAGCHK
      Pyfhel/Pyfhel.cpp: In function ‘int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject*)’:
      Pyfhel/Pyfhel.cpp:24957:13: error: ‘PyArray_MultiIter_NUMITER’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXTi’?
      24957 |   __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXTi
      Pyfhel/Pyfhel.cpp: In function ‘npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject*)’:
      Pyfhel/Pyfhel.cpp:24991:13: error: ‘PyArray_MultiIter_SIZE’ was not declared in this scope; did you mean ‘PyArray_MultiIter_RESET’?
      24991 |   __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_RESET
      Pyfhel/Pyfhel.cpp: In function ‘npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject*)’:
      Pyfhel/Pyfhel.cpp:25025:13: error: ‘PyArray_MultiIter_INDEX’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXT’?
      25025 |   __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXT
      Pyfhel/Pyfhel.cpp: In function ‘int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject*)’:
      Pyfhel/Pyfhel.cpp:25059:13: error: ‘PyArray_MultiIter_NDIM’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXT’?
      25059 |   __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXT
      Pyfhel/Pyfhel.cpp: In function ‘npy_intp* __pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject*)’:
      Pyfhel/Pyfhel.cpp:25093:13: error: ‘PyArray_MultiIter_DIMS’ was not declared in this scope; did you mean ‘PyArray_MultiIter_DATA’?
      25093 |   __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_DATA
      Pyfhel/Pyfhel.cpp: In function ‘void** __pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject*)’:
      Pyfhel/Pyfhel.cpp:25127:13: error: ‘PyArray_MultiIter_ITERS’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXT’?
      25127 |   __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXT
      Pyfhel/Pyfhel.cpp: In function ‘PyArrayObject* __pyx_f_6Pyfhel_6Pyfhel_vec_to_array_i(std::vector<long int>, int)’:
      Pyfhel/Pyfhel.cpp:26506:33: warning: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘std::vector<long int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
      26506 |   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
            |                       ~~~~~~~~~~^~~~~~~~~~~
      Pyfhel/Pyfhel.cpp: In function ‘PyArrayObject* __pyx_f_6Pyfhel_6Pyfhel_vec_to_array_u(std::vector<long unsigned int>, int)’:
      Pyfhel/Pyfhel.cpp:26785:33: warning: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
      26785 |   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
            |                       ~~~~~~~~~~^~~~~~~~~~~
      Pyfhel/Pyfhel.cpp: In function ‘__pyx_obj_6Pyfhel_6PyCtxt_PyCtxt* __pyx_f_6Pyfhel_6Pyfhel_6Pyfhel_cumul_add(__pyx_obj_6Pyfhel_6Pyfhel_Pyfhel*, __pyx_obj_6Pyfhel_6PyCtxt_PyCtxt*, int, __pyx_opt_args_6Pyfhel_6Pyfhel_6Pyfhel_cumul_add*)’:
      Pyfhel/Pyfhel.cpp:48097:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
      48097 |     __pyx_t_9 = (__pyx_v_k < __pyx_v_n_elements);
            |                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1

Code To Reproduce Error

  1. git clone of the repository
  2. Compile it
  3. Step:
cimporting numpy version '2.0.0'
      building 'Pyfhel.Pyfhel' extension
      aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__PYX_ENUM_CLASS_DECL=enum -IPyfhel/Afhel -I/home/skriesch/homomorphic/include -I/usr/include/python3.11 -I/tmp/pip-build-env-j1c3d06j/overlay/lib/python3.11/site-packages/numpy/_core/include -I/home/skriesch/Pyfhel/Pyfhel/backend/SEAL/native/src -I/home/skriesch/Pyfhel/Pyfhel/backend/SEAL/thirdparty/msgsl-src/include -I/home/skriesch/Pyfhel/build/temp.linux-aarch64-3.11/Pyfhel/SEAL/native/src -I/home/skriesch/Pyfhel/build/temp.linux-aarch64-3.11/Pyfhel/SEAL/thirdparty/msgsl-src/include -I/home/skriesch/Pyfhel/Pyfhel/Afhel -I/home/skriesch/Pyfhel/build/temp.linux-aarch64-3.11/Pyfhel/SEAL/native/src -I/home/skriesch/Pyfhel/build/temp.linux-aarch64-3.11/Pyfhel/SEAL/thirdparty/msgsl-src/include -I/home/skriesch/Pyfhel/Pyfhel/backend/SEAL/native/src -I/home/skriesch/Pyfhel/Pyfhel/backend/SEAL/thirdparty/msgsl-src/include -c Pyfhel/Pyfhel.cpp -o build/temp.linux-aarch64-3.11/Pyfhel/Pyfhel.o -std=c++17 -O3 -fopenmp

Expected behavior
[A clear and concise description of what you expected to happen. Can be omitted if obvious]

Setup:

  • OS: Raspberry OS (Raspberry Pi 4 Model B)
  • Python: 3.11.2-1+b1
  • C compiler version: gcc 4:12.2.0-3, cmake 3.25.1-1
  • Pyfhel Version: master (latest version)
@skriesch skriesch added the bug label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant