Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907605 - =media-tv/kodi-9999 failes to compile with swig.cpp:75:5: error: missing initializer for member '_typeobject::tp_watched' [-Werror=missing-field-initializers]
Summary: =media-tv/kodi-9999 failes to compile with swig.cpp:75:5: error: missing init...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-01 08:03 UTC by Steffen Hau
Modified: 2023-07-15 13:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Hau 2023-06-01 08:03:06 UTC
I'm not able to build kodi master anymore. 


FAILED: build/interfaces/python/CMakeFiles/python_interface.dir/swig.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++  -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999_build -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999 -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/lib -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/platform/linux -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/cores/VideoPlayer -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999_build/build -I/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/platform/posix -isystem /home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999_build/build/include -isystem /usr/include/dbus-1.0 -isystem /usr/lib64/dbus-1.0/include -isystem /usr/include/pipewire-0.3 -isystem /usr/include/spa-0.2 -isystem /usr/include/python3.12 -isystem /usr/include/libxml2 -isystem /home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999_build/build/cores/RetroPlayer/messages -isystem /usr/include/freetype2 -isystem /usr/include/fribidi -isystem /home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/contrib -isystem /usr/include/lzo -isystem /usr/include/libdrm  -march=native -O3 -pipe -flto=auto -DNDEBUG -Wall -Wdouble-promotion -Wmissing-field-initializers -Wsign-compare -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -std=c++17 -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE -DHAVE_LINUX_UDMABUF=1 -DHAVE_LINUX_DMA_HEAP=1 -DHAVE_LINUX_DMA_BUF=1 -DHAVE_MKOSTEMP=1 -DHAVE_LINUX_MEMFD=1 -DHAVE_STATX=1 -DHAVE_SSE=1 -DHAVE_SSE2=1 -DHAVE_SSE3=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 -DHAVE_SSE4_2=1 -DHAVE_AVX=1 -DHAVE_AVX2=1 -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64 -DHAS_POSIX_NETWORK -DHAS_LINUX_NETWORK -DHAS_BUILTIN_SYNC_ADD_AND_FETCH=1 -DHAS_BUILTIN_SYNC_SUB_AND_FETCH=1 -DHAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP=1 -DHAVE_INOTIFY=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_INTTYPES_H=1 -DHAS_ALSA=1 -DHAVE_LIBBLURAY=1 -DHAVE_LIBBLURAY_BDJ=1 -DHAVE_LIBCEC=1 -DHAS_DBUS=1 -DHAS_ISO9660PP=1 -DHAS_LIRC=1 -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1 -DHAS_PIPEWIRE=1 -DHAS_PULSEAUDIO=1 -DHAS_PYTHON=1 -DHAVE_LIBUDEV=1 -DHAS_UDFREAD=1 -DHAVE_LIBXSLT=1 -DHAVE_LIBVA=1 -DHAS_GLX=1 -DHAVE_NEW_CROSSGUID -DFFMPEG_VER_SHA=\"undef\" -DSPDLOG_FMT_EXTERNAL -DSPDLOG_DEBUG_ON -DSPDLOG_NO_ATOMIC_LEVELS -DSPDLOG_ENABLE_PATTERN_PADDING -DSPDLOG_COMPILED_LIB -DSPDLOG_SHARED_LIB -DHAVE_WAYLAND=1 -DHAVE_HDR_OUTPUT_METADATA=1 -DHAVE_DRM_MODIFIER_NAME=1 -DHAS_GL=1 -DHAS_EGL=1 -DHAVE_EGLEXTANGLE=1 -DHAVE_X11=1 -DHAVE_LIBXRANDR=1 -DHAS_MARIADB=1 -DHAS_DVD_DRIVE -DHAS_CDDA_RIPPER -DBIN_INSTALL_PATH=\"/usr/lib64/kodi\" -DINSTALL_PATH=\"/usr/share/kodi\" -Werror=double-promotion -Werror=missing-field-initializers -Werror=sign-compare -MD -MT build/interfaces/python/CMakeFiles/python_interface.dir/swig.cpp.o -MF build/interfaces/python/CMakeFiles/python_interface.dir/swig.cpp.o.d -o build/interfaces/python/CMakeFiles/python_interface.dir/swig.cpp.o -c /home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/interfaces/python/swig.cpp
/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/interfaces/python/swig.cpp: In constructor 'PythonBindings::TypeInfo::TypeInfo(const std::type_info&)':
/home/gentoo/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/interfaces/python/swig.cpp:75:5: error: missing initializer for member '_typeobject::tp_watched' [-Werror=missing-field-initializers]
   75 |     };
      |     ^
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.


 emerge --info kodi
