mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1125] Rust build fails on Raspberry Pi 4 #525
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#525
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @microfx on GitHub (Feb 27, 2023).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1125
Hey!
Trying to build librespot but the raspberry always crashes on the way (no connection possible anymore).
Build command used:
cargo build --no-default-features --features rodiojack-backend --lockedThis is the last step before crashing:
^C Building [======================> ] 321/346: libgit2-sys(build), librespot-protocol, rustls-native-certs, rustls, rustlsSystem:
I am running build for the second time now and it gets past that last step – I remember it being the last time like this as well ... BUT the librespot binary behaves weird (crashes a lot). I wish I could just download the binary ... but there is no binary with my features.
2nd run errored out as well (mind that I added -j 2 ... I read that it then only uses 2 threads)
Any clue?
Cheers!
@im-0 commented on GitHub (Mar 4, 2023):
It is possible that you do not have enough RAM, and various compilation processes are getting killed by OOM killer or by some user-space OOM solutions (like systemd-oomd). Check
dmesgand other system logs.You may try to run with
-j1and add some swap space to circumvent this.@microfx commented on GitHub (Mar 4, 2023):
Thanks!! Alright... can you give me a hint how to increase swap? I have already thought that this is the problem since swap is only around 100 MB (RAM 1 GB).
Would you recommend to compile it better on my Mac in general?
@im-0 commented on GitHub (Mar 4, 2023):
It depends... Usually it is done in a following way:
cfdisk /dev/sdX, whereXis a drive letter (a, b, c... etc.)mkswap /dev/sdXY, whereYis a number of the newly created partition.swapon /dev/sdXY/etc/fstabso that it will activate automatically during bootNote that creating swap on sdcard is a bad idea as sdcards are usually extremely slow. I would recommend external USB 3.0 SSD if you have it.
I would recommend to compile this on some other system as 1 GiB of RAM is just too small for projects in "heavy" languages such as Rust and C++. But compiling on Mac with macOS or on regular Windows x86 PC is not an easy task because of different OS and different CPU architecture. Cross-compiling is not easy.
@microfx commented on GitHub (Mar 4, 2023):
Okay... I just realised this was not my Pi 4 but Pi 3 ... hence the insufficient ram / swp – just compiled it on my Pi 4 in 22 min! Yay! Thanks for the tips&tricks!