Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cant compile spotifyd #1193

Closed
m0r4a opened this issue Mar 21, 2023 · 4 comments
Closed

Cant compile spotifyd #1193

m0r4a opened this issue Mar 21, 2023 · 4 comments
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@m0r4a
Copy link

m0r4a commented Mar 21, 2023

Description
I've tried to compile spotifyd and said error: could not compile spotifyd due to 5 previous errors

To Reproduce

  1. I cloned the git repository with git clone https://github.com/Spotifyd/spotifyd.git
  2. Tried to compile in the spotifyd directory using cargo build --release --no-default-features --features pulseaudio_backend,dbus_keyring,dbus_mpris

Full error message
error[E0407]: method _type_static is not a member of trait Id
--> src/dbus_mpris.rs:363:17
|
363 | / fn _type_static() -> Type
364 | | where
365 | | Self: Sized,
366 | | {
367 | | unreachable!("never called");
368 | | }
| |_________________^ not a member of trait Id

error[E0407]: method from_id_unchecked is not a member of trait Id
--> src/dbus_mpris.rs:370:17
|
370 | / unsafe fn from_id_unchecked(_id: &str) -> Self
371 | | where
372 | | Self: Sized,
373 | | {
374 | | unreachable!("never called");
375 | | }
| |_________________^ not a member of trait Id

error[E0404]: expected trait, found enum PlayContextId
--> src/dbus_mpris.rs:352:41
|
352 | struct AnyContextId(Box);
| ^^^^^^^^^^^^^ not a trait

error[E0404]: expected trait, found enum PlayContextId
--> src/dbus_mpris.rs:377:18
|
377 | impl PlayContextId for AnyContextId {}
| ^^^^^^^^^^^^^ not a trait

error[E0404]: expected trait, found enum PlayableId
--> src/dbus_mpris.rs:380:34
|
380 | Playable(Box),
| ^^^^^^^^^^ not a trait

Some errors have detailed explanations: E0404, E0407.
For more information about an error, try rustc --explain E0404.
error: could not compile spotifyd due to 5 previous errors

Versions:

  • OS: ArchLinux with the LTS kernel
  • Spotifyd: 0.3.4
  • cargo: cargo 1.68.0 (115f34552 2023-02-26)
  • dbus: dbus-1.14.6-2

Note: this is my first issue ever, i'm sorry if something is off

@m0r4a m0r4a added the bug A functionality or parts of a program that do not work as intended label Mar 21, 2023
@eladyn
Copy link
Member

eladyn commented Mar 21, 2023

Hi and thank you for the report!

This issue is fixed in #1145 and has also been raised in #1144. Until then, you can compile with --locked to prevent cargo from using the newest version, but rather the version that compiles.

Hope this helps!

Note: you can put such logs in a fenced code block, such that it gets formatted nicely. :)

@eladyn eladyn closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2023
@m0r4a
Copy link
Author

m0r4a commented Mar 21, 2023

I'm sorry for not understanding very clearly.

  1. I tried to compile with cargo build --locked --release --no-default-features --features pulseaudio_backend,dbus_keyring,dbus_mpris.

  2. I tried with locked and release switched.

  3. I tried only with locked.

In all situations, I kept the flags.

Did you mean to do only cargo build --locked ?

And if that's the case, how can I "turn on" the flags then?"

@eladyn
Copy link
Member

eladyn commented Mar 21, 2023

Oh, yeah. That indeed doesn't work, since I somehow updated that version to the not working one some time ago.

I think, the easiest fix for you should be to check out #1145 and compile that version. That should work without errors.

@m0r4a
Copy link
Author

m0r4a commented Mar 21, 2023

Im sorry for taking so long, it compiled properly, thank you so much!!

If anyone needs to know what I exactly did:

  1. Installed github cli from the AUR

  2. In the spotifyd directory ran the following command in order to go to the 1145 pull request:

gh pr checkout 1145
  1. Compile the code with the following command:
cargo build --release --no-default-features --features pulseaudio_backend,dbus_keyring,dbus_mpris
  1. Install the resulting bianry
cargo install --path . --locked

Thank you so much for the help and support, eladyn

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

No branches or pull requests

2 participants