[GH-ISSUE #514] Compile fails on Raspbian buster #326

Closed
opened 2026-02-27 19:30:01 +03:00 by kerem · 2 comments
Owner

Originally created by @JPW21 on GitHub (Aug 2, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/514

If i try to compile the current version (dev branch) of librespot on an up-to-date Raspberry Pi 4 (Raspbian Buster), the build fails:

error[E0658]: use of unstable library feature 'alloc': this library is unlikely to be stabilized in its current form or name (see issue #27783)
  --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-0.3.3/src/lib.rs:79:1
   |
79 | pub extern crate alloc;
   | ^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: Could not compile `tinyvec`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Im not fit in rust, so if someone could point me in the right direction how to fix this would be appreciated.
(My first guess would be to use the newer version of tinyvec (0.4.1), how can i do that with cargo?)

Thanks

Originally created by @JPW21 on GitHub (Aug 2, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/514 If i try to compile the current version (dev branch) of librespot on an up-to-date Raspberry Pi 4 (Raspbian Buster), the build fails: ``` error[E0658]: use of unstable library feature 'alloc': this library is unlikely to be stabilized in its current form or name (see issue #27783) --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-0.3.3/src/lib.rs:79:1 | 79 | pub extern crate alloc; | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0658`. error: Could not compile `tinyvec`. warning: build failed, waiting for other jobs to finish... error: build failed ``` Im not fit in rust, so if someone could point me in the right direction how to fix this would be appreciated. (My first guess would be to use the newer version of tinyvec (0.4.1), how can i do that with cargo?) Thanks
kerem 2026-02-27 19:30:01 +03:00
Author
Owner

@ashthespy commented on GitHub (Aug 2, 2020):

What version of Rust are you on? Looks like your on a pretty old version. You need ~1.40 these days IIRC..

<!-- gh-comment-id:667639386 --> @ashthespy commented on GitHub (Aug 2, 2020): What version of Rust are you on? Looks like your on a pretty old version. You need ~1.40 these days IIRC..
Author
Owner

@JPW21 commented on GitHub (Aug 3, 2020):

Thanks, the version that comes with Raspbian is indeed too old:

pi@hifiberry:~ $ cargo --version
cargo 1.34.0
pi@hifiberry:~ $ rustc --version
rustc 1.34.2

Updating fixed my problem!

For Reference:
Remove version from package manager and replace it with rustup:

sudo apt purge rustc
sudo apt autoremove
curl https://sh.rustup.rs -sSf | sh

Relog or update PATH manually (source $HOME/.cargo/env).
Compile again and it should work:
Finished release [optimized] target(s) in 15m 25s

Thanks for the help! (Wanted to update librespot when i saw your alsamixer PR getting merged ;) )

<!-- gh-comment-id:667768473 --> @JPW21 commented on GitHub (Aug 3, 2020): Thanks, the version that comes with Raspbian is indeed too old: ``` pi@hifiberry:~ $ cargo --version cargo 1.34.0 pi@hifiberry:~ $ rustc --version rustc 1.34.2 ``` Updating fixed my problem! For Reference: Remove version from package manager and replace it with rustup: ``` sudo apt purge rustc sudo apt autoremove curl https://sh.rustup.rs -sSf | sh ``` Relog or update PATH manually (`source $HOME/.cargo/env`). Compile again and it should work: `Finished release [optimized] target(s) in 15m 25s` Thanks for the help! (Wanted to update librespot when i saw your alsamixer PR getting merged ;) )
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/librespot#326
No description provided.