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

Fails to build on 32 bit x86 #18

Open
ncopa opened this issue Nov 26, 2024 · 0 comments
Open

Fails to build on 32 bit x86 #18

ncopa opened this issue Nov 26, 2024 · 0 comments

Comments

@ncopa
Copy link

ncopa commented Nov 26, 2024

There seems to be some invalid assumptions about the long int * size corresponding int64, which is not the case on 32 bit. gcc 14 catches this.

I'm not sure how to properly define gint64, guint64_t and gsize for cython?

Compiling gbinder.pyx because it changed.
[1/1] Cythonizing gbinder.pyx
gbinder.c: In function '__pyx_pf_7gbinder_11RemoteReply_10read_int64':
gbinder.c:8784:75: error: passing argument 2 of 'gbinder_remote_reply_read_int64' from incompatible pointer type [-Wincompatible-pointer-types]
 8784 |   __pyx_v_status = gbinder_remote_reply_read_int64(__pyx_v_self->_reply, (&__pyx_v_value));
      |                                                                          ~^~~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           long int *
In file included from gbinder.c:1254:
/usr/include/gbinder/gbinder_remote_reply.h:73:13: note: expected 'gint64 *' {aka 'long long int *'} but argument is of type 'long int *'
   73 |     gint64* value);
      |     ~~~~~~~~^~~~~
gbinder.c: In function '__pyx_pf_7gbinder_11RemoteReply_12read_uint64':
gbinder.c:8931:76: error: passing argument 2 of 'gbinder_remote_reply_read_uint64' from incompatible pointer type [-Wincompatible-pointer-types]
 8931 |   __pyx_v_status = gbinder_remote_reply_read_uint64(__pyx_v_self->_reply, (&__pyx_v_value));
      |                                                                           ~^~~~~~~~~~~~~~~
      |                                                                            |
      |                                                                            long unsigned int *
/usr/include/gbinder/gbinder_remote_reply.h:78:14: note: expected 'guint64 *' {aka 'long long unsigned int *'} but argument is of type 'long unsigned int *'
   78 |     guint64* value);
      |     ~~~~~~~~~^~~~~
gbinder.c: In function '__pyx_pf_7gbinder_13RemoteRequest_20read_int64':
gbinder.c:19145:75: error: passing argument 2 of 'gbinder_remote_request_read_int64' from incompatible pointer type [-Wincompatible-pointer-types]
19145 |   __pyx_v_status = gbinder_remote_request_read_int64(__pyx_v_self->_req, (&__pyx_v_value));
      |                                                                          ~^~~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           long int *
In file included from gbinder.c:1255:
/usr/include/gbinder/gbinder_remote_request.h:95:13: note: expected 'gint64 *' {aka 'long long int *'} but argument is of type 'long int *'
   95 |     gint64* value);
      |     ~~~~~~~~^~~~~
gbinder.c: In function '__pyx_pf_7gbinder_13RemoteRequest_22read_uint64':
gbinder.c:19292:76: error: passing argument 2 of 'gbinder_remote_request_read_uint64' from incompatible pointer type [-Wincompatible-pointer-types]
19292 |   __pyx_v_status = gbinder_remote_request_read_uint64(__pyx_v_self->_req, (&__pyx_v_value));
      |                                                                           ~^~~~~~~~~~~~~~~
      |                                                                            |
      |                                                                            long unsigned int *
/usr/include/gbinder/gbinder_remote_request.h:100:14: note: expected 'guint64 *' {aka 'long long unsigned int *'} but argument is of type 'long unsigned int *'
  100 |     guint64* value);
      |     ~~~~~~~~~^~~~~
gbinder.c: In function '__pyx_pf_7gbinder_6Reader_10read_int64':
gbinder.c:32252:73: error: passing argument 2 of 'gbinder_reader_read_int64' from incompatible pointer type [-Wincompatible-pointer-types]
32252 |   __pyx_v_status = gbinder_reader_read_int64((&__pyx_v_self->_reader), (&__pyx_v_value));
      |                                                                        ~^~~~~~~~~~~~~~~
      |                                                                         |
      |                                                                         long int *
