Summary: | dev-python/pyzmq-26.0.2: fails to compile (error: initialization of ‘void **’ from incompatible pointer type ‘mutex_t **’ [-Wincompatible-pointer-types]) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | andrewammerlaan, mgorny |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/zeromq/pyzmq/issues/1988 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 870412 | ||
Attachments: | build.log |
Description
Sam James
2023-12-02 01:49:17 UTC
_CFFI_UNUSED_FN static void _cffi_checkfld__zhint(zhint *p) { /* only to generate compile-time warnings or errors */ (void)p; { void * *tmp = &p->sock; (void)tmp; } { void * *tmp = &p->mutex; (void)tmp; } (void)((p->id) | 0); /* check that 'zhint.id' is an integer */ } (In reply to Sam James from comment #1) > _CFFI_UNUSED_FN > static void _cffi_checkfld__zhint(zhint *p) > { > /* only to generate compile-time warnings or errors */ > (void)p; > { void * *tmp = &p->sock; (void)tmp; } > { void * *tmp = &p->mutex; (void)tmp; } > (void)((p->id) | 0); /* check that 'zhint.id' is an integer */ > } This is coming from cffi (or in this case, pypy's bundled/modified copy): dev-python/pypy3_10-exe-7.3.13_p2/work/pypy3.10-v7.3.13-src/lib_pypy/cffi/vengine_gen.py 272: prnt(' /* only to generate compile-time warnings or errors */') dev-python/pypy3_10-exe-7.3.13_p2/work/pypy3.10-v7.3.13-src/lib_pypy/cffi/vengine_cpy.py 484: prnt(' /* only to generate compile-time warnings or errors */') dev-python/pypy3_10-exe-7.3.13_p2/work/pypy3.10-v7.3.13-src/lib_pypy/cffi/recompiler.py 876: prnt(' /* only to generate compile-time warnings or errors */') I think it's a bug in pyzmq. buildutils/_cffi.c has: typedef struct _zhint { void *sock; mutex_t *mutex; size_t id; } zhint; zmq/backend/cffi/_cdefs.h has: typedef struct _zhint { void *sock; void *mutex; size_t id; } zhint; Could you try what happens if you change the types to match? Ugh. zmq/utils/mutex.h contains a definition of `mutex_t`, but we can't include "mutex.h", because: ``` <cdef source string>:1:1: Directives not supported yet ``` And I can't just copy/paste `mutex_t` in because it uses: a) pthread_mutex_t (which won't be defined, I imagine), b) a conditional definition for windows as well rather than pthread_mutex_t... so we need some solution in the build system and pass -D...? (like _cdefs.h does for ZMQ_FD_T?) gcc14_tinderbox has reproduced this issue with version 26.0.2 - Updating summary. |