Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpv & glslang-git causes symbol lookup error #8945

Closed
andykais opened this issue Jun 21, 2021 · 6 comments
Closed

mpv & glslang-git causes symbol lookup error #8945

andykais opened this issue Jun 21, 2021 · 6 comments
Labels
priority:invalid:broken broken file/hardware/drivers/etc

Comments

@andykais
Copy link

Important Information

Provide following Information:

  • mpv version: 0.33.0-191-ga17d79907a
  • Linux Distribution and Version: arch linux
  • Source of the mpv binary: https://aur.archlinux.org/packages/mpv-git
  • If known which version of mpv introduced the problem: no
  • Window Manager and version: i3-wm
  • GPU driver and version: Intel(R) HD Graphics 520 (SKL GT2)
  • Possible screenshot or video of visual glitches: n/a

Reproduction steps

  1. on arch linux, install mpv (the issue is present on both mpv and mpv-git.
  2. Install the latest glslang: yay -S glslang-git (version: 11.4.0.r47.gb38100f6-1)
  3. mpv no longer functions: mpv: symbol lookup error: /usr/lib/libshaderc_shared.so.1: undefined symbol: _ZN8spvtools9Optimizer18RegisterSizePassesEv

Expected behavior

mpv runs without issue.

Actual behavior

no mpv command can be run. Only the above error is displayed.

Log file

N/A. Mpv crashes before a log file can be produced.

Sample files

N/A

Additional info

mpv works fine using the stable version of glslang (11.4.0-1). The necessity of glslang-git is that it is required to install either mpv-git or ffmpeg-git

@sfan5
Copy link
Member

sfan5 commented Jun 21, 2021

If you replace a dependency of shaderc (here: glslang) with a newer, incompatible version you will have to rebuild shaderc too or you end up with symbol lookup errors.
This is nothing to do with mpv.

Edit: Might also be that you have to rebuild mpv itself, but it's one of these two.

@sfan5 sfan5 closed this as completed Jun 21, 2021
@sfan5 sfan5 added priority:invalid:broken broken file/hardware/drivers/etc and removed os:linux labels Jun 21, 2021
@andykais
Copy link
Author

Im not sure the fix is as simple as that

rebuilding mpv

  • yay -S glslang-git
  • yay -S mpv-git
    results in:
[278/506] Linking build/mpv
[279/506] Compiling osdep/terminal-unix.c
[280/506] Compiling osdep/polldev.c
[281/506] Compiling video/vdpau.c
[282/506] Compiling audio/filter/af_drop.c
[283/506] Compiling audio/decode/ad_lavc.c
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib/libplacebo.so: undefined reference to symbol '_ZN7glslang7TShader10getInfoLogEv'
/usr/bin/ld: /usr/lib/libglslang.so.11: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Waf: Leaving directory `/home/andrew/.cache/yay/mpv-git/src/mpv/build'
Build failed
 -> task in 'mpv' failed with exit status 1 (run with -v to display more information)
==> ERROR: A failure occurred in build().
    Aborting...

rebuilding shaderc

  • yay -S glslang-git
  • pacman -S shaderc
    after the above steps, running mpv still results in:
mpv: symbol lookup error: /usr/lib/libshaderc_shared.so.1: undefined symbol: _ZN8spvtools9Optimizer18RegisterSizePassesEv

@sfan5
Copy link
Member

sfan5 commented Jun 23, 2021

libplacebo.so: undefined reference to symbol '_ZN7glslang7TShader10getInfoLogEv'

rebuild that too

@andykais
Copy link
Author

andykais commented Jun 23, 2021

  • yay -S glslang-git
  • pacman -S shaderc libplacebo
  • yay -S mpv-git

seeing the same

/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib/libplacebo.so: undefined reference to symbol '_ZN7glslang7TShader10getInfoLogEv'
/usr/bin/ld: /usr/lib/libglslang.so.11: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

error while building mpv-git. Perhaps I need to also install shaderc-git and/or libplacebo-git

@andykais
Copy link
Author

ok that did the trick! Here are the steps I needed to perform:

  • yay -S glslang-git
  • yay -S shaderc-git libplacebo-git
  • yay -S mpv-git

mpv now works correctly

@ramis-svitla
Copy link

For me this is because chrome provides a broken copy of vulkan which is loaded while it tries to execute mpv. The fix is to make a little wrapper at /usr/local/bin/mpv that preloads the system version of vulkan:
#!/bin/sh export LD_PRELOAD=/usr/lib/libvulkan.so.1 exec /usr/bin/mpv "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:invalid:broken broken file/hardware/drivers/etc
Projects
None yet
Development

No branches or pull requests

3 participants