Summary: | dev-python/pyzmq-26.0.3: 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: | RESOLVED FIXED | ||
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
![]() ![]() ![]() ![]() _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. gcc14_tinderbox has reproduced this issue with version 26.0.3 - Updating summary. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d942cabf868796005cd14dbab4838f3759d94e5 commit 7d942cabf868796005cd14dbab4838f3759d94e5 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2024-05-26 12:15:33 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2024-05-26 12:41:50 +0000 dev-python/pyzmq: Backport a GCC 14 build fix Closes: https://bugs.gentoo.org/918999 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-python/pyzmq/files/pyzmq-26.0.3-gcc14.patch | 53 +++++++++++++++++++++++++ dev-python/pyzmq/pyzmq-26.0.3.ebuild | 5 +++ 2 files changed, 58 insertions(+) |