[GH-ISSUE #454] compilation fail for aarch64 using alpine OS. #287

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

Originally created by @grewhit25 on GitHub (Mar 26, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/454

I am attempting to build librespot on a 64bits aarch64 Raspberry Pi using docker alpine:edge
The compilation fail with the following:


error[E0425]: cannot find value `MAP_32BIT` in crate `libc`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.10.0/src/sys/mman.rs:49:9
   |
49 |         MAP_32BIT;
   |         ^^^^^^^^^ not found in `libc`

error: aborting due to previous error

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

From my research the issue is fixed in nix > 0.11.0

Is it possible to update Cargo dependency to point to a later version of ‘nix’ i.e. 0.14.1 or later?

Your help would be much appreciated.

Originally created by @grewhit25 on GitHub (Mar 26, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/454 I am attempting to build librespot on a 64bits aarch64 Raspberry Pi using docker alpine:edge The compilation fail with the following: ```logs error[E0425]: cannot find value `MAP_32BIT` in crate `libc` --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.10.0/src/sys/mman.rs:49:9 | 49 | MAP_32BIT; | ^^^^^^^^^ not found in `libc` error: aborting due to previous error For more information about this error, try `rustc --explain E0425`. error: could not compile `nix`. warning: build failed, waiting for other jobs to finish... error: build failed ``` From my research the issue is fixed in nix > 0.11.0 Is it possible to update Cargo dependency to point to a later version of ‘nix’ i.e. 0.14.1 or later? Your help would be much appreciated.
kerem 2026-02-27 19:29:50 +03:00
Author
Owner

@ashthespy commented on GitHub (Mar 26, 2020):

IIRC, nix is stuck at 0.10.0 for the libmdns crate that is published.
You could instead patch it to use the git version https://github.com/librespot-org/libmdns, that uses the hostname crate instead..

<!-- gh-comment-id:604397847 --> @ashthespy commented on GitHub (Mar 26, 2020): IIRC, `nix` is stuck at `0.10.0` for the `libmdns` crate that is published. You could instead [patch](https://github.com/librespot-org/librespot/blob/ef27b4bce371d0a41e7ee2263244ed141684ff9b/connect/Cargo.toml#L38) it to use the git version `https://github.com/librespot-org/libmdns`, that uses the `hostname` crate instead..
Author
Owner

@grewhit25 commented on GitHub (Mar 27, 2020):

@ashthespy Thank you very much for you prompt reply and suggestion.
The compilation does now seems to be stuck a bit further on here:


   Compiling librespot-core v0.1.1 (/librespot/core)
   Compiling tokio-proto v0.1.1
error: could not compile `librespot-protocol`.

Caused by:
  process didn't exit successfully: `rustc --crate-name librespot_protocol --edition=2018 protocol/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C metadata=1e4ad6d85995749f -C extra-filename=-1e4ad6d85995749f --out-dir /librespot/target/release/deps -L dependency=/librespot/target/release/deps --extern protobuf=/librespot/target/release/deps/libprotobuf-fec6907a8af75bf1.rmeta` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: build failed

Any suggestion or recommendations would great.

<!-- gh-comment-id:604936410 --> @grewhit25 commented on GitHub (Mar 27, 2020): @ashthespy Thank you very much for you prompt reply and suggestion. The compilation does now seems to be stuck a bit further on here: ```logs Compiling librespot-core v0.1.1 (/librespot/core) Compiling tokio-proto v0.1.1 error: could not compile `librespot-protocol`. Caused by: process didn't exit successfully: `rustc --crate-name librespot_protocol --edition=2018 protocol/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C metadata=1e4ad6d85995749f -C extra-filename=-1e4ad6d85995749f --out-dir /librespot/target/release/deps -L dependency=/librespot/target/release/deps --extern protobuf=/librespot/target/release/deps/libprotobuf-fec6907a8af75bf1.rmeta` (signal: 9, SIGKILL: kill) warning: build failed, waiting for other jobs to finish... error: build failed ``` Any suggestion or recommendations would great.
Author
Owner

@ashthespy commented on GitHub (Mar 27, 2020):

Hmm, not an expert, but SIGKILL: kill seems to suggest the compilation was prematurely killed?

<!-- gh-comment-id:604940961 --> @ashthespy commented on GitHub (Mar 27, 2020): Hmm, not an expert, but `SIGKILL: kill` seems to suggest the compilation was prematurely killed?
Author
Owner

@grewhit25 commented on GitHub (Mar 27, 2020):

Great!! Success.
I did have a look at that, but you comment caused me to go have a look at the number of jobs being submitted and after reducing jobs to 2; compilation was successful.

Thanks again for you help.

<!-- gh-comment-id:605006102 --> @grewhit25 commented on GitHub (Mar 27, 2020): Great!! Success. I did have a look at that, but you comment caused me to go have a look at the number of jobs being submitted and after reducing jobs to 2; compilation was successful. Thanks again for you help.
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#287
No description provided.