I tried to run sway on nvidia drivers with WLR_RENDERER=vulkan, but it didn't work. So I ran it with VK_LOADER_DEBUG=all, which printed the following lines: (I will attach the whole log) - /usr/lib64/libVkLayer_utils.so: undefined symbol: custom_stype_info - Requested layer "VK_LAYER_KHRONOS_validation" failed to load! However, media-libs/vulkan-layers are built with X and wayland USE flags. I ran 'nm /usr/lib64/libVkLayer_utils.so' and 'nm /usr/lib64/libVkLayer_khronos_validation.so', and it showed that they haven't got any symbols: - nm: /usr/lib64/libVkLayer_khronos_validation.so: no symbols - nm: /usr/lib64/libVkLayer_utils.so: no symbols They're valid, as file says: - /usr/lib64/libVkLayer_utils.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped - /usr/lib64/libVkLayer_khronos_validation.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped 'vkcube --validate' fails too, with the same error. But just 'vkcube' runs fine. Reproducible: Always Steps to Reproduce: 1. Install proprietary nvidia drivers 2. Install media-libs/vulkan-layers-1.3.239 3. Try to run 'vkcube --validate' Actual Results: /usr/lib64/libVkLayer_utils.so: undefined symbol: custom_stype_info Expected Results: I expected it to work. Portage 3.0.44 (python 3.10.10-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.36-r7, 6.1.12-gentoo-kelvium x86_64) ================================================================= System uname: Linux-6.1.12-gentoo-kelvium-x86_64-Intel-R-_Xeon-R-_CPU_E5-2650_v3_@_2.30GHz-with-glibc2.36 KiB Mem: 16303116 total, 12089120 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sun, 19 Feb 2023 06:00:01 +0000 Head commit of repository gentoo: fe0c7b48ed6b16447e9522911fdcc0e4505abf3d Timestamp of repository guru: Fri, 17 Feb 2023 14:02:19 +0000 Head commit of repository guru: dd95ab3abc229844c1ad5c9bead61f593550a920 Timestamp of repository steam-overlay: Tue, 07 Feb 2023 14:47:33 +0000 Head commit of repository steam-overlay: 8121a25bc99056e35ab2dd7924bb01ad8f80df8d Timestamp of repository zugaina: Tue, 19 Jul 2022 00:31:49 +0000 Head commit of repository zugaina: d71b224f2cf0478022f7e13d54f1751cc7148c74 sh bash 5.2_p15-r2 ld GNU ld (Gentoo 2.40 p2) 2.40.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p15-r2::gentoo dev-lang/perl: 5.36.0-r2::gentoo dev-lang/python: 3.10.10_p1::gentoo, 3.11.2_p1::gentoo dev-lang/rust-bin: 1.67.1::gentoo dev-util/cmake: 3.25.2::gentoo dev-util/meson: 1.0.0::gentoo sys-apps/baselayout: 2.13-r1::gentoo sys-apps/openrc: 0.46::gentoo sys-apps/sandbox: 2.30-r1::gentoo sys-devel/autoconf: 2.71-r5::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.40-r1::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 12.2.1_p20230121-r1::gentoo sys-devel/gcc-config: 2.10::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/llvm: 15.0.7::gentoo sys-devel/make: 4.4::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.36-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: True steam-overlay location: /var/db/repos/steam-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/steam-overlay.git masters: gentoo volatile: True zugaina location: /var/db/repos/zugaina sync-type: git sync-uri: https://github.com/gentoo-mirror/zugaina.git masters: gentoo volatile: True ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=haswell -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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/sandbox.d /etc/terminfo" CXXFLAGS="-march=haswell -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=haswell -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=haswell -O2 -pipe" GENTOO_MIRRORS="https://mirror.yandex.ru/gentoo-distfiles/" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j16" 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/bash" USE="X acl alsa amd64 bzip2 cli crypt dbus dri elogind fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl opengl openmp pam pcre policykit readline screencast seccomp split-usr ssl test-rust udev unicode vaapi vdpau vulkan wayland xattr zlib" 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 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" INPUT_DEVICES="libinput" KERNEL="linux" 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_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="nvidia 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: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, 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, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 852792 [details] VK_LOADER_DEBUG=all WLR_RENDERER=vulkan sway --unsupported-gpu
Oops, the attachment got dumped wrong..
Created attachment 852794 [details] vulkaninfo
Created attachment 852796 [details] VK_LOADER_DEBUG=all WLR_RENDERER=vulkan sway --unsupported-gpu
vkcube --validate seems to work fine with stable vulkan-layers-1.3.236-r1, but not with 239 where I get the same stype thing (I'm on nvidia too, not that nvidia would have any relation with what the libraries contain, it's not used when building). I'd guess may be related to the shared build that got changed around in 239, sarnex may know better. Interestingly 239 gives me a 3MB utils.so (stripped), and 236 is only 102kB? (you'd think it'd be the other way around if something is missing). That aside, nm reporting "no symbols" is normal because you haven't used -D (dynamic, for shared libs). Haven't tried sway, wouldn't use it as a reference for issues with nvidia (it works when the stars align at best). But you could try to downgrade the stable 1.3.236 vulkan stack to see if it's really this (annoyingly need to downgrade the entire stack to 1.3.236, glslang, vulkan-layers, vulkan-headers, etc... or portage will complaint)
(In reply to Ionen Wolkens from comment #5) > vkcube --validate seems to work fine with stable vulkan-layers-1.3.236-r1, > but not with 239 where I get the same stype thing (I'm on nvidia too, not > that nvidia would have any relation with what the libraries contain, it's > not used when building). > > I'd guess may be related to the shared build that got changed around in 239, > sarnex may know better. Interestingly 239 gives me a 3MB utils.so > (stripped), and 236 is only 102kB? (you'd think it'd be the other way around > if something is missing). > > That aside, nm reporting "no symbols" is normal because you haven't used -D > (dynamic, for shared libs). > > Haven't tried sway, wouldn't use it as a reference for issues with nvidia > (it works when the stars align at best). But you could try to downgrade the > stable 1.3.236 vulkan stack to see if it's really this (annoyingly need to > downgrade the entire stack to 1.3.236, glslang, vulkan-layers, > vulkan-headers, etc... or portage will complaint) I thought it was due to nvidia because I recently used amdgpu and everything worked fine. I'll rename the bug, because it's confusing. Also, thanks for the tip with nm, didn't know that.
(In reply to Nikita Romanyuk from comment #6) > (In reply to Ionen Wolkens from comment #5) > > vkcube --validate seems to work fine with stable vulkan-layers-1.3.236-r1, > > but not with 239 where I get the same stype thing (I'm on nvidia too, not > > that nvidia would have any relation with what the libraries contain, it's > > not used when building). > > > > I'd guess may be related to the shared build that got changed around in 239, > > sarnex may know better. Interestingly 239 gives me a 3MB utils.so > > (stripped), and 236 is only 102kB? (you'd think it'd be the other way around > > if something is missing). > > > > That aside, nm reporting "no symbols" is normal because you haven't used -D > > (dynamic, for shared libs). > > > > Haven't tried sway, wouldn't use it as a reference for issues with nvidia > > (it works when the stars align at best). But you could try to downgrade the > > stable 1.3.236 vulkan stack to see if it's really this (annoyingly need to > > downgrade the entire stack to 1.3.236, glslang, vulkan-layers, > > vulkan-headers, etc... or portage will complaint) > > I thought it was due to nvidia because I recently used amdgpu and everything > worked fine. I'll rename the bug, because it's confusing. > > Also, thanks for the tip with nm, didn't know that. lol it is already renamed :P
(In reply to Nikita Romanyuk from comment #6) > I thought it was due to nvidia because I recently used amdgpu and everything > worked fine. How long ago is recently? 1.3.239 was added on Feb 4 2023, so if before then you were probably using 1.3.236 with amdgpu.
(In reply to Ionen Wolkens from comment #8) > (In reply to Nikita Romanyuk from comment #6) > > I thought it was due to nvidia because I recently used amdgpu and everything > > worked fine. > How long ago is recently? 1.3.239 was added on Feb 4 2023, so if before then > you were probably using 1.3.236 with amdgpu. Then, I was using 236, yes.
Same problem here. I'm doing vulkan development and I can't load the validation layer after the update: ERROR [GENERAL]: /usr/lib64/libVkLayer_utils.so: undefined symbol: custom_stype_info ERROR [GENERAL]: Requested layer "VK_LAYER_KHRONOS_validation" failed to load! Error: VulkanMsg("Failed to create instance", ERROR_LAYER_NOT_PRESENT) it's broken on vulkan-layers-1.3.239, but it works with version 1.3.236-r1 (had to downgrade my entire vulkan stack for that) Running mesa 22.3.6 on a 6700 XT
Sorry for the late response, I can reproduce this on my local system, I'll try to figure it out today.
Ok, I have something that fixes vkcube --validate but I don't know if it's totally correct, can someone who has more experience with vulkan layers test the attached patch in other vulkan layers use cases and make sure you don't get compile time linker errors or runtime ld errors? You need to use user patches (https://wiki.gentoo.org/wiki//etc/portage/patches#Example) as it relies on another patch being applied before this. Root cause, as usual, is upstream is a mess. Thanks
Created attachment 856134 [details, diff] test-fix.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4506f3dc49c83b97c8ed34d094035965e958a32 commit d4506f3dc49c83b97c8ed34d094035965e958a32 Author: Nick Sarnie <sarnex@gentoo.org> AuthorDate: 2023-03-08 02:32:46 +0000 Commit: Nick Sarnie <sarnex@gentoo.org> CommitDate: 2023-03-08 02:33:39 +0000 media-libs/vulkan-layers: Export more symbols Closes: https://bugs.gentoo.org/895348 Signed-off-by: Nick Sarnie <sarnex@gentoo.org> .../vulkan-layers-1.3.239-Export-symbols.patch | 13 +++++ .../vulkan-layers/vulkan-layers-1.3.239-r1.ebuild | 57 ++++++++++++++++++++++ media-libs/vulkan-layers/vulkan-layers-9999.ebuild | 4 +- 3 files changed, 73 insertions(+), 1 deletion(-)
No replies, so I guess we'll hear from someone if it breaks something
Validation layers maintainer replied to a Github issue, saying that we patched it wrong. https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5289 He also provided an explanation why that happens: libVkLayer_utils is not supported being built as a .so, and hasn't been supported for a long time. https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5519#issuecomment-1485518954 I'll send a Github pull request, fixing this issue and reverting the old fix.
Here it is: https://github.com/gentoo/gentoo/pull/30382
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0cffb70348274f15547d351e015f43cb71edcf9 commit d0cffb70348274f15547d351e015f43cb71edcf9 Author: Nikita Romanyuk <kelvium@yahoo.com> AuthorDate: 2023-03-29 03:55:16 +0000 Commit: Nick Sarnie <sarnex@gentoo.org> CommitDate: 2023-03-29 18:28:35 +0000 media-libs/vulkan-layers: build utils as a static lib, then remove it Validation layers do not support being compiled as a shared library. It caused them to break, as I reported in bug #895348. vkLayer_utils.a is not required to be present in runtime, so we just delete it. Closes: https://bugs.gentoo.org/895348 Signed-off-by: Nikita Romanyuk <kelvium@yahoo.com> Closes: https://github.com/gentoo/gentoo/pull/30382 Signed-off-by: Nick Sarnie <sarnex@gentoo.org> ...ulkan-layers-1.3.239-r2-Build-shared-libs.patch | 13 +++++ .../vulkan-layers/vulkan-layers-1.3.239-r2.ebuild | 59 ++++++++++++++++++++++ media-libs/vulkan-layers/vulkan-layers-9999.ebuild | 8 +-- 3 files changed, 77 insertions(+), 3 deletions(-)