Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905173 - [guru] dev-util/DirectXShaderCompiler-1.7.2212: build fails with gcc-13 (declaration of ‘llvm::DxilV alueCache::WeakValueMap llvm::DxilValueCache::ValueMap’ changes meaning of ‘ValueMap’ [-Wchanges-meaning])
Summary: [guru] dev-util/DirectXShaderCompiler-1.7.2212: build fails with gcc-13 (decl...
Status: UNCONFIRMED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Reva Denis
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-04-27 14:12 UTC by YOSHIOKA Takuma
Modified: 2024-04-07 20:05 UTC (History)
5 users (show)

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


Attachments
build.log.gz (build.log.gz,36.11 KB, application/gzip)
2023-04-27 14:29 UTC, YOSHIOKA Takuma
Details
Backported PR 5179 from github (5179.patch,5.32 KB, patch)
2023-05-30 17:20 UTC, Kostadin Shishmanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description YOSHIOKA Takuma 2023-04-27 14:12:59 UTC
With the new version of gcc (sys-devel/gcc-13.1.0-r1), dev-util/DirectXShaderCompiler-1.7.2212::guru fails to compile due to the error below:

In file included from /var/tmp/portage/dev-util/DirectXShaderCompiler-1.7.2212/work/DirectXShaderCompiler-1.7.2212/lib/Transforms/Scalar/DxilLoopUnroll.cpp:87:
/var/tmp/portage/dev-util/DirectXShaderCompiler-1.7.2212/work/DirectXShaderCompiler-1.7.2212/include/llvm/Analysis/DxilValueCache.h:55:16: error: declaration of ‘llvm::DxilValueCache::WeakValueMap llvm::DxilValueCache::ValueMap’ changes meaning of ‘ValueMap’ [-Wchanges-meaning]
   55 |   WeakValueMap ValueMap;
      |                ^~~~~~~~


This is always reproducible.

`emerge --info`:

```
Portage 3.0.46 (python 3.11.3-final-0, default/linux/amd64/17.1/systemd/merged-usr, gcc-13, glibc-2.37-r2, 6.3.0-gentoo x86_64)
=================================================================
System uname: Linux-6.3.0-gentoo-x86_64-AMD_Ryzen_9_7950X_16-Core_Processor-with-glibc2.37
KiB Mem:    32003580 total,  10020912 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 27 Apr 2023 13:49:01 +0000
Head commit of repository gentoo: 1465c51991e7db6675ca9687c2e3ffddd67221e5

Head commit of repository gentoo-zh: 2a646f673d376030fb810dffa3d4778fd008b1f7

Timestamp of repository guru: Wed, 26 Apr 2023 09:46:42 +0000
Head commit of repository guru: 60aaa63b25156a81fd2a3f54f778af19aa1964ef

Timestamp of repository haskell: Tue, 25 Apr 2023 02:04:21 +0000
Head commit of repository haskell: 6d16edd61ab28740671c93b1a26e8f71dbb24962

sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p4) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.11.3::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.3::gentoo
dev-util/meson:            1.1.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-apps/systemd:          253.3::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-r4::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.2::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo, 13.1.0-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7::gentoo, 16.0.2::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.2::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    sync-user: portage
    priority: -1000
    eclass-overrides: lo48576
    volatile: False
    sync-git-verify-commit-signature: true

gentoo-zh
    location: /var/db/repos/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/microcai/gentoo-zh.git
    masters: gentoo
    priority: -100
    eclass-overrides: lo48576
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    eclass-overrides: lo48576
    volatile: False

haskell
    location: /var/db/repos/haskell
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/haskell.git
    masters: gentoo
    eclass-overrides: lo48576
    volatile: False

lo48576
    location: /var/db/repos/lo48576
    masters: gentoo
    priority: 100
    eclass-overrides: lo48576
    volatile: True

Installed sets: @fav/fonts, @packages/ansible, @packages/pipewire, @purpose/yubikey, @purpose/zeroconf, @system/core, @system/filesystem, @system/gentoo-utils, @system/xorg-basic-utils
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
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 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
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="-march=native -O2 -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 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="-march=native -O2 -pipe"
GENTOO_MIRRORS="     https://ftp.iij.ad.jp/pub/linux/gentoo     https://ftp.riken.jp/Linux/gentoo     https://ftp.jaist.ac.jp/pub/Linux/Gentoo     http://ftp.iij.ad.jp/pub/linux/gentoo     http://ftp.riken.jp/Linux/gentoo     http://ftp.jaist.ac.jp/pub/Linux/Gentoo     "
INSTALL_MASK=" /usr/bin/netaddr"
LANG="ja_JP.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j32"
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="/var/tmp"
SHELL="/bin/zsh"
USE="X aac acl acpi alsa amd64 apparmor avif bluetooth bluray bzip2 cairo cdr cjk cli crypt css curl dbus dri dvd dvdr egl exif ffmpeg flac fontconfig fortran gdbm gmp gnome-keyring gtk iconv icu inotify ipv6 jpeg jpeg2k lame libglvnd libnotify libtirpc linguas_en linguas_ja luajit lzma m17n-lib matroska mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp opus pam pcre pipewire png policykit pulseaudio readline screencast seccomp sqlite ssl startup-notification systemd taglib test-rust theora threads tiff tls truetype udev udisks unicode upower usb vaapi vorbis vulkan wavpack wayland wifi xattr xft xinerama xrandr zeroconf zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a 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" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en ja" 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" RUBY_TARGETS="ruby32" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev radeonsi" 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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, 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
```
Comment 1 YOSHIOKA Takuma 2023-04-27 14:29:37 UTC
Created attachment 860843 [details]
build.log.gz
Comment 2 Kostadin Shishmanov 2023-05-30 17:19:53 UTC
Upstream PR that fixes this issue: https://github.com/microsoft/DirectXShaderCompiler/pull/5179
Comment 3 Kostadin Shishmanov 2023-05-30 17:20:36 UTC
Created attachment 862907 [details, diff]
Backported PR 5179 from github
Comment 4 Mazunki Hoksaas 2024-03-09 03:04:19 UTC
This issue blocks =media-libs/amdvlk-2023.1.3 since its IUSE includes +raytracing which depends on this package, and the patch offered by Kostadin seems to work.

Currently there is a 1.7.2308 version upstream, which I would assume includes the merged patch, but bumping the version without any modification isn't as trivial as renaming the PV:

```sh
grep 'error:' /var/tmp/portage/dev-util/DirectXShaderCompiler-1.7.2308/temp/build.log
/var/tmp/portage/dev-util/DirectXShaderCompiler-1.7.2308/work/DirectXShaderCompiler-1.7.2308/tools/clang/lib/SPIRV/SpirvEmitter.cpp:14044:40: error: no matching function for call to ‘spvtools::Optimizer::RegisterPerformancePasses(bool&)’
/var/tmp/portage/dev-util/DirectXShaderCompiler-1.7.2308/work/DirectXShaderCompiler-1.7.2308/tools/clang/lib/SPIRV/SpirvEmitter.cpp:14087:39: error: no matching function for call to ‘spvtools::Optimizer::RegisterLegalizationPasses(bool&)’
```

I've pushed a revbump to 1.7.2212 including the patch, but I think the proper fix would be a version bump.