this post was submitted on 16 Mar 2024
5 points (85.7% liked)

Nix / NixOS

1782 readers
1 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

Hi! It's my first day with nixos. I tried to compile a rust project. To do so, I used a nix-shell with the content from here: https://nixos.wiki/wiki/Rust with the "Installation via rustup" option.

Unfortunately the compilation fails:

$ cargo check
   Compiling libc v0.2.151
   Compiling proc-macro2 v1.0.73
   Compiling serde v1.0.193
    Checking once_cell v1.19.0
   Compiling thiserror v1.0.53
error: linker `aarch64-linux-gnu-gcc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `serde` (build script) due to 1 previous error
error: could not compile `libc` (build script) due to 1 previous error
error: could not compile `thiserror` (build script) due to 1 previous error

I run NixOS 23.11 stable on a VM on a Macbook with M1 (arm64) CPU.

Any ideas how to fix that?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 8 months ago

https://github.com/NixOS/nixpkgs/issues/145726

This might help, or at least point you in the right direction. Apologies but I have to post and run right now, I'll return and see if I can't help more asap.