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

Build on RHEL8.5/Python3.6 fails (numpy array issue?) #160

Open
ralphlange opened this issue Nov 22, 2024 · 1 comment
Open

Build on RHEL8.5/Python3.6 fails (numpy array issue?) #160

ralphlange opened this issue Nov 22, 2024 · 1 comment

Comments

@ralphlange
Copy link
Contributor

I'm building p4p as an EPICS module on a RHEL8.5 system with Python 3.6, numpy 1.14.3.

While a build of p4p 4.1.12 works fine, building 4.2.0 fails with:

/usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE       -DPY_ARRAY_UNIQUE_SYMBOL=PVXS_PyArray_API -DPVXS_ENABLE_EXPERT_API  -D__PYX_EXTERN_C=extern   -D_X86_64_  -DUNIX  -Dlinux      -O3 -g   -Wall    -Wno-unused-result -Wsign-compare  -std=c++11  -mtune=generic      -m64 -std=c++11  -fPIC -I. -I../O.Common -I. -I. -I.. -I../../include/compiler/gcc -I../../include/os/Linux -I../../include    -I/opt/codac-7.3/epics/include/compiler/gcc -I/opt/codac-7.3/epics/include/os/Linux -I/opt/codac-7.3/epics/include       -I/opt/codac-7.3/include   -I/usr/lib64/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c _p4p.cpp
[WARN] _p4p.cpp: In function ‘int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject*, Py_buffer*, int)’:
[ERROR] _p4p.cpp:18875:50: error: ‘NPY_C_CONTIGUOUS’ was not declared in this scope
[WARN] __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
[WARN] ^~~~~~~~~~~~~~~~
[WARN] _p4p.cpp:18875:50: note: suggested alternative: ‘PyBUF_C_CONTIGUOUS’
[WARN] __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
[WARN] ^~~~~~~~~~~~~~~~
[WARN] PyBUF_C_CONTIGUOUS
[ERROR] _p4p.cpp:18931:50: error: ‘NPY_F_CONTIGUOUS’ was not declared in this scope
[WARN] __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
[WARN] ^~~~~~~~~~~~~~~~
[WARN] _p4p.cpp:18931:50: note: suggested alternative: ‘PyBUF_F_CONTIGUOUS’
[WARN] __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
[WARN] ^~~~~~~~~~~~~~~~
[WARN] PyBUF_F_CONTIGUOUS
[ERROR] _p4p.cpp:19117:42: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘descr’
[WARN] __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
[WARN] ^~~~~
[WARN] In file included from /usr/include/python3.6m/pytime.h:6,
[WARN] from /usr/include/python3.6m/Python.h:77,
[WARN] from _p4p.cpp:4:
[WARN] _p4p.cpp: In function ‘void __pyx_f_5numpy_set_array_base(PyArrayObject*, PyObject*)’:
[ERROR] _p4p.cpp:20761:27: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘base’; did you mean ‘ob_base’?
[WARN] Py_XDECREF(__pyx_v_arr->base);
[WARN] ^~~~
[WARN] /usr/include/python3.6m/object.h:851:50: note: in definition of macro ‘Py_XDECREF’
[WARN] PyObject *_py_xdecref_tmp = (PyObject *)(op); \
[WARN] ^~
[ERROR] _p4p.cpp:20770:16: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘base’; did you mean ‘ob_base’?
[WARN] __pyx_v_arr->base = __pyx_v_baseptr;
[WARN] ^~~~
[WARN] ob_base
[WARN] _p4p.cpp: In function ‘PyObject* __pyx_f_5numpy_get_array_base(PyArrayObject*)’:
[ERROR] _p4p.cpp:20805:30: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘base’; did you mean ‘ob_base’?
[WARN] __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
[WARN] ^~~~
[WARN] ob_base
[WARN] In file included from /usr/include/python3.6m/pytime.h:6,
[WARN] from /usr/include/python3.6m/Python.h:77,
[WARN] from _p4p.cpp:4:
[ERROR] _p4p.cpp:20837:44: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘base’; did you mean ‘ob_base’?
[WARN] __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
[WARN] ^~~~
[WARN] /usr/include/python3.6m/object.h:786:19: note: in definition of macro ‘Py_INCREF’
[WARN] ((PyObject *)(op))->ob_refcnt++)
[WARN] ^~
[WARN] _p4p.cpp:20837:5: note: in expansion of macro ‘__Pyx_INCREF’
[WARN] __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
[WARN] ^~~~~~~~~~~~
[ERROR] _p4p.cpp:20838:41: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘base’; did you mean ‘ob_base’?
[WARN] __pyx_r = ((PyObject *)__pyx_v_arr->base);
[WARN] ^~~~
[WARN] ob_base
[WARN] make[2]: *** [/opt/codac-7.3/epics/configure/RULES_BUILD:267: _p4p.o] Error 1
[WARN] make[2]: *** Waiting for unfinished jobs....
[WARN] make[1]: *** [/opt/codac-7.3/epics/configure/RULES_ARCHS:58: install.linux-x86_64] Error 2
[WARN] make: *** [/opt/codac-7.3/epics/configure/RULES_DIRS:85: src.install] Error 2
make[2]: Leaving directory '.../p4p-4.2.0/src/O.linux-x86_64'

Looking at the commits, I assume some version requirement not being met, but I'm not sure which one.

@mdavidsaver
Copy link
Member

I'm building p4p as an EPICS module on a RHEL8.5 system with Python 3.6, numpy 1.14.3.

Which cython version?

This compilation error looks like a mis-match between numpy and cython.

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