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

0.12.0: Fails to build: error: incompatible integer to pointer conversion assigning to 'void **' from 'int' #99

Open
yurivict opened this issue Jul 14, 2024 · 1 comment

Comments

@yurivict
Copy link

/usr/local/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^
lib/bx/arrays/array_tree.c:4772:13: warning: call to undeclared function 'PyDataType_ELSIZE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4772 |   __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:4806:13: warning: call to undeclared function 'PyDataType_ALIGNMENT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4806 |   __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:4844:15: warning: call to undeclared function 'PyDataType_FIELDS'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4844 |   __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
      |               ^
lib/bx/arrays/array_tree.c:4844:13: error: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
 4844 |   __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
      |             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/bx/arrays/array_tree.c:4886:15: warning: call to undeclared function 'PyDataType_NAMES'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4886 |   __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
      |               ^
lib/bx/arrays/array_tree.c:4886:13: error: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
 4886 |   __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
      |             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/bx/arrays/array_tree.c:4924:13: warning: call to undeclared function 'PyDataType_SUBARRAY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4924 |   __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:4924:11: error: incompatible integer to pointer conversion assigning to 'PyArray_ArrayDescr *' (aka 'struct _arr_descr *') from 'int' [-Wint-conversion]
 4924 |   __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
      |           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/bx/arrays/array_tree.c:4958:13: warning: call to undeclared function 'PyDataType_FLAGS'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4958 |   __pyx_r = PyDataType_FLAGS(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:4992:13: warning: call to undeclared function 'PyArray_MultiIter_NUMITER'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4992 |   __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:5026:13: warning: call to undeclared function 'PyArray_MultiIter_SIZE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 5026 |   __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:5060:13: warning: call to undeclared function 'PyArray_MultiIter_INDEX'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 5060 |   __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:5094:13: warning: call to undeclared function 'PyArray_MultiIter_NDIM'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 5094 |   __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:5128:13: warning: call to undeclared function 'PyArray_MultiIter_DIMS'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 5128 |   __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:5128:11: error: incompatible integer to pointer conversion assigning to 'npy_intp *' (aka 'long *') from 'int' [-Wint-conversion]
 5128 |   __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
      |           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/bx/arrays/array_tree.c:5162:13: warning: call to undeclared function 'PyArray_MultiIter_ITERS'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 5162 |   __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
      |             ^
lib/bx/arrays/array_tree.c:5162:11: error: incompatible integer to pointer conversion assigning to 'void **' from 'int' [-Wint-conversion]
 5162 |   __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
      |           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 warnings and 5 errors generated.

FreeBSD 14.0
Python-3.11

@nsoranzo
Copy link
Collaborator

Thanks for reporting the issue. Can you also let us know the numpy version and which compiler and version you are using?

The bx_python-0.12.0.tar.gz sdist from PyPI contains C files built with Cython and numpy 2.0, so it should be possible to install it with numpy >=1.25 (the oldest numpy release to support Python 3.9).
If you are using an older numpy, gcc will consider -Wimplicit-function-declaration and -Wint-conversion as warnings and not errors and install bx-python 0.12.0 fine, so I suppose you are using clang as compiler.
A workaround for your case should be to unpack the bx_python-0.12.0.tar.gz sdist, then:

$ cd bx_python-0.12.0/
$ python3 setup.py build_ext --force
$ python3 -m pip install .

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