Clang 16 has a new error about incompatible function types, which shows up when building devel/py-ruamel.yaml.clib: _ruamel_yaml.c:3590:52: error: incompatible function pointer types passing 'int (void *, char *, int, int *)' to parameter of type 'yaml_read_handler_t *' (aka 'int (*)(void *, unsigned char *, unsigned long, unsigned long *)') [-Wincompatible-function-pointer-types] yaml_parser_set_input((&__pyx_v_self->parser), __pyx_f_12_ruamel_yaml_input_handler, ((void *)__pyx_v_self)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _ruamel_yaml.c:15301:53: error: incompatible function pointer types passing 'int (void *, char *, int)' to parameter of type 'yaml_write_handler_t *' (aka 'int (*)(void *, unsigned char *, unsigned long)') [-Wincompatible-function-pointer-types] yaml_emitter_set_output((&__pyx_v_self->emitter), __pyx_f_12_ruamel_yaml_output_handler, ((void *)__pyx_v_self)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It seems that _ruamel_yaml.c was originally generated from a rather old yaml.h interface header. I have looked upstream but it has not been updated there either, so for now patch the function signatures to match what is in our textproc/libyaml port.
Created attachment 242294 [details] devel/py-ruamel.yaml.clib: fix build with clang 16
LGTM. Please add the patch as patch-clang16. Thanks.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=98fd17ab866a916691388b5f6e801586329b9ba6 commit 98fd17ab866a916691388b5f6e801586329b9ba6 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-05-20 14:30:54 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-05-23 14:15:16 +0000 devel/py-ruamel.yaml.clib: fix build with clang 16 Clang 16 has a new error about incompatible function types, which shows up when building devel/py-ruamel.yaml.clib: _ruamel_yaml.c:3590:52: error: incompatible function pointer types passing 'int (void *, char *, int, int *)' to parameter of type 'yaml_read_handler_t *' (aka 'int (*)(void *, unsigned char *, unsigned long, unsigned long *)') [-Wincompatible-function-pointer-types] yaml_parser_set_input((&__pyx_v_self->parser), __pyx_f_12_ruamel_yaml_input_handler, ((void *)__pyx_v_self)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _ruamel_yaml.c:15301:53: error: incompatible function pointer types passing 'int (void *, char *, int)' to parameter of type 'yaml_write_handler_t *' (aka 'int (*)(void *, unsigned char *, unsigned long)') [-Wincompatible-function-pointer-types] yaml_emitter_set_output((&__pyx_v_self->emitter), __pyx_f_12_ruamel_yaml_output_handler, ((void *)__pyx_v_self)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It seems that _ruamel_yaml.c was originally generated from a rather old yaml.h interface header. I have looked upstream but it has not been updated there either, so for now patch the function signatures to match what is in our textproc/libyaml port. PR: 271531 Approved by: sunpoet (maintainer) MFH: 2023Q2 devel/py-ruamel.yaml.clib/Makefile | 1 + .../py-ruamel.yaml.clib/files/patch-clang16 (new) | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+)
The Cython files need to be updated as well, see: https://bugzilla.redhat.com/show_bug.cgi?id=2042422#c8 (We run Cython during the build.)