Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 813228 - kde-plasma/kwin-5.22.5: error: invalid cast from type ‘long unsigned int’ to type ‘EGLNativeWindowType’ {aka ‘unsigned int’}
Summary: kde-plasma/kwin-5.22.5: error: invalid cast from type ‘long unsigned int’ to ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2021-09-15 11:05 UTC by David Flogeras
Modified: 2021-10-04 13:12 UTC (History)
1 user (show)

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


Attachments
Failed build.log (build.log.xz,50.38 KB, application/x-xz)
2021-09-15 11:07 UTC, David Flogeras
Details
Tested patch, compiles successfully (fix-kwin-5.22.5-compile-32bit.patch,626 bytes, patch)
2021-09-15 14:48 UTC, David Flogeras
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Flogeras 2021-09-15 11:05:33 UTC
May be a 32bit issue (long -> int).  emerge --info and full build.log coming up

Reproducible: Always
Comment 1 David Flogeras 2021-09-15 11:06:08 UTC
Portage 3.0.20 (python 3.9.6-final-0, default/linux/x86/17.0/desktop/plasma, gcc-10.3.0, glibc-2.33-r1, 5.10.61-gentoo i686)
=================================================================
System uname: Linux-5.10.61-gentoo-i686-Genuine_Intel-R-_CPU_T2500_@_2.00GHz-with-glibc2.33
KiB Mem:    65792280 total,  13395580 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 15 Sep 2021 09:30:01 +0000
Head commit of repository gentoo: df0c5533b5065d497a10707ef525fece2e0b6782
sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p5) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0::gentoo
dev-lang/python:          3.9.6_p2::gentoo
dev-lang/rust:            1.53.0::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.43.5::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r2::gentoo
sys-devel/gcc:            8.5.0-r1::gentoo, 9.4.0::gentoo, 10.3.0-r2::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="@FREE"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-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 /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch 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 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j12"
PKGDIR="/usr/portage/packages"
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="/var/tmp"
USE="X a52 aac acl acpi activities alsa bluetooth branding bzip2 cairo cdda cdr cli crypt dbus declarative dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif gpm gtk gui iconv icu jpeg kde kipi kwallet lcms libglvnd libnotify libtirpc mad mng mozbranding mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf plasma png policykit ppds qml qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 x86 xattr xcb xinerama xml xv xvid zlib" ABI_X86="32" ADA_TARGET="gnat_2018" 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="mmx mmxext sse sse2 sse3" 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="pc" INPUT_DEVICES="evdev libinput synaptics" KERNEL="linux" L10N="en" 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-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="nouveau" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 2 David Flogeras 2021-09-15 11:07:26 UTC
Created attachment 739404 [details]
Failed build.log
Comment 3 Andreas Sturmlechner gentoo-dev 2021-09-15 14:32:21 UTC
From upstream:
> if you replace unsigned long with uintptr_t, does kwin build?
Comment 4 David Flogeras 2021-09-15 14:48:08 UTC
Created attachment 739410 [details, diff]
Tested patch, compiles successfully
Comment 5 Andreas Sturmlechner gentoo-dev 2021-09-15 17:16:14 UTC
Thanks for testing.
Comment 6 Larry the Git Cow gentoo-dev 2021-09-15 17:42:25 UTC
The bug has been closed via the following commit(s):

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

commit 098f5a7919fe1d090eaf56b6b6b95e9dc7e1ad39
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-15 17:41:53 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-15 17:42:02 +0000

    kde-plasma/kwin: Fix build on x86
    
    Tested-by: David Flogeras <dflogeras2@gmail.com>
    Closes: https://bugs.gentoo.org/813228
    Package-Manager: Portage-3.0.23, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 kde-plasma/kwin/files/kwin-5.22.5-32bit.patch | 29 +++++++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.22.5.ebuild            |  5 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
Comment 7 Larry the Git Cow gentoo-dev 2021-09-21 18:44:31 UTC
The bug has been referenced in the following commit(s):

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

commit bb0d4f0f8e79ae8fb203418417177378231497db
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-19 14:01:55 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-21 18:43:44 +0000

    kde-plasma/kwin: Fix build on 32-bit
    
    Upstream commits:
    38e24ecd6416a975db0989c21b70d6a4cc242f35
    e26ea6bf2313c021db7e5ca5454cd8b1e2e2037f
    
    Bug: https://bugs.gentoo.org/810511
    Bug: https://bugs.gentoo.org/813228
    Package-Manager: Portage-3.0.23, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 kde-plasma/kwin/files/kwin-5.22.5-32bit.patch      | 29 ----------------------
 .../kwin/files/kwin-5.22.5-libglvnd-1.3.4.patch    |  6 ++++-
 kde-plasma/kwin/kwin-5.22.5.ebuild                 |  3 +--
 3 files changed, 6 insertions(+), 32 deletions(-)
Comment 8 David Flogeras 2021-10-04 00:34:50 UTC
Not sure the final patch is good.  I just went to update another 32bit machine, and get a similar error

/var/tmp/portage/kde-plasma/kwin-5.22.5/work/kwin-5.22.5/src/plugins/platforms/x
11/common/eglonxbackend.cpp: In member function ‘void* KWin::EglOnXBackend::crea
teSurface(xcb_window_t)’:
/var/tmp/portage/kde-plasma/kwin-5.22.5/work/kwin-5.22.5/src/plugins/platforms/x
11/common/eglonxbackend.cpp:228:66: error: invalid cast from type ‘Window’ {aka 
‘long unsigned int’} to type ‘EGLNativeWindowType’ {aka ‘unsigned int’}
  228 |         surface = eglCreateWindowSurface(eglDisplay(), config(), reinter
pret_cast<EGLNativeWindowType>(nativeWindow), nullptr);
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-04 00:41:03 UTC
(In reply to David Flogeras from comment #8)
> Not sure the final patch is good.  I just went to update another 32bit
> machine, and get a similar error
> 
> /var/tmp/portage/kde-plasma/kwin-5.22.5/work/kwin-5.22.5/src/plugins/
> platforms/x
> 11/common/eglonxbackend.cpp: In member function ‘void*
> KWin::EglOnXBackend::crea
> teSurface(xcb_window_t)’:
> /var/tmp/portage/kde-plasma/kwin-5.22.5/work/kwin-5.22.5/src/plugins/
> platforms/x
> 11/common/eglonxbackend.cpp:228:66: error: invalid cast from type ‘Window’
> {aka 
> ‘long unsigned int’} to type ‘EGLNativeWindowType’ {aka ‘unsigned int’}
>   228 |         surface = eglCreateWindowSurface(eglDisplay(), config(),
> reinter
> pret_cast<EGLNativeWindowType>(nativeWindow), nullptr);

Could you share teh full log and emerge --info? Worth checking got latest copy of the tree.
Comment 10 Andreas Sturmlechner gentoo-dev 2021-10-04 07:33:52 UTC
Found a new related commit: https://invent.kde.org/plasma/kwin/-/commit/df11acd46778e1e43183c2660bc9dcb1a8ad3282
Comment 11 David Flogeras 2021-10-04 11:27:15 UTC
Thanks guys, can confirm that the aforementioned patch (comment 10) on top of the in-tree 5.22.5.ebuild compiles on 32bit x86 again.

Sorry for being a PITA :)
Comment 12 Larry the Git Cow gentoo-dev 2021-10-04 13:12:56 UTC
The bug has been closed via the following commit(s):

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

commit e5f1554d74e6ef57cf96b7ba67f361c784e645d1
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-10-04 12:35:58 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-10-04 13:12:42 +0000

    kde-plasma/kwin: Fix build on problematic platforms
    
    Upstream commit df11acd46778e1e43183c2660bc9dcb1a8ad3282
    
    Reported-by: David Flogeras <dflogeras2@gmail.com>
    Closes: https://bugs.gentoo.org/813228
    Package-Manager: Portage-3.0.26, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../kwin/files/kwin-5.22.5-libglvnd-1.3.4.patch    | 35 +++++++++++++++-------
 1 file changed, 25 insertions(+), 10 deletions(-)