-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
Closed
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: rustGeneral-purpose programming language emphasizing performance, type safety, and concurrency.General-purpose programming language emphasizing performance, type safety, and concurrency.
Description
Describe the bug
Running a fresh rustup install nightly && cargo build fails, the core message being:
note: Could not start dynamically linked executable: /home/[xxx]/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld/ld.lld
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
collect2: error: ld returned 127 exit status
Steps To Reproduce
Steps to reproduce the behavior:
- have a rust project
rustup install nightly(orrustup updateif you already have one)cargo build
Expected behavior
Either the rustup gcc/ld to be patched for NixOS use, or rust to use the system gcc/ld.
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.1.90, NixOS, 24.05 (Uakari), 24.05pre625274.205781405197`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.2`
- channels(root): `"nixos-23.11, nixpkgs-23.11"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: rustGeneral-purpose programming language emphasizing performance, type safety, and concurrency.General-purpose programming language emphasizing performance, type safety, and concurrency.