Bug 1221017

Summary: GCC 14: python-ruamel.yaml.clib package fails
Product: [openSUSE] openSUSE Tumbleweed Reporter: Michal Jireš <michal.jires>
Component: PythonAssignee: Python maintainers (group account) <python-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: daniel.garcia, mcepl
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1220571    

Description Michal Jireš 2024-03-06 07:38:03 UTC
Building python-ruamel.yaml.clib with GCC 14 fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/python-ruamel.yaml.clib/standard/x86_64

Due to (exhaustive list of errors):

_ruamel_yaml.c: In function ‘__pyx_pf_6ruamel_4yaml_4clib_12_ruamel_yaml_7CParser___init__’:
_ruamel_yaml.c:5929:52: error: passing argument 2 of ‘yaml_parser_set_input’ from incompatible pointer type [-Wincompatible-pointer-types]
 5929 |     yaml_parser_set_input((&__pyx_v_self->parser), __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_input_handler, ((void *)__pyx_v_self));
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                    |
      |                                                    int (*)(void *, char *, int,  int *)
In file included from _ruamel_yaml.h:2:
yaml.h:1370:30: note: expected ‘int (*)(void *, unsigned char *, size_t,  size_t *)’ {aka ‘int (*)(void *, unsigned char *, long unsigned int,  long unsigned int *)’} but argument is of type ‘int (*)(void *, char *, int,  int *)’
 1370 |         yaml_read_handler_t *handler, void *data);
      |         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/python3.9/bytesobject.h:75,
                 from /usr/include/python3.9/Python.h:92,
                 from _ruamel_yaml.c:16:
_ruamel_yaml.c: In function ‘__pyx_pf_6ruamel_4yaml_4clib_12_ruamel_yaml_8CEmitter___init__’:
_ruamel_yaml.c:16882:53: error: passing argument 2 of ‘yaml_emitter_set_output’ from incompatible pointer type [-Wincompatible-pointer-types]
16882 |   yaml_emitter_set_output((&__pyx_v_self->emitter), __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_output_handler, ((void *)__pyx_v_self));
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     int (*)(void *, char *, int)
yaml.h:1837:31: note: expected ‘int (*)(void *, unsigned char *, size_t)’ {aka ‘int (*)(void *, unsigned char *, long unsigned int)’} but argument is of type ‘int (*)(void *, char *, int)’
 1837 |         yaml_write_handler_t *handler, void *data);
      |         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1

See the meta bug#1220571 for more info.
Comment 1 Martin Jambor 2024-03-06 10:44:13 UTC
FTR, the corresponding Gentoo bug seems to be:
https://bugs.gentoo.org/880651

and it references an upstream PR:
https://sourceforge.net/p/ruamel-yaml-clib/code/merge-requests/3/
Comment 2 Matej Cepl 2024-03-06 13:16:10 UTC
Code is temporarily converted to git and stored on https://git.cepl.eu/cgit/packaging/ruamel-yaml-clib-code
Comment 3 Matej Cepl 2024-03-06 13:19:41 UTC
https://build.opensuse.org/request/show/1155565
Comment 4 Daniel Garcia 2024-05-06 11:01:18 UTC
This is fixed now.