[GH-ISSUE #560] Compilation error with cargo install #324

Closed
opened 2026-03-02 23:46:33 +03:00 by kerem · 2 comments
Owner

Originally created by @Caleb9 on GitHub (Sep 5, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/560

Describe the bug

There seems to be a compilation error on 32bit ARMv7l with Rust 1.80.1

To Reproduce
cargo install spotify_player --no-default-features --features alsa-backend

Log and backtrace

   Compiling spotify_player v0.19.1
error[E0308]: `match` arms have incompatible types
   --> /home/pi/.cargo/registry/src/index.crates.io-1cd66030c949c28d/spotify_player-0.19.1/src/state/model.rs:259:25
    |
257 |               let id = match track.linked_from {
    |  ______________________-
258 | |                 Some(d) => d.id,
    | |                            ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>`
259 | |                 None => track.id?,
    | |                         ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>`
260 | |             };
    | |_____________- `match` arms have incompatible types
    |
    = note: expected enum `std::option::Option<rspotify::rspotify_model::TrackId<'_>>`
             found struct `rspotify::rspotify_model::TrackId<'_>`
help: try wrapping the expression in `Some`
    |
259 |                 None => Some(track.id?),
    |                         +++++         +

error[E0308]: `match` arms have incompatible types
   --> /home/pi/.cargo/registry/src/index.crates.io-1cd66030c949c28d/spotify_player-0.19.1/src/state/model.rs:280:25
    |
278 |               let id = match track.linked_from {
    |  ______________________-
279 | |                 Some(d) => d.id,
    | |                            ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>`
280 | |                 None => track.id?,
    | |                         ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>`
281 | |             };
    | |_____________- `match` arms have incompatible types
    |
    = note: expected enum `std::option::Option<rspotify::rspotify_model::TrackId<'_>>`
             found struct `rspotify::rspotify_model::TrackId<'_>`
help: try wrapping the expression in `Some`
    |
280 |                 None => Some(track.id?),
    |                         +++++         +

For more information about this error, try `rustc --explain E0308`.
error: could not compile `spotify_player` (bin "spotify_player") due to 2 previous errors
error: failed to compile `spotify_player v0.19.1`, intermediate artifacts can be found at `/tmp/cargo-installaOU53A`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Environment

  • OS: Linux retropie 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux (uname -a)
  • Application version: 0.19.1
  • Application features: alsa-backend
  • Rust: 1.80.1
Originally created by @Caleb9 on GitHub (Sep 5, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/560 **Describe the bug** There seems to be a compilation error on 32bit ARMv7l with Rust 1.80.1 **To Reproduce** `cargo install spotify_player --no-default-features --features alsa-backend` **Log and backtrace** ``` Compiling spotify_player v0.19.1 error[E0308]: `match` arms have incompatible types --> /home/pi/.cargo/registry/src/index.crates.io-1cd66030c949c28d/spotify_player-0.19.1/src/state/model.rs:259:25 | 257 | let id = match track.linked_from { | ______________________- 258 | | Some(d) => d.id, | | ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` 259 | | None => track.id?, | | ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>` 260 | | }; | |_____________- `match` arms have incompatible types | = note: expected enum `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` found struct `rspotify::rspotify_model::TrackId<'_>` help: try wrapping the expression in `Some` | 259 | None => Some(track.id?), | +++++ + error[E0308]: `match` arms have incompatible types --> /home/pi/.cargo/registry/src/index.crates.io-1cd66030c949c28d/spotify_player-0.19.1/src/state/model.rs:280:25 | 278 | let id = match track.linked_from { | ______________________- 279 | | Some(d) => d.id, | | ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` 280 | | None => track.id?, | | ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>` 281 | | }; | |_____________- `match` arms have incompatible types | = note: expected enum `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` found struct `rspotify::rspotify_model::TrackId<'_>` help: try wrapping the expression in `Some` | 280 | None => Some(track.id?), | +++++ + For more information about this error, try `rustc --explain E0308`. error: could not compile `spotify_player` (bin "spotify_player") due to 2 previous errors error: failed to compile `spotify_player v0.19.1`, intermediate artifacts can be found at `/tmp/cargo-installaOU53A`. To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. ``` **Environment** - OS: `Linux retropie 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux` (`uname -a`) - Application version: 0.19.1 - Application features: alsa-backend - Rust: 1.80.1
kerem 2026-03-02 23:46:33 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Sep 5, 2024):

Can you try again with —locked? More details https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile

<!-- gh-comment-id:2332532375 --> @aome510 commented on GitHub (Sep 5, 2024): Can you try again with `—locked`? More details https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile
Author
Owner

@Caleb9 commented on GitHub (Sep 6, 2024):

Can you try again with —locked? More details https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile

Yup, that did it. Awesome, thanks. I learned something new about cargo today :).

<!-- gh-comment-id:2333252447 --> @Caleb9 commented on GitHub (Sep 6, 2024): > Can you try again with `—locked`? More details https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile Yup, that did it. Awesome, thanks. I learned something new about cargo today :).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#324
No description provided.