Krita fails to build with many errors like "error: cannot convert ‘xsimd::batch<short unsigned int, xsimd::avx512vbmi>’ to ‘__m256i’" Reproducible: Always Steps to Reproduce: 1. emerge -1av media-gfx/krita $ emerge --info media-gfx/krita Portage 3.0.65 (python 3.12.4-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-14, glibc-2.39-r9, 6.10.0-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.10.0-gentoo-x86_64-AMD_Ryzen_9_7950X_16-Core_Processor-with-glibc2.39 KiB Mem: 131095840 total, 105294492 free KiB Swap: 205520892 total, 205402364 free Timestamp of repository gentoo: Fri, 19 Jul 2024 07:36:15 +0000 Head commit of repository gentoo: d1df532b6a1b96ffcf2f497d2081c44032fe3221 Timestamp of repository 4nykey: Mon, 15 Jul 2024 07:34:35 +0000 Head commit of repository 4nykey: d2e70d4eda54a9e4f6cbdb7244bef4e8066f101d Head commit of repository ai-gentoo: f09c7d45a9b1d6cfedd738571e8448e42e758871 Timestamp of repository brother-overlay: Mon, 08 Jul 2024 10:19:15 +0000 Head commit of repository brother-overlay: 181663c2a3e34a3fbac384c7173c3986ba5f7bb8 Timestamp of repository cg: Wed, 17 Jul 2024 14:04:19 +0000 Head commit of repository cg: d3fc5fce1acba05a0679e35b496c987925930589 Timestamp of repository guru: Thu, 18 Jul 2024 16:48:51 +0000 Head commit of repository guru: bcbc38da43b4746083c3de30c91ba80c04a58ca5 Timestamp of repository haarp: Mon, 15 Jul 2024 07:34:30 +0000 Head commit of repository haarp: 2c1169cbec1db85d6b94f21a6cad2d3a39dcecc3 Timestamp of repository kde: Sat, 13 Jul 2024 22:03:52 +0000 Head commit of repository kde: beeb87ba18fb5fbc105bc340b636a7b041a1984c Timestamp of repository lto-overlay: Fri, 12 Jul 2024 07:49:17 +0000 Head commit of repository lto-overlay: 2543e5109a53e9866be025290c583190976cb8b8 Timestamp of repository mv: Mon, 15 Jul 2024 07:34:30 +0000 Head commit of repository mv: 045f7390f05ea40e0125201fd3223e22369a9f3a Timestamp of repository qt: Fri, 12 Jul 2024 15:33:40 +0000 Head commit of repository qt: b1a94224bf1a3c60409d9d0edc8a5a66809ab58c Timestamp of repository science: Thu, 18 Jul 2024 11:49:05 +0000 Head commit of repository science: 3fd8abe1d7efbf62a704d9c080e1a3f16134fa5b Timestamp of repository wayland-desktop: Mon, 15 Jul 2024 21:03:58 +0000 Head commit of repository wayland-desktop: 7b7e4e639daf2a892aded65953615525584538da Head commit of repository zeule: e7e2a0c25fb8e3ac9c58290a0994358586874ee2 sh bash 5.2_p26-r8 ld GNU ld (Gentoo 2.42 p6) 2.42.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p26-r8::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo, 1.17-r1::gentoo dev-build/cmake: 3.30.1::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.5.0::gentoo dev-java/java-config: 2.3.4::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.11.9-r1::gentoo, 3.12.4_p2::gentoo, 3.13.0_beta4::gentoo dev-lang/rust-bin: 1.79.0::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/sandbox: 2.39::gentoo sys-apps/systemd: 256.2::gentoo sys-devel/binutils: 2.42-r2::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 17.0.6::gentoo, 18.1.8::gentoo sys-devel/gcc: 12.4.0::gentoo, 14.1.1_p20240622::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/lld: 17.0.6::gentoo, 18.1.8::gentoo sys-devel/llvm: 17.0.6-r2::gentoo, 18.1.8::gentoo sys-kernel/linux-headers: 6.9::gentoo (virtual/os-headers) sys-libs/glibc: 2.39-r9::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 volatile: False 4nykey location: /var/db/repos/4nykey sync-type: git sync-uri: https://github.com/gentoo-mirror/4nykey.git masters: gentoo volatile: False ai-gentoo location: /var/db/repos/ai-gentoo sync-type: git sync-uri: https://gitlab.ad.abberior-instruments.com/e.shalygin/ai-gentoo.git masters: gentoo volatile: True brother-overlay location: /var/db/repos/brother-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/brother-overlay.git masters: gentoo volatile: False cg location: /var/db/repos/cg sync-type: git sync-uri: https://github.com/gentoo-mirror/cg.git masters: gentoo volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False haarp location: /var/db/repos/haarp sync-type: git sync-uri: https://github.com/gentoo-mirror/haarp.git masters: gentoo volatile: False kde location: /var/db/repos/kde sync-type: git sync-uri: https://github.com/gentoo-mirror/kde.git masters: gentoo volatile: False local location: /var/db/repos/local masters: gentoo volatile: False lto-overlay location: /var/db/repos/lto-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/lto-overlay.git masters: gentoo mv volatile: False mv location: /var/db/repos/mv sync-type: git sync-uri: https://github.com/gentoo-mirror/mv.git masters: gentoo volatile: False qt location: /var/db/repos/qt sync-type: git sync-uri: https://github.com/gentoo-mirror/qt.git masters: gentoo volatile: False science location: /var/db/repos/science sync-type: git sync-uri: https://github.com/gentoo-mirror/science.git masters: gentoo volatile: False wayland-desktop location: /var/db/repos/wayland-desktop sync-type: git sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git masters: gentoo volatile: False xanf location: /home/eugene/develop/src/xanf/distribution/Gentoo/repository masters: gentoo volatile: True zeule location: /var/db/repos/zeule sync-type: git sync-uri: https://github.com/zeule/gentoo-zeule masters: gentoo qt kde guru mv lto-overlay brother-overlay volatile: False Binary Repositories: gentoobinhost priority: 1 sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf /usr/share/themes/oxygen-gtk/gtk-3.0" 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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --quiet-build --load-average=24 --keep-going --jobs=3" 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 -march=native -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr" FFLAGS="-O2 -march=native -pipe" GENTOO_MIRRORS="http://ftp.gwdg.de/pub/linux/gentoo/ http://mirror.netcologne.de/gentoo/" LANG="C.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" MAKEOPTS="-j24" PKGDIR="/var/cache/binpkgs" PORTAGE_COMPRESS="zstd" 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="/tmp" SHELL="/bin/zsh" USE="X a52 aac acl acpi activities alsa amd64 bash-completion bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dri dts dvd dvdr encode exif flac fontconfig gdbm gif gpm gtk gui heif iconv icu idn ipv6 jpeg jpegxl kde kerberos kf6 kf6compat kwallet lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg openexr opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline samba screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb v4l vaapi vorbis vulkan wayland widgets wxwidgets x264 x265 xattr xcb xft xml xv xvid zeroconf zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 aes avx avx2 avx512bw avx512cd avx512dq avx512f avx512vbmi avx512vl f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en en-GB uk" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeon radeonsi nvidia nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= media-gfx/krita-5.1.5::gentoo was built with the following: USE="gif gsl heif jpegxl mypaint-brush-engine openexr pdf raw -color-management -debug -fftw -qtmedia -test -webp" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11"
Created attachment 897989 [details] build log
Likely related to the following bug: https://bugs.kde.org/show_bug.cgi?id=488116 Fixed upstream.
(In reply to Russell Dwiggins from comment #2) > Likely related to the following bug: > https://bugs.kde.org/show_bug.cgi?id=488116 > > Fixed upstream. We have all this patches applied already, not reproducible on my system. But maybe upstream didn't give us the full picture. Sam, do we also need this patch to dev-cpp/xsimd here? https://invent.kde.org/dkazakov/krita-deps-management/-/blob/2bd71ad928d79666b4795360e072ca1d0d513117/ext_xsimd/0001-Fix-detection-of-SSE-AVX-AVX512-when-they-are-explic.patch
The problem is in the `-DCMAKE_DISABLE_FIND_PACKAGE_xsimd=OFF` cmake option. Krita is not supposed to be built without xsimd in production environment. This mode is supported only for testing purposes.
(In reply to Dmitry Kazakov from comment #4) > The problem is in the `-DCMAKE_DISABLE_FIND_PACKAGE_xsimd=OFF` cmake option. > Krita is not supposed to be built without xsimd in production environment. > This mode is supported only for testing purposes. Thanks Dmitry. I'll handle that. (In reply to Andreas Sturmlechner from comment #3) > (In reply to Russell Dwiggins from comment #2) > > Likely related to the following bug: > > https://bugs.kde.org/show_bug.cgi?id=488116 > > > > Fixed upstream. > We have all this patches applied already, not reproducible on my system. But > maybe upstream didn't give us the full picture. > > Sam, do we also need this patch to dev-cpp/xsimd here? > https://invent.kde.org/dkazakov/krita-deps-management/-/blob/ > 2bd71ad928d79666b4795360e072ca1d0d513117/ext_xsimd/0001-Fix-detection-of-SSE- > AVX-AVX512-when-they-are-explic.patch I'll take a look.
(In reply to Dmitry Kazakov from comment #4) > The problem is in the `-DCMAKE_DISABLE_FIND_PACKAGE_xsimd=OFF` cmake option. > Krita is not supposed to be built without xsimd in production environment. > This mode is supported only for testing purposes. You're misreading that. `-DCMAKE_DISABLE_FIND_PACKAGE_xsimd=OFF` means that xsimd is *enabled*, as can be seen in the attached build.log via IUSE xsimd (see also $summary). Prior to 5.2.2, xsimd had been permanently disabled and we never had a problem.
I still took it to mean "we should force it on or remove the USE flag" but yes, it's not the cause of this bug.
(In reply to Sam James from comment #7) > I still took it to mean "we should force it on or remove the USE flag" but > yes, it's not the cause of this bug. Yes, definitely follow upstream recommendations there, but for the time being the additional dependency has made building krita more brittle.
I've filed https://github.com/xtensor-stack/xsimd/issues/1044 upstream but it's not really clear to me what's happening.
I guess we'll have to package.use.mask this for now (effectively returning to pre-5.2.2 state) in order to continue here.
Hi, all! Could you check if this patch fixes the issue for you? https://invent.kde.org/graphics/krita/-/commit/cf2c74220b7edfae53a0715346cb4e2c7dfc38ae
(In reply to Dmitry Kazakov from comment #11) > Hi, all! > > Could you check if this patch fixes the issue for you? > > https://invent.kde.org/graphics/krita/-/commit/ > cf2c74220b7edfae53a0715346cb4e2c7dfc38ae Thank you Dmitry! That works!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=895559126b0565a22a085dccf087fa3b4bb2ad61 commit 895559126b0565a22a085dccf087fa3b4bb2ad61 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-08-26 23:36:27 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-08-26 23:36:27 +0000 media-gfx/krita: fix build w/ -march=znver4 & USE=xsimd Closes: https://bugs.gentoo.org/936296 Thanks-to: Dmitry Kazakov <dimula73@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> .../krita/files/krita-5.2.3-znver4-xsimd.patch | 38 ++++++++++++++++++++++ media-gfx/krita/krita-5.2.3.ebuild | 1 + 2 files changed, 39 insertions(+)