Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920888 - dev-util/glslang: gui-libs/wlroots configure error due to /usr/bin/glslangValidator: error while loading shared libraries: libSPIRV-Tools-opt.so: cannot open shared object file: No such file or directory
Summary: dev-util/glslang: gui-libs/wlroots configure error due to /usr/bin/glslangVal...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal minor
Assignee: Nick Sarnie
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-28 13:17 UTC by Aivan
Modified: 2024-01-18 01:33 UTC (History)
2 users (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 Aivan 2023-12-28 13:17:48 UTC
USE="X drm libinput vulkan -tinywl -x11-backend -xcb-errors"

Check usable header "vulkan/vulkan.h" with dependency vulkan: YES
Program glslangValidator found: YES (/usr/bin/glslangValidator)

render/vulkan/meson.build:36:23: ERROR: Command `/usr/bin/glslangValidator --version` failed with status 127.

errir in configuration

Reproducible: Couldn't Reproduce

Steps to Reproduce:
1. emerge gui-libs/wlroots
Actual Results:  
configure phase error
/usr/bin/glslangValidator
/usr/bin/glslangValidator: error while loading shared libraries: libSPIRV-Tools-opt.so: cannot open shared object file: No such file or directory

Expected Results:  
Need to add b(?)dependence dev-util/spirv-tools

*I fixed it with emerge dev-util/spirv-tools

>>> Emerging (2 of 2) gui-libs/wlroots-0.16.2-r2::gentoo
 * wlroots-0.16.2.gl.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                       [ ok ]
>>> Unpacking source...
>>> Unpacking wlroots-0.16.2.gl.tar.gz to /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work
>>> Source unpacked in /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work
>>> Preparing source in /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work/wlroots-0.16.2 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work/wlroots-0.16.2 ...
meson setup --libdir lib64 --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload --build.pkg-config-path /usr/share/pkgconfig --pkg-config-path /usr/share/pkgconfig --native-file /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/temp/meson.x86_64-pc-linux-gnu.amd64.ini -Db_pch=false -Dwerror=false --buildtype plain -Dxcb-errors=disabled -Dexamples=false -Drenderers=gles2,vulkan -Dxwayland=enabled -Dbackends=drm,libinput /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work/wlroots-0.16.2 /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work/wlroots-0.16.2-build
The Meson build system
Version: 1.2.3
Source dir: /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work/wlroots-0.16.2
Build dir: /var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work/wlroots-0.16.2-build
Build type: native build
Project name: wlroots
Project version: 0.16.2
C compiler for the host machine: x86_64-pc-linux-gnu-gcc (gcc 13.2.1 "x86_64-pc-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826")
C linker for the host machine: x86_64-pc-linux-gnu-gcc ld.bfd 2.41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wlogical-op: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wimplicit-fallthrough=2: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Wstrict-aliasing=2: YES
Compiler for C supports arguments -Woverflow: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Walloca: YES
Compiler for C supports arguments -Wno-missing-braces: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -fmacro-prefix-map=/prefix/to/hide=: YES
Found pkg-config: /usr/bin/x86_64-pc-linux-gnu-pkg-config (1.8.1)
Run-time dependency wayland-server found: YES 1.22.0
Run-time dependency libdrm found: YES 2.4.117
Run-time dependency xkbcommon found: YES 1.6.0
Run-time dependency libudev found: YES 254
Run-time dependency pixman-1 found: YES 0.42.2
Library m found: YES
Library rt found: YES
Run-time dependency wayland-protocols found: YES 1.32
Found pkg-config: /usr/bin/x86_64-pc-linux-gnu-pkg-config (1.8.1)
Build-time dependency wayland-scanner found: YES 1.22.0
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Run-time dependency egl found: YES 1.5
Run-time dependency gbm found: YES 23.1.9
Run-time dependency glesv2 found: YES 3.2
Program ./embed.sh found: YES (/var/tmp/portage/gui-libs/wlroots-0.16.2-r2/work/wlroots-0.16.2/render/gles2/shaders/./embed.sh)
Run-time dependency vulkan found: YES 1.3.268
Check usable header "vulkan/vulkan.h" with dependency vulkan: YES
Program glslangValidator found: YES (/usr/bin/glslangValidator)

render/vulkan/meson.build:36:23: ERROR: Command `/usr/bin/glslangValidator --version` failed with status 127.
Comment 1 Alfred Wingate 2023-12-28 19:17:50 UTC
This looks more like dev-util/glslang missing a RDEPEND to use spriv-tools and that you somehow don't have a working preserved-rebuild which shouldve preserved the libraries when you most likely depcleaned it.

$ /usr/bin/glslangValidator --version
Glslang Version: 11:13.1.1
ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 13.1.1
GLSL Version: 4.60 glslang Khronos. 13.1.1
SPIR-V Version 0x00010600, Revision 1
GLSL.std.450 Version 100, Revision 1
Khronos Tool ID 8
SPIR-V Generator Version 11
GL_KHR_vulkan_glsl version 100
ARB_GL_gl_spirv version 100
$ ldd /usr/bin/glslangValidator
        linux-vdso.so.1 (0x00007fffc15d7000)
        libglslang.so.13 => /usr/lib64/libglslang.so.13 (0x00007fbff1400000)
        libSPIRV.so.13 => /usr/lib64/libSPIRV.so.13 (0x00007fbff0800000)
        libglslang-default-resource-limits.so.13 => /usr/lib64/libglslang-default-resource-limits.so.13 (0x00007fbff183c000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libstdc++.so.6 (0x00007fbff0400000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fbff0215000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fbff175c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fbff18a4000)
        libSPIRV-Tools-opt.so => /usr/lib64/libSPIRV-Tools-opt.so (0x00007fbfefe00000)
        libSPIRV-Tools.so => /usr/lib64/libSPIRV-Tools.so (0x00007fbff1282000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libgcc_s.so.1 (0x00007fbff1727000)

In the future please include build.log and emerge --info with the bug report.

What version of dev-util/glslang you have would be useful as well.
Comment 2 Jesús P Rey (Chuso) 2024-01-10 10:36:11 UTC
I had the same issue building net-im/tokodon:

/usr/lib/gcc/aarch64-unknown-linux-gnu/13/../../../../aarch64-unknown-linux-gnu/bin/ld: warning: libSPIRV-Tools-opt.so, needed by /usr/lib64/libSPIRV.so.13, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/aarch64-unknown-linux-gnu/13/../../../../aarch64-unknown-linux-gnu/bin/ld: warning: libSPIRV-Tools.so, needed by /usr/lib64/libSPIRV.so.13, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/aarch64-unknown-linux-gnu/13/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/lib64/libSPIRV.so.13: undefined reference to `spvtools::Optimizer::PassToken::~PassToken()'

Because I merged dev-util/glslang from a binary package and dev-util/spirv-tools is a build-time dependency, so it was never pulled as a dependency for me.

I think dev-util/spirv-tools should be added to the RDEPEND of dev-util/glslang as it has been proved that it's also required at runtime.
Comment 3 Nick Sarnie gentoo-dev 2024-01-18 00:56:00 UTC
Sorry for missing this, will look at it today.
Comment 4 Larry the Git Cow gentoo-dev 2024-01-18 01:20:22 UTC
The bug has been closed via the following commit(s):

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

commit 9b34e2d856eb9db4f4f6ce90c1193524228a4a80
Author:     Nick Sarnie <sarnex@gentoo.org>
AuthorDate: 2024-01-18 01:18:33 +0000
Commit:     Nick Sarnie <sarnex@gentoo.org>
CommitDate: 2024-01-18 01:20:09 +0000

    dev-util/glslang: set RDEPEND
    
    Closes: https://bugs.gentoo.org/920888
    
    Signed-off-by: Nick Sarnie <sarnex@gentoo.org>

 dev-util/glslang/glslang-1.3.275.ebuild | 1 +
 dev-util/glslang/glslang-9999.ebuild    | 1 +
 2 files changed, 2 insertions(+)