mpv-player/mpv-build

Can't link libmpv (deb package) on Debian 11

tsjnachos117 opened this issue · 3 comments

Hello. Whenever I try to build an mpv package (which should include both the cplayer and libmpv), I get literally thousands of error messages, so many they don't fit in my terminal's 4,000 lines of scrollback. However, I noticed if I disable vulkan (-Dvulkan=disabled in mpv_options), the problems go away. I'll post the following (locally modified) files below: debian/rules, debian/config, mpv_options, and ffmpeg_options
modified_files.tar.gz

Here are some logs (meson-log.txt and build.ninja):
logs.tar.gz

PS: I think something similar happened when I reconfigured my scripts to use waf, but I don't remember for sure. I won't test right now, since it's past midnight and I'm tired, but maybe I'll do a test tomorrow.

Ok, waf has also failed:

    [299/480] Compiling video/out/vo_null.c
    [300/480] Compiling demux/cache.c
    [301/480] Compiling misc/thread_pool.c                                                                                                                                              
    [302/480] Compiling demux/demux_playlist.c 
    /usr/bin/ld: /home/tyler/ram/mpv-build/build_libs/lib/libplacebo.a(glsl_glslang.cc.o): in function `pl_glslang_init':
    ./libplacebo/build/../src/glsl/glslang.cc:49: undefined reference to `glslang::InitializeProcess()'
    /usr/bin/ld: /home/tyler/ram/mpv-build/build_libs/lib/libplacebo.a(glsl_glslang.cc.o): in function `pl_glslang_uninit':
    ./libplacebo/build/../src/glsl/glslang.cc:59: undefined reference to `glslang::FinalizeProcess()'
    /usr/bin/ld: /home/tyler/ram/mpv-build/build_libs/lib/libplacebo.a(glsl_glslang.cc.o): in function `pl_glslang_compile':
    ./libplacebo/build/../src/glsl/glslang.cc:79: undefined reference to `glslang::TShader::TShader(EShLanguage)'
    /usr/bin/ld: ./libplacebo/build/../src/glsl/glslang.cc:83: undefined reference to `glslang::TShader::setStrings(char const* const*, int)'
    /usr/bin/ld: /home/tyler/ram/mpv-build/build_libs/lib/libplacebo.a(glsl_glslang.cc.o): in function `glslang::TShader::parse(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages)':
    /usr/include/glslang/Public/ShaderLang.h:633: undefined reference to `glslang::TShader::parse(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, glslang::TShader::Includer&)'
    /usr/bin/ld: /home/tyler/ram/mpv-build/build_libs/lib/libplacebo.a(glsl_glslang.cc.o): in function `pl_glslang_compile':
    ./libplacebo/build/../src/glsl/glslang.cc:98: undefined reference to `glslang::TProgram::TProgram()'
    /usr/bin/ld: ./libplacebo/build/../src/glsl/glslang.cc:100: undefined reference to `glslang::TProgram::link(EShMessages)'
    /usr/bin/ld: ./libplacebo/build/../src/glsl/glslang.cc:108: undefined reference to `glslang::GlslangToSpv(glslang::TIntermediate const&, std::vector<unsigned int, std::allocator<unsigned int> >&, glslang::SpvOptions*)'
    /usr/bin/ld: ./libplacebo/build/../src/glsl/glslang.cc:101: undefined reference to `glslang::TProgram::getInfoLog()'
    /usr/bin/ld: ./libplacebo/build/../src/glsl/glslang.cc:93: undefined reference to `glslang::TShader::getInfoLog()'
    collect2: error: ld returned 1 exit status

Here is my ./mpv/build/config.log file:
config.log

I wonder: does waf have a log file I can upload?

Here are my modded files for using waf (debian/control and ffmpeg_options are the same, so I didn't include them):
modified_files.tar.gz

@tsjnachos117 I also get glslang linking issues on Ubuntu 22.04 - my workaround is uninstalling glslang and compiling shaderc myself then building libplacebo+ffmpeg+mpv against that.

Do you have glslang-dev and related packages installed?