Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 880651

Summary: dev-python/ruamel-yaml-clib-0.2.7 - _ruamel_yaml.c: error: incompatible function pointer types passing int (void , char , int, int
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Marek Szuba <marecki>
Status: RESOLVED FIXED    
Severity: normal CC: plevine457, proxy-maint, python, sam, zoltan
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=907232
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: emerge-info.txt
dev-python:ruamel-yaml-clib-0.2.7:20221109-160522.log
emerge-history.txt
environment
etc.clang.tar.bz2
etc.portage.tar.bz2
temp.tar.bz2
ruamel-yaml-clib-0.2.7-clang-16.patch
ruamel-yaml-clib-0.2.7-clang-16.patch

Description Toralf Förster gentoo-dev 2022-11-09 19:27:56 UTC
          ^
_ruamel_yaml.c:2060:17: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  __pyx_v_value = yaml_get_version_string();
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
_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 *)') [-Werror,-Wincompatible-function-pointer-types]
    yaml_parser_set_input((&__pyx_v_self->parser), __pyx_f_12_ruamel_yaml_input_handler, ((void *)__pyx_v_self));
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome-j4-20221109-090003

  -------------------------------------------------------------------

GNUMAKEFLAGS="$GNUMAKEFLAGS --jobserver-style=pipe"
GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle"
CC=clang
CXX=clang++
gcc-config -l:
 [1] x86_64-pc-linux-gnu-12 *
clang/llvm (if any):
clang version 15.0.4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/15
15.0.4
Python 3.10.8
Available Rust versions:
  [1]   rust-bin-1.64.0 *
php cli (if any):

  HEAD of ::gentoo
commit 13b7b1255ae6125608899908b118a34f8a8347f1
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Nov 9 14:16:53 2022 +0000

    2022-11-09 14:16:52 UTC

emerge -qpvO dev-python/ruamel-yaml-clib
[ebuild  N    ] dev-python/ruamel-yaml-clib-0.2.7  PYTHON_TARGETS="python3_10 -pypy3 -python3_8 -python3_9 -python3_11"
Comment 1 Toralf Förster gentoo-dev 2022-11-09 19:27:58 UTC
Created attachment 830169 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-11-09 19:27:59 UTC
Created attachment 830171 [details]
dev-python:ruamel-yaml-clib-0.2.7:20221109-160522.log
Comment 3 Toralf Förster gentoo-dev 2022-11-09 19:28:00 UTC
Created attachment 830173 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2022-11-09 19:28:02 UTC
Created attachment 830175 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2022-11-09 19:28:03 UTC
Created attachment 830177 [details]
etc.clang.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-11-09 19:28:04 UTC
Created attachment 830179 [details]
etc.portage.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-11-09 19:28:05 UTC
Created attachment 830181 [details]
temp.tar.bz2
Comment 8 Peter Levine 2022-11-10 02:35:13 UTC
Created attachment 830253 [details, diff]
ruamel-yaml-clib-0.2.7-clang-16.patch

Upstream PR: https://sourceforge.net/p/ruamel-yaml-clib/code/merge-requests/3/
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-10 02:40:44 UTC
(In reply to Peter Levine from comment #8)
> Created attachment 830253 [details, diff] [details, diff]
> ruamel-yaml-clib-0.2.7-clang-16.patch
> 
> Upstream PR:
> https://sourceforge.net/p/ruamel-yaml-clib/code/merge-requests/3/

Thanks for both fixing & sending upstream.
Comment 10 Larry the Git Cow gentoo-dev 2022-11-10 22:55:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26295868e9b7dfaf330dcc979d9510a24dfe06aa

commit 26295868e9b7dfaf330dcc979d9510a24dfe06aa
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2022-11-10 22:54:58 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2022-11-10 22:54:58 +0000

    dev-python/ruamel-yaml-clib: fix clang-16 build error
    
    Thanks-to: Peter Levine <plevine457@gmail.com>
    Closes: https://bugs.gentoo.org/880651
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 .../files/ruamel-yaml-clib-0.2.7-clang-16.patch    | 34 ++++++++++++++++++++++
 .../ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild |  4 +++
 2 files changed, 38 insertions(+)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-27 02:39:02 UTC
(In reply to Sam James from comment #9)
> (In reply to Peter Levine from comment #8)
> > Created attachment 830253 [details, diff] [details, diff] [details, diff]
> > ruamel-yaml-clib-0.2.7-clang-16.patch
> > 
> > Upstream PR:
> > https://sourceforge.net/p/ruamel-yaml-clib/code/merge-requests/3/
> 
> Thanks for both fixing & sending upstream.

The patch here is for the cython-generated sources rather than the real source.
Comment 12 Larry the Git Cow gentoo-dev 2023-05-27 02:44:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d3d6ac7e5935463fd877b6b31c3605dbd16af96

commit 8d3d6ac7e5935463fd877b6b31c3605dbd16af96
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-27 02:43:37 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-27 02:44:28 +0000

    dev-python/ruamel-yaml-clib: fix cythonize call to always regenerate
    
    Ionen took a look and ended up spotting that it wasn't really regenerating it
    (and that the Clang 16 patch is touching only the generated sources, so is being
    overwritten now).
    
    Also, while here, I noticed it doesn't respect MAKEOPTS, so fix that.
    
    Now Python 3.12 builds again.
    
    Bug: https://bugs.gentoo.org/880651
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/ruamel-yaml-clib-0.2.7-clang-16.patch    | 34 ----------------------
 .../ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild |  8 ++---
 2 files changed, 2 insertions(+), 40 deletions(-)
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-27 02:45:41 UTC
(In reply to Sam James from comment #11)
> (In reply to Sam James from comment #9)
> > (In reply to Peter Levine from comment #8)
> > > Created attachment 830253 [details, diff] [details, diff] [details, diff] [details, diff]
> > > ruamel-yaml-clib-0.2.7-clang-16.patch
> > > 
> > > Upstream PR:
> > > https://sourceforge.net/p/ruamel-yaml-clib/code/merge-requests/3/
> > 
> > Thanks for both fixing & sending upstream.
> 
> The patch here is for the cython-generated sources rather than the real
> source.

... so reopening. Peter, could you fix the .pyx?
Comment 14 Peter Levine 2023-05-31 08:25:40 UTC
Created attachment 862957 [details, diff]
ruamel-yaml-clib-0.2.7-clang-16.patch

OK. This only patches _ruamel_yaml.pxd and _ruamel_yaml.pyx.  It builds fine with clang-16.0.4 and gcc-12.3.1_p20230519 but I have little experience with cython and bindings so you might want to confirm it works on your end.
Comment 15 Peter Levine 2023-06-01 08:14:45 UTC
updated upstream PR: https://sourceforge.net/p/ruamel-yaml-clib/code/merge-requests/4/
Comment 16 Larry the Git Cow gentoo-dev 2023-08-20 12:51:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e656f10919ab3442cdbc868b932a1aa37d6d350

commit 0e656f10919ab3442cdbc868b932a1aa37d6d350
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2023-08-20 12:50:29 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2023-08-20 12:51:44 +0000

    dev-python/ruamel-yaml-clib: support building with -Werror=incompatible-function-pointer-types
    
    Closes: https://bugs.gentoo.org/880651
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 ...amel-yaml-clib-0.2.7_cython_pointer_types.patch | 75 ++++++++++++++++++++++
 .../ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild |  4 ++
 2 files changed, 79 insertions(+)