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

h5py build errors when building with gcc 14 #2379

Closed
befeleme opened this issue Feb 15, 2024 · 3 comments · Fixed by #2380
Closed

h5py build errors when building with gcc 14 #2379

befeleme opened this issue Feb 15, 2024 · 3 comments · Fixed by #2380
Milestone

Comments

@befeleme
Copy link

During the build of h5py with gcc 14 as RPM in Fedora Linux there appear errors that lead to a failed build.

To assist reproducing bugs, please include the following:

gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fexceptions -fexceptions -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fopenmp -fPIC -DH5_USE_110_API -DH5Rdereference_vers=2 -DNPY_NO_DEPRECATED_API=0 -Ih5py -I/builddir/build/BUILD/h5py-3.10.0/serial/lzf -I/usr/lib64/python3.12/site-packages/numpy/core/include -I/usr/include/python3.12 -c /builddir/build/BUILD/h5py-3.10.0/serial/h5py/h5l.c -o build/temp.linux-aarch64-cpython-312/builddir/build/BUILD/h5py-3.10.0/serial/h5py/h5l.o
/builddir/build/BUILD/h5py-3.10.0/serial/h5py/h5l.c: In function ‘__pyx_pf_4h5py_3h5l_9LinkProxy_12get_val’:
/builddir/build/BUILD/h5py-3.10.0/serial/h5py/h5l.c:8145:107: error: passing argument 4 of ‘__pyx_f_4h5py_4defs_H5Lunpack_elink_val’ from incompatible pointer type [-Wincompatible-pointer-types]
 8145 |       __pyx_t_2 = __pyx_f_4h5py_4defs_H5Lunpack_elink_val(__pyx_v_buf, __pyx_v_buf_size, (&__pyx_v_wtf), (&__pyx_v_ext_file_name), (&__pyx_v_ext_obj_name)); if (unlikely(__pyx_t_2 == ((herr_t)((herr_t)-1L)))) __PYX_ERR(1, 187, __pyx_L5_error)
      |                                                                                                          ~^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                           |
      |                                                                                                           char **
/builddir/build/BUILD/h5py-3.10.0/serial/h5py/h5l.c:8145:107: note: expected ‘const char **’ but argument is of type ‘char **’
/builddir/build/BUILD/h5py-3.10.0/serial/h5py/h5l.c:8145:133: error: passing argument 5 of ‘__pyx_f_4h5py_4defs_H5Lunpack_elink_val’ from incompatible pointer type [-Wincompatible-pointer-types]
 8145 |       __pyx_t_2 = __pyx_f_4h5py_4defs_H5Lunpack_elink_val(__pyx_v_buf, __pyx_v_buf_size, (&__pyx_v_wtf), (&__pyx_v_ext_file_name), (&__pyx_v_ext_obj_name)); if (unlikely(__pyx_t_2 == ((herr_t)((herr_t)-1L)))) __PYX_ERR(1, 187, __pyx_L5_error)
      |                                                                                                                                    ~^~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                     |
      |                                                                                                                                     char **
@tacaswell
Copy link
Member

This is is the generated cython code. What version of cython did you use?

@opoplawski
Copy link
Contributor

This is with cython 3.0.8. I think I have a fix.

@opoplawski
Copy link
Contributor

Well, that fixed that, but on to the next issue. This is only happening on i686:

/builddir/build/BUILD/h5py-3.10.0/serial/h5py/defs.c: In function ‘__pyx_f_4h5py_4defs_H5Dread_chunk’:
/builddir/build/BUILD/h5py-3.10.0/serial/h5py/defs.c:14922:85: error: passing argument 4 of ‘H5Dread_chunk’ from incompatible pointer type [-Wincompatible-pointer-types]
14922 |         __pyx_v_r = H5Dread_chunk(__pyx_v_dset_id, __pyx_v_dxpl_id, __pyx_v_offset, __pyx_v_filters, __pyx_v_buf);
      |                                                                                     ^~~~~~~~~~~~~~~
      |                                                                                     |
      |                                                                                     __pyx_t_5numpy_uint32_t * {aka long unsigned int *}
In file included from /usr/include/hdf5.h:25,
                 from /builddir/build/BUILD/h5py-3.10.0/serial/h5py/api_compat.h:27,
                 from /builddir/build/BUILD/h5py-3.10.0/serial/h5py/defs.c:1246:
/usr/include/H5Dpublic.h:1003:92: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘__pyx_t_5numpy_uint32_t *’ {aka ‘long unsigned int *’}
 1003 | H5_DLL herr_t H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters,
      |                                                                                  ~~~~~~~~~~^~~~~~~
/builddir/build/BUILD/h5py-3.10.0/serial/h5py/defs.c: In function ‘__pyx_f_4h5py_4defs_H5Pget_driver_info’:
/builddir/build/BUILD/h5py-3.10.0/serial/h5py/defs.c:31935:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
31935 |   __pyx_v_r = H5Pget_driver_info(__pyx_v_plist_id);
      |             ^

I'm not sure where the definition of __pyx_t_5numpy_uint32_t comes from.

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

Successfully merging a pull request may close this issue.

4 participants