Portage 3.0.47 (python 3.11.3-final-0, default/linux/amd64/23.0/systemd, gcc-13, glibc-2.37-r3, 6.3.0-HAUIHAU x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.3.0-HAUIHAU-x86_64-Intel-R-_Core-TM-_i5-10210U_CPU_@_1.60GHz-with-glibc2.37
KiB Mem:    32600300 total,  23418216 free
KiB Swap:   16777212 total,  11172184 free
Timestamp of repository gentoo: Wed, 31 May 2023 10:17:06 +0000
Head commit of repository gentoo: 6538bea7365700f42454917e73253a8565d11afa

sh bash 5.2_p15-r3
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r3::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.1-r2::gentoo
dev-lang/python:           3.11.3::gentoo, 3.12.0_beta1_p3::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-apps/systemd:          253.4::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.4::gentoo
sys-devel/gcc:             13.1.1_p20230527::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.4::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.4::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

hauihau
    location: /var/db/repos/hauihau
    masters: gentoo
    priority: 0
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -flto=auto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -O3 -pipe -flto=auto"
DISTDIR="/home/gentoo/distfiles/"
EMERGE_DEFAULT_OPTS="--autounmask=n --keep-going=y --quiet-build=y --quiet-fail=y --with-bdeps=y --changed-deps-report=n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://ftp.fau.de/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ https://ftp.gwdg.de/pub/linux/gentoo/"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--gc-sections"
LEX="flex"
LINGUAS="de"
MAKEOPTS="-j9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/home/gentoo/tmp/"
SHELL="/bin/bash"
USE="X a52 aac acl alsa amd64 avx avx2 bluetooth bluray branding bzip2 cairo caps cdda cddb crypt cups curl cxx dbus dri dts dv dvd egl encode exif ffmpeg flac fontconfig ftp gd gdbm gif gmp gstreamer iconv icu imlib ipv6 jpeg jpeg2k kde kerberos lame libcaca libnotify libsamplerate libtirpc lzma lzo mad matroska mmx mmxext mng mp3 mpeg mtp multilib musepack ncurses networkmanager nls nptl ogg openal opengl openmp opus pam pcre pdf pipewire png policykit pulseaudio qt5 quicktime readline screencast seccomp sndfile spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 svg systemd test-rust theora threads tiff truetype udev unicode upower usb v4l vaapi vcd vim-syntax vorbis wavpack wayland x264 xattr xinerama xml xmp xorg xpm xv xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby30 ruby31" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

media-tv/kodi-9999::hauihau was built with the following:
USE="X alsa bluetooth bluray caps cec css dav1d dbus lirc mariadb optical pipewire power-control pulseaudio (system-ffmpeg) udev udf upower userland_GNU vaapi wayland webserver xslt -airplay -eventclients -gbm -gles -lcms -libusb -mysql -nfs (-raspberry-pi) -samba -test -udisks -upnp -vdpau -zeroconf" ABI_X86="(64)" CPU_FLAGS_X86="avx avx2 sse sse2 sse3 sse4_1 sse4_2" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
CFLAGS="-march=native -O3 -pipe -flto=auto -DNDEBUG"
CXXFLAGS="-march=native -O3 -pipe -flto=auto -DNDEBUG"
FEATURES="distlocks sandbox ebuild-locks multilib-strict qa-unresolved-soname-deps metadata-transfer protect-owned userpriv parallel-fetch unknown-features-warn userfetch buildpkg-live pid-sandbox merge-sync unmerge-orphans strict fakeroot unmerge-logs ipc-sandbox usersync binpkg-dostrip sfperms usersandbox binpkg-logs config-protect-if-modified parallel-install assume-digests binpkg-docompress xattr network-sandbox preserve-libs news fixlafiles"




Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-01 08:07:13 UTC
This looks like an issue to report upstream. Would you mind doing that please?
Comment 2 Steffen Hau 2023-06-01 12:58:33 UTC
I will. I hoped to see others having the same issue because it may also be related to the system python, swig or other related things.
Comment 3 Steffen Hau 2023-07-13 08:57:37 UTC
(In reply to Sam James from comment #1)
> This looks like an issue to report upstream. Would you mind doing that
> please?

I have reported it upstream: https://github.com/xbmc/xbmc/issues/23503

It's an issue with the ebuild. We call cmake with
-DPYTHON_INCLUDE_DIR=/usr/include/python3.11
-DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so

But the FindPython.cmake from Kodi does not honor these params and calls findPackage(Python3 ...) which reports the highest found Python version (3.12 in this case):
- Found Python3: /usr/include/python3.12 (found version "3.12.0") found components: Development Development.Module Development.Embed
-- Found Python3: /usr/bin/python3.12 (found version "3.12.0") found components: Interpreter

Python 3.12 has that new member tp_watched, which then causes the issue.

Kodis FindPython.cmake instead is expecting PYTHON_PATH or PYTHON_VER. I tried to find a eclass function which may provide the right values but didn't find any in python-single-r1 or python-utils-r1. Kodi has now a fixfor that new  member, but if you have an idea how we can submit the right arguments to the cmake call, that would be great.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-13 09:30:43 UTC
Ah, good find, thanks. I think -DPYTHON_VER="${EPYTHON#python}" should be enough from reading their FindPython.cmake (it doesn't require PYTHON_DIR, it just uses it as a hint).
Comment 5 Larry the Git Cow gentoo-dev 2023-07-13 09:32:32 UTC
The bug has been closed via the following commit(s):

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

commit ea0d9ca351e58f7d50cd11ff2b3ca141d966d500
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-07-13 09:31:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-13 09:32:19 +0000

    media-tv/kodi: respect chosen Python for build
    
    Thanks to Steffen Hau for investigating.
    
    Closes: https://bugs.gentoo.org/907605
    Signed-off-by: Sam James <sam@gentoo.org>

 media-tv/kodi/kodi-9999.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 6 Steffen Hau 2023-07-13 21:32:47 UTC
(In reply to Sam James from comment #4)
> Ah, good find, thanks. I think -DPYTHON_VER="${EPYTHON#python}" should be
> enough from reading their FindPython.cmake (it doesn't require PYTHON_DIR,
> it just uses it as a hint).

Thank you for fixing it. Just two remarks from my side;
- you can remove the other two python related define
- you should backport the fix to the two other 19.xyz ebuilds
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-15 07:22:31 UTC
(In reply to Steffen Hau from comment #6)
> (In reply to Sam James from comment #4)
> > Ah, good find, thanks. I think -DPYTHON_VER="${EPYTHON#python}" should be
> > enough from reading their FindPython.cmake (it doesn't require PYTHON_DIR,
> > it just uses it as a hint).
> 
> Thank you for fixing it. Just two remarks from my side;
> - you can remove the other two python related define

You're right on this bit.

> - you should backport the fix to the two other 19.xyz ebuilds

When I very briefly skimmed the FindPython in those versions, it didn't seme to have these options?
Comment 8 Larry the Git Cow gentoo-dev 2023-07-15 07:25:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=869e0fcfcc3cc765e9e363dc470d3f7358a31511

commit 869e0fcfcc3cc765e9e363dc470d3f7358a31511
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-07-15 07:23:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-15 07:23:51 +0000

    media-tv/kodi: cleanup stale Python variables
    
    Bug: https://bugs.gentoo.org/907605
    Signed-off-by: Sam James <sam@gentoo.org>

 media-tv/kodi/kodi-9999.ebuild | 2 --
 1 file changed, 2 deletions(-)
Comment 9 Steffen Hau 2023-07-15 13:32:34 UTC
(In reply to Sam James from comment #7)
> (In reply to Steffen Hau from comment #6)
> > (In reply to Sam James from comment #4)
> > > Ah, good find, thanks. I think -DPYTHON_VER="${EPYTHON#python}" should be
> > > enough from reading their FindPython.cmake (it doesn't require PYTHON_DIR,
> > > it just uses it as a hint).
> > 
> > Thank you for fixing it. Just two remarks from my side;
> > - you can remove the other two python related define
> 
> You're right on this bit.
> 
> > - you should backport the fix to the two other 19.xyz ebuilds
> 
> When I very briefly skimmed the FindPython in those versions, it didn't seme
> to have these options?

You're right, they have reworked FindPython.cmake in Kodi 20.