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

Please provide info on how to build #477

Closed
vixalien opened this issue Feb 21, 2022 · 17 comments
Closed

Please provide info on how to build #477

vixalien opened this issue Feb 21, 2022 · 17 comments
Labels
question Further information is requested

Comments

@vixalien
Copy link

vixalien commented Feb 21, 2022

"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.

@ondras12345
Copy link
Contributor

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

@xou816
Copy link
Owner

xou816 commented Feb 22, 2022

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 xou816 added the question Further information is requested label Feb 22, 2022
@peterdownunder
Copy link

peterdownunder commented Jan 25, 2024

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

@Diegovsky
Copy link
Collaborator

Diegovsky commented Jan 25, 2024

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

@peterdownunder
Copy link

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

@Diegovsky
Copy link
Collaborator

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.

@peterdownunder
Copy link

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

@vixalien
Copy link
Author

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 vixalien closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
@peterdownunder
Copy link

peterdownunder commented Jan 26, 2024

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
Copy link

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

@Diegovsky
Copy link
Collaborator

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.

@ondras12345
Copy link
Contributor

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.

@Diegovsky
Copy link
Collaborator

Diegovsky commented Feb 1, 2024

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?

@peterdownunder
Copy link

@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"

@Diegovsky
Copy link
Collaborator

I like your enthusiasm. Please, do log!

@peterdownunder
Copy link

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

@Diegovsky
Copy link
Collaborator

I'm happy to hear! Enjoy spot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants