spot icon indicating copy to clipboard operation
spot copied to clipboard

Please provide info on how to build

Open vixalien opened this issue 2 years ago • 2 comments

"And other dependencies"?

It would be nice if a step by step guideline for building this app was provided (maybe only in this issue) and how to install dependencies explained. please help me.

vixalien avatar Feb 21 '22 18:02 vixalien

What distro are you on? For arch, there's a package in the AUR. See if it's PKGBUILD would help you. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=spot-client

ondras12345 avatar Feb 21 '22 20:02 ondras12345

Yes, in short it is a bit hard to make an exhaustive list of dependencies for every distro, but if you have a fairly standard install with Gtk4, libadwaita and the rust toolchain setup, you should be able to build it. Feel free to give details if you run into issues trying to build it!

xou816 avatar Feb 22 '22 13:02 xou816

Having similar problems as well. Am running Debian bookworm. Have installed rust using curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh I can build and run master, but get errors on development. Package dependency requirement 'glib-2.0 >= 2.76' could not be satisfied. Package 'glib-2.0' has version '2.74.6', required version is '>= 2.76' I cannot find 2.76, but that is not the only issue.

I am trying to get a resolution to #690 and @Diegovsky appears to have it in his fork, but that development branch give me a different error cargo:warning=build/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token cargo:warning= 4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v cargo:warning= | ^~~~~~~~~~~~~ cargo:warning=build/expando.c:5:23: note: in expansion of macro ‘VERSION2’ cargo:warning= 5 | #define VERSION(n, v) VERSION2(n, v) cargo:warning= | ^~~~~~~~ cargo:warning=build/expando.c:10:1: note: in expansion of macro ‘VERSION’ cargo:warning= 10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER) cargo:warning= | ^~~~~~~ exit status: 1 A little confused

peterdownunder avatar Jan 25 '24 03:01 peterdownunder

sorry to hear you have been having problems. could you give a little more information about your setup?

e.g: the command you're using, your operating system, etc

Diegovsky avatar Jan 25 '24 09:01 Diegovsky

OS: Debian bookworm rustc: 1.75.0 ninja: 1.11.1 meson: 1.0.1

Following the instructions on the code page meson target -Dbuildtype=debug -Doffline=false --prefix="$HOME/.local" ninja install -C target

Am new to rust (although am a programmer) so unsure if there is anything else This is pretty much a clean install of debain, with git, gcc etc installed plus rust installed via the curl script above

peterdownunder avatar Jan 26 '24 01:01 peterdownunder

hey, thank you for the info! That helps out a lot. Also, please try to build only from the dev branch of my fork. It's the most updated one and currently supported (by me).

Am new to rust (although am a programmer) so unsure if there is anything else This is pretty much a clean install of debain, with git, gcc etc installed plus rust installed via the curl script above

No problem, you're doing it right. It's probably a problem with debian, as it usually has something broken with rust. I'll be investigating this closely.

Diegovsky avatar Jan 26 '24 02:01 Diegovsky

that gives the error Package dependency requirement 'glib-2.0 >= 2.76' could not be satisfied. Package 'glib-2.0' has version '2.74.6', required version is '>= 2.76 I have been trying to install glib from source, but as yet having no success

peterdownunder avatar Jan 26 '24 05:01 peterdownunder

I have been trying to install glib from source, but as yet having no success

It probably means you are on an LTS distro. Maybe try using flatpak?

vixalien avatar Jan 26 '24 09:01 vixalien

I can't use flatpak. I am trying to build this to solve a problem I am having. I am trying to use a ALSA pcm sound device, But spot only allows you to select the card. see https://stackoverflow.com/questions/77830485/problems-loading-shared-library-using-ld-preload

I solved my problem by compiling the spot master branch and running it with LD_PRELOAD to select my device, but issue #690 was getting in the way, so am trying to build @Diegovsky dev branch to solve that problem and get my system working.

I could also look at it to see if I could use the pcm device directly from spot. VLC sees it and a simple C app I wrote can use it. I need to be able to compile it to see if that is possible from spot

peterdownunder avatar Jan 26 '24 16:01 peterdownunder

Am not tied to any release but would prefer ubuntu or debian. What would be the preferred release to get the build working

peterdownunder avatar Jan 27 '24 22:01 peterdownunder

I can't use flatpak.

I believe Ubuntu and Debian do not currently ship the required libadwaita version for spot to run. Unless you want to litter your system with a custom install, I recommend using flatpak.

Btw, does ubuntu non-lts or debian unstable work for you?

In any case, I'm trying to understand why build is failing there.

Diegovsky avatar Jan 31 '24 19:01 Diegovsky

I don't know if this will be helpful or not, but this is what I do to route flatpak Spot's output to a non-default pulseaudio sink:

env PULSE_SINK="alsa_output.usb-0d8c_USB_Sound_Device-00.iec958-stereo" /usr/bin/flatpak run dev.alextren.Spot

You can easily achieve the same thing in pavucontrol. But since you are talking about LD_PRELOAD, I suspect you are already way past playing with pavucontrol.

ondras12345 avatar Feb 01 '24 11:02 ondras12345

I can't use flatpak. I am trying to build this to solve a problem I am having. I am trying to use a ALSA pcm sound device, But spot only allows you to select the card. see https://stackoverflow.com/questions/77830485/problems-loading-shared-library-using-ld-preload

wait, do you not use pipewire or pulseaudio? Also, if you can could you explain why choosing a card is not enough in a new issue?

Diegovsky avatar Feb 01 '24 18:02 Diegovsky

@ondras12345 Thanks for the hint. The whole linux sound has always been a mystery to me, so there are likely many ways to achieve what I have done.

@Diegovsky I will carry on trying to get compiling to work using Debian unstable and post the results. Will log a different issue regarding what I am trying to achieve rather than hijack this thread.

Am keen to get this compiling as I am new to rust and having a problem to solve is a great way to start, even if it is a little "deep end"

peterdownunder avatar Feb 01 '24 19:02 peterdownunder

I like your enthusiasm. Please, do log!

Diegovsky avatar Feb 01 '24 19:02 Diegovsky

Ok upgraded to debian unstable, and am now able to build @Diegovsky development branch. This fixes the song list issue that was reported in #690

As an added bonus it also appears to fix playing to an ALSA pcm device, so my multi room setup now works without having to use LD_PRELOAD as described above, a double win

Thanks @Diegovsky your help is much appreciated

peterdownunder avatar Feb 02 '24 08:02 peterdownunder

I'm happy to hear! Enjoy spot :)

Diegovsky avatar Feb 02 '24 11:02 Diegovsky