Can't install h5py==3.1.0 with hdf5-1.13.1
envgap__h5py__h5py-2129
01 / FAILURE SIGNATURE
As reported upstream
/home/h5py-3.1.0/h5py/_errors.c:4274:44: error: ‘H5E_BADATOM’ undeclared (first use in this function); did you mean ‘H5E_BADITER’?
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
19d0450d37e8c3e3c361fdb411088f5047bc0568- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
h5py/h5py #2129 · read the original issue
* Operating System: Red Hat Enterprise Linux Server
* Python version 3.6.8
* <s> Where Python was acquired: Compiled from source </s>
* h5py version: 3.1.0
* HDF5 version 1.13.1
I am trying to install (or even build) h5py from source on a redhat server.
I compiled from source the hdf5 library, and I try to build the h5py module with the command:
```
HDF5_DIR=/home/hdf5-1.13.1/hdf5/ python3 setup.py build
```
I get the following stack, saying at the end the error: ‘H5E_BADATOM’ undeclared
```
running build
running build_py
running build_ext
********************************************************************************
Summary of the h5py configuration
HDF5 include dirs: [
'/home/hdf5-1.13.1/hdf5/include'
]
HDF5 library dirs: [
'/home/hdf5-1.13.1/hdf5/lib'
]
HDF5 Version: (1, 13, 1)
MPI Enabled: False
Rebuild Required: True
********************************************************************************
Executing cythonize()
[ 1/24] Cythonizing /home/h5py-3.1.0/h5py/_conv.pyx
[ 2/24] Cythonizing /home/h5py-3.1.0/h5py/_errors.pyx
[ 3/24] Cythonizing /home/h5py-3.1.0/h5py/_objects.pyx
[ 4/24] Cythonizing /home/h5py-3.1.0/h5py/_proxy.pyx
[ 5/24] Cythonizing /home/h5py-3.1.0/h5py/_selector.pyx
[ 6/24] Cythonizing /home/h5py-3.1.0/h5py/defs.pyx
[ 7/24] Cythonizing /home/h5py-3.1.0/h5py/h5.pyx
[ 8/24] Cythonizing /home/h5py-3.1.0/h5py/h5a.pyx
[ 9/24] Cythonizing /home/h5py-3.1.0/h5py/h5ac.pyx
[10/24] Cythonizing /home/h5py-3.1.0/h5py/h5d.pyx
[11/24] Cythonizing /home/h5py-3.1.0/h5py/h5ds.pyx
[12/24] Cythonizing /home/h5py-3.1.0/h5py/h5f.pyx
[13/24] Cythonizing /home/h5py-3.1.0/h5py/h5fd.pyx
[14/24] Cythonizing /home/h5py-3.1.0/h5py/h5g.pyx
[15/24] Cythonizing /home/h5py-3.1.0/h5py/h5i.pyx
[16/24] Cythonizing /home/h5py-3.1.0/h5py/h5l.pyx
[17/24] Cythonizing /home/h5py-3.1.0/h5py/h5o.pyx
[18/24] Cythonizing /home/h5py-3.1.0/h5py/h5p.pyx
[19/24] Cythonizing /home/h5py-3.1.0/h5py/h5pl.pyx
[20/24] Cythonizing /home/h5py-3.1.0/h5py/h5r.pyx
[21/24] Cythonizing /home/h5py-3.1.0/h5py/h5s.pyx
[22/24] Cythonizing /home/h5py-3.1.0/h5py/h5t.pyx
[23/24] Cythonizing /home/h5py-3.1.0/h5py/h5z.pyx
[24/24] Cythonizing /home/h5py-3.1.0/h5py/utils.pyx
building 'h5py.defs' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DH5_USE_18_API -DNPY_NO_DEPRECATED_API=0 -I./h5py -I/home/hdf5-1.13.1/hdf5/include -I/home/h5py-3.1.0/lzf -I/home/h5py-3.1.0/lzf/lzf -I/home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include -I/usr/include/python3.6m -c /home/h5py-3.1.0/h5py/defs.c -o build/temp.linux-x86_64-3.6/home/h5py-3.1.0/h5py/defs.o
In file included from /home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1788,
from /home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,
from /home/h5py-3.1.0/h5py/defs.c:661:
/home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/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 " \
^~~~~~~
/home/h5py-3.1.0/h5py/defs.c: In function ‘__pyx_f_4h5py_4defs_H5Pget_driver_info’:
/home/h5py-3.1.0/h5py/defs.c:26849:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
__pyx_v_r = H5Pget_driver_info(__pyx_v_plist_id);
^
gcc -pthread -shared -Wl,-z,relro -g build/temp.linux-x86_64-3.6/home/h5py-3.1.0/h5py/defs.o -L/home/hdf5-1.13.1/hdf5/lib -L/usr/lib64 -Wl,--enable-new-dtags,-R/home/hdf5-1.13.1/hdf5/lib -lhdf5 -lhdf5_hl -lpython3.6m -o build/lib.linux-x86_64-3.6/h5py/defs.cpython-36m-x86_64-linux-gnu.so
building 'h5py._errors' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DH5_USE_18_API -DNPY_NO_DEPRECATED_API=0 -I./h5py -I/home/hdf5-1.13.1/hdf5/include -I/home/h5py-3.1.0/lzf -I/home/h5py-3.1.0/lzf/lzf -I/home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include -I/usr/include/python3.6m -c /home/h5py-3.1.0/h5py/_errors.c -o build/temp.linux-x86_64-3.6/home/h5py-3.1.0/h5py/_errors.o
In file included from /home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1788,
from /home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,
from /home/h5py-3.1.0/h5py/_errors.c:661:
/home/h5py-3.1.0/.eggs/numpy-1.12.0-py3.6-linux-x86_64.egg/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 " \
^~~~~~~
/home/h5py-3.1.0/h5py/_errors.c: In function ‘__pyx_f_4h5py_7_errors_walk_cb’:
/home/h5py-3.1.0/h5py/_errors.c:1856:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
__pyx_t_3 = (__pyx_v_desc[0]).desc;
^
/home/h5py-3.1.0/h5py/_errors.c: In function ‘__pyx_f_4h5py_7_errors_set_exception’:
/home/h5py-3.1.0/h5py/_errors.c:1973:64: warning: passing argument 3 of ‘H5Ewalk2’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_t_1 = ((H5Ewalk(((hid_t)H5E_DEFAULT), H5E_WALK_UPWARD, __pyx_f_4h5py_7_errors_walk_cb, (&__pyx_v_err)) < 0) != 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/hdf5-1.13.1/hdf5/include/hdf5.h:26,
from /home/h5py-3.1.0/h5py/api_compat.h:27,
from /home/h5py-3.1.0/h5py/_errors.c:667:
/home/hdf5-1.13.1/hdf5/include/H5Epublic.h:491:80: note: expected ‘H5E_walk2_t’ {aka ‘int (*)(unsigned int, const struct H5E_error2_t *, void *)’} but argument is of type ‘herr_t (*)(int, H5E_error2_t *, void *)’ {aka ‘int (*)(int, struct H5E_error2_t *, void *)’}
H5_DLL herr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func, void *client_data);
~~~~~~~~~~~~^~~~
/home/h5py-3.1.0/h5py/_errors.c:2172:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
__pyx_t_8 = __pyx_v_err.err.desc;
^
/home/h5py-3.1.0/h5py/_errors.c:2223:66: warning: passing argument 3 of ‘H5Ewalk2’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_t_1 = ((H5Ewalk(((hid_t)H5E_DEFAULT), H5E_WALK_DOWNWARD, __pyx_f_4h5py_7_errors_walk_cb, (&__pyx_v_err)) < 0) != 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/hdf5-1.13.1/hdf5/include/hdf5.h:26,
from /home/h5py-3.1.0/h5py/api_compat.h:27,
from /home/h5py-3.1.0/h5py/_errors.c:667:
/home/hdf5-1.13.1/hdf5/include/H5Epublic.h:491:80: note: expected ‘H5E_walk2_t’ {aka ‘int (*)(unsigned int, const struct H5E_error2_t *, void *)’} but argument is of type ‘herr_t (*)(int, H5E_error2_t *, void *)’ {aka ‘int (*)(int, struct H5E_error2_t *, void *)’}
H5_DLL herr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func, void *client_data);
~~~~~~~~~~~~^~~~
/home/h5py-3.1.0/h5py/_errors.c:2255:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
__pyx_t_8 = __pyx_v_err.err.desc;
^
/home/h5py-3.1.0/h5py/_errors.c: In function ‘__pyx_pymod_exec__errors’:
/home/h5py-3.1.0/h5py/_errors.c:4274:44: error: ‘H5E_BADATOM’ undeclared (first use in this function); did you mean ‘H5E_BADITER’?
__pyx_t_2 = __Pyx_PyInt_From_H5E_minor_t(H5E_BADATOM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
^~~~~~~~~~~
H5E_BADITER
/home/h5py-3.1.0/h5py/_errors.c:4274:44: note: each undeclared identifier is reported only once for each function it appears in
error: command 'gcc' failed with exit status 1
```
My guess is that the commit from @[ajelenak](https://github.com/h5py/h5py/commits?author=ajelenak) committed on Apr 11, 2021 9909d4818043dc0be4c52c0676578d0e95c119c1 could fix my problem if it were backported into the h5py==3.1.0 version.
Do you have any thought ?
Thanks
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]