jnqnfe/pulse-binding-rust

linker error: DSO missing from command line

Closed this issue · 2 comments

I cloned the repo, this is what I get on cargo test:

---- src/mainloop/standard.rs - mainloop::standard (line 57) stdout ----
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.0.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.1.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.10.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.11.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.12.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.13.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.14.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.15.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.2.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.3.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.4.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.5.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.6.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.7.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.8.rcgu.o" "/tmp/rustdoctestMs1Q5E/rust_out.rust_out.7rcbfp3g-cgu.9.rcgu.o" "-o" "/tmp/rustdoctestMs1Q5E/rust_out" "/tmp/rustdoctestMs1Q5E/rust_out.33dyzt1ekirinwy8.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/mozgiii/Desktop/pulse-binding-rust/target/debug/deps" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/mozgiii/Desktop/pulse-binding-rust/target/debug/deps" "-L" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/mozgiii/Desktop/pulse-binding-rust/target/debug/deps/liblibpulse_binding-fff5c6144e0561bf.rlib" "/home/mozgiii/Desktop/pulse-binding-rust/target/debug/deps/liblibpulse_sys-7a0dcb80d455ec51.rlib" "/home/mozgiii/Desktop/pulse-binding-rust/target/debug/deps/liblibc-e30d7bd1ff40dae2.rlib" "-Wl,--start-group" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e39317eb74365d3c.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4d55a38564aae54a.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-f8521075e248b627.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-7c91ffdc8da860d3.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0ad27b9879d551d3.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-588f18eae3ea58be.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-4ebf5caee903d98f.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-8895b32baedb08c6.rlib" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-6a9d233d01acc350.rlib" "-Wl,--end-group" "/home/mozgiii/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-851bb3b5f6c4db49.rlib" "-Wl,-Bdynamic" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-l:libpulse.so.0" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /usr/bin/ld: /home/mozgiii/Desktop/pulse-binding-rust/target/debug/deps/liblibpulse_binding-fff5c6144e0561bf.rlib(libpulse_binding-fff5c6144e0561bf.34aowjpr2n0d3j30.rcgu.o): undefined reference to symbol 'pa_encoding_from_string'
          //usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so: error adding symbols: DSO missing from command line
          collect2: error: ld returned 1 exit status

How can I fix this?

Seems like I'm affected by this bug: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1796324
Is there a workaround I could adapt to use this crate until the fix to pulseaudio arrives?

default-features = false helps for now