[GH-ISSUE #1173] Cannot compile librespot #546

Closed
opened 2026-02-27 19:31:13 +03:00 by kerem · 4 comments
Owner

Originally created by @jmennecart on GitHub (Jun 5, 2023).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1173

Hello,

I'mctrying to compile librespot without success.
Each time an error occurs. I tryied to delete all files and get again, same problem.

Compile directive is :
cargo build --release --no-default-features

and the result :
Compiling librespot-protocol v0.5.0-dev (/home/airplay/librespot/protocol)
/home/airplay/.rustup/toolchains/stable-arm-unknown-linux-gnueabihf/bin/../lib/librustc_driver-d9d4471c0634a852.so(+0x7eb198)[0xaf4c7198]
/lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0x0)[0xaea17900]
error: could not compile librespot-protocol (lib)

Caused by:
process didn't exit successfully: rustc --crate-name librespot_protocol --edition=2021 protocol/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=237 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=83bf54a3d67a6e87 -C extra-filename=-83bf54a3d67a6e87 --out-dir /home/airplay/librespot/target/release/deps -L dependency=/home/airplay/librespot/target/release/deps --extern protobuf=/home/airplay/librespot/target/release/deps/libprotobuf-0485858edd1ca021.rmeta (signal: 11, SIGSEGV: invalid memory reference)

any ideas ?
Thanks in advance

Originally created by @jmennecart on GitHub (Jun 5, 2023). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1173 Hello, I'mctrying to compile librespot without success. Each time an error occurs. I tryied to delete all files and get again, same problem. Compile directive is : cargo build --release --no-default-features and the result : Compiling librespot-protocol v0.5.0-dev (/home/airplay/librespot/protocol) /home/airplay/.rustup/toolchains/stable-arm-unknown-linux-gnueabihf/bin/../lib/librustc_driver-d9d4471c0634a852.so(+0x7eb198)[0xaf4c7198] /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0x0)[0xaea17900] error: could not compile `librespot-protocol` (lib) Caused by: process didn't exit successfully: `rustc --crate-name librespot_protocol --edition=2021 protocol/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=237 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=83bf54a3d67a6e87 -C extra-filename=-83bf54a3d67a6e87 --out-dir /home/airplay/librespot/target/release/deps -L dependency=/home/airplay/librespot/target/release/deps --extern protobuf=/home/airplay/librespot/target/release/deps/libprotobuf-0485858edd1ca021.rmeta` (signal: 11, SIGSEGV: invalid memory reference) any ideas ? Thanks in advance
kerem closed this issue 2026-02-27 19:31:13 +03:00
Author
Owner

@roderickvd commented on GitHub (Jun 5, 2023):

Don't know.

  • Does it happen when you compile with default features?
  • Is your build environment clean? (cargo clean)
  • Are you running the latest Rust from https://rustup.rs?
  • This is cross-compiling? What if you don't?
<!-- gh-comment-id:1577440753 --> @roderickvd commented on GitHub (Jun 5, 2023): Don't know. - Does it happen when you compile with default features? - Is your build environment clean? (`cargo clean`) - Are you running the latest Rust from https://rustup.rs? - This is cross-compiling? What if you don't?
Author
Owner

@jmennecart commented on GitHub (Jun 6, 2023):

Hi roderickvd
Thanks for your reply.

  1. Yes, an error happens also when I compile with default features but the error is different
  2. Yes, the environment is clean, I downloaded the git project in a new directory
  3. Yes, I just installed Rust from the official site before compiling the project
  4. No, I did the compilation directly on the raspberry (pi zero w) that will embed librespot, it took approximately 12 hours
<!-- gh-comment-id:1578014951 --> @jmennecart commented on GitHub (Jun 6, 2023): Hi roderickvd Thanks for your reply. 1. Yes, an error happens also when I compile with default features but the error is different 2. Yes, the environment is clean, I downloaded the git project in a new directory 3. Yes, I just installed Rust from the official site before compiling the project 4. No, I did the compilation directly on the raspberry (pi zero w) that will embed librespot, it took approximately 12 hours
Author
Owner

@roderickvd commented on GitHub (Jun 6, 2023):

Bullet 4 may be it. I think the kernel tends to kill long-running, non-responsive processes. If that’s a parallel compilation process, well, then there goes your reference.

You may want to try having only a single job (I think -j1 or otherwise in .cargo/config) or try cross-compiling on another host.

<!-- gh-comment-id:1578108926 --> @roderickvd commented on GitHub (Jun 6, 2023): Bullet 4 may be it. I think the kernel tends to kill long-running, non-responsive processes. If that’s a parallel compilation process, well, then there goes your reference. You may want to try having only a single job (I think `-j1` or otherwise in `.cargo/config`) or try cross-compiling on another host.
Author
Owner

@jmennecart commented on GitHub (Jun 7, 2023):

Thanks for you advice.
I compiled it on a raspberry pi 4 with success.
Many thanks

<!-- gh-comment-id:1580103557 --> @jmennecart commented on GitHub (Jun 7, 2023): Thanks for you advice. I compiled it on a raspberry pi 4 with success. Many thanks
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#546
No description provided.