In file included from gbinder.c:1252:
/usr/include/gbinder/gbinder_reader.h:101:13: note: expected 'gint64 *' {aka 'long long int *'} but argument is of type 'long int *'
  101 |     gint64* value);
      |     ~~~~~~~~^~~~~
gbinder.c: In function '__pyx_pf_7gbinder_6Reader_12read_uint64':
gbinder.c:32368:74: error: passing argument 2 of 'gbinder_reader_read_uint64' from incompatible pointer type [-Wincompatible-pointer-types]
32368 |   __pyx_v_status = gbinder_reader_read_uint64((&__pyx_v_self->_reader), (&__pyx_v_value));
      |                                                                         ~^~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int *
/usr/include/gbinder/gbinder_reader.h:106:14: note: expected 'guint64 *' {aka 'long long unsigned int *'} but argument is of type 'long unsigned int *'
  106 |     guint64* value);
      |     ~~~~~~~~~^~~~~
gbinder.c: In function '__pyx_pf_7gbinder_6Reader_30read_hidl_vec':
gbinder.c:33430:75: error: passing argument 2 of 'gbinder_reader_read_hidl_vec' from incompatible pointer type [-Wincompatible-pointer-types]
33430 |   __pyx_v_value = gbinder_reader_read_hidl_vec((&__pyx_v_self->_reader), (&__pyx_v_count), (&__pyx_v_elemsize));
      |                                                                          ~^~~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           long unsigned int *
/usr/include/gbinder/gbinder_reader.h:161:12: note: expected 'gsize *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
  161 |     gsize* count,
      |     ~~~~~~~^~~~~
gbinder.c:33430:93: error: passing argument 3 of 'gbinder_reader_read_hidl_vec' from incompatible pointer type [-Wincompatible-pointer-types]
33430 |   __pyx_v_value = gbinder_reader_read_hidl_vec((&__pyx_v_self->_reader), (&__pyx_v_count), (&__pyx_v_elemsize));
      |                                                                                            ~^~~~~~~~~~~~~~~~~~
      |                                                                                             |
      |                                                                                             long unsigned int *
/usr/include/gbinder/gbinder_reader.h:162:12: note: expected 'gsize *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
  162 |     gsize* elemsize);
      |     ~~~~~~~^~~~~~~~
gbinder.c: In function '__pyx_pf_7gbinder_6Reader_32read_hidl_vec1':
gbinder.c:33603:76: error: passing argument 2 of 'gbinder_reader_read_hidl_vec1' from incompatible pointer type [-Wincompatible-pointer-types]
33603 |   __pyx_v_value = gbinder_reader_read_hidl_vec1((&__pyx_v_self->_reader), (&__pyx_v_count), __pyx_v_expected_elemsize);
      |                                                                           ~^~~~~~~~~~~~~~~
      |                                                                            |
      |                                                                            long unsigned int *
/usr/include/gbinder/gbinder_reader.h:167:12: note: expected 'gsize *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
  167 |     gsize* count,
      |     ~~~~~~~^~~~~
gbinder.c: In function '__pyx_pf_7gbinder_6Reader_48read_byte_array':
gbinder.c:34472:77: error: passing argument 2 of 'gbinder_reader_read_byte_array' from incompatible pointer type [-Wincompatible-pointer-types]
34472 |   __pyx_v_value = gbinder_reader_read_byte_array((&__pyx_v_self->_reader), (&__pyx_v_len));
      |                                                                            ~^~~~~~~~~~~~~
      |                                                                             |
      |                                                                             long unsigned int *
/usr/include/gbinder/gbinder_reader.h:227:12: note: expected 'gsize *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
  227 |     gsize* len); /* Since 1.0.12 */
      |     ~~~~~~~^~~
error: command '/usr/lib/ccache/bin/gcc' failed with exit code 1
algitbot pushed a commit to alpinelinux/aports that referenced this issue Nov 26, 2024
Fails to build with gcc 14 due to incompatible pointer types.

upstream: erfanoabdi/gbinder-python#18
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

1 participant