Install support for Spotify

Hi,

I am getting a bit confused when googling howto install support for Spotify to Mopidy.

Maybe I am doing wrong but as I understand from GitHub - mopidy/mopidy-spotify: Mopidy extension for playing music from Spotify I should install run “cargo build --package gst-plugin-spotify --release” (or “cargo build --package gst-plugin-spotify --release -j1”).

When I run that it stops at following point:
//
Skipping git submodule https://github.com/gtk-rs/gir due to update strategy in .gitmodules
Skipping git submodule https://github.com/gtk-rs/gir-files due to update strategy in .gitmodules
Compiling librespot-protocol v0.4.2
Compiling glib v0.20.0 (GitHub - gtk-rs/gtk-rs-core: Rust bindings for GNOME libraries)
Compiling librespot-core v0.4.2
Compiling librespot-metadata v0.4.2
^C Building [======================> ] 277/289: librespot-core, glib, librespot-protocol, librespot-metadata
blossa@server:~/gst-plugins-rs $
//

I am very new to cargo and I do not know what kind of logs you might want.

Can someone point me into right direction for troubleshoot more? Any other tips?

Regards, Anders

Your problem sounds exactly like cargo build of gst-plugin-spotify stuck at 288/298 · Issue #372 · mopidy/mopidy-spotify · GitHub

If you are trying to compile on a slow/limited machine (like a pi) then yes, you need to limit the threads.

I agree that it sounds exactly like that. Thanks! (I wonder why I did not find that post… :smiley: )

I have tried using the “… -j 1” flag. “–jobs 1” should be the same, but I will try.
I have Pi3 and I run Bookworm on it. I run the cargo-command via SSH.

Update:
I tried and after about 5 minutes atleast I got an error message:
//
Skipping git submodule https://github.com/gtk-rs/gir-files due to update strategy in .gitmodules
Compiling librespot-protocol v0.4.2
error: could not compile librespot-protocol (lib)

Caused by:
process didn’t exit successfully: /home/blossa/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc --crate-name librespot_protocol --edition=2018 /home/blossa/.cargo/registry/src/index.crates.io-6f17d22bba15001f/librespot-protocol-0.4.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=222 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=2 -C metadata=76ba2a514038c62a -C extra-filename=-76ba2a514038c62a --out-dir /home/blossa/gst-plugins-rs/target/release/deps -L dependency=/home/blossa/gst-plugins-rs/target/release/deps --extern protobuf=/home/blossa/gst-plugins-rs/target/release/deps/libprotobuf-bcff61ed037366da.rmeta --cap-lints allow (signal: 9, SIGKILL: kill)
//

Killed probably due to memory exhaustion. It’s pretty painful trying to build on a pi 3.

Instead, try grabbing the armhf package at https://github.com/kingosticks/gst-plugins-rs-build/releases/tag/untagged-9fcc04bf4f312d80c80e

1 Like

I did not have the energy to build from source-code as it was so long time ago I did that (20 years?). I installed one of the debs and it worked directly.
I got warning “mopidy Failed to lookup ‘spotify:directory’: Could not parse ‘spotify:directory’ as a Spotify URI”, but restarting server twice solved that.

Thank you!!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.