You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in an error when building the libc crate:
repro-deps> Compiling libc v0.2.150
repro-deps> error: failed to run custom build command for `libc v0.2.150`
repro-deps> Caused by:
repro-deps> process didn't exit successfully: `/build/dummy-src/target/release/build/libc-d79941b6d8ccf44d/build-script-build` (exit status: 101)
repro-deps> --- stdout
repro-deps> cargo:rerun-if-changed=build.rs
repro-deps> --- stderr
repro-deps> thread 'main' panicked at 'failed to run rustc: /nix/store/0w7x51qky8wf0y4qmvca5l9asd9sl415-rust-nightly-2023-07-23/bin/rustc: error while loading shared libraries: libLLVM-16-rust-1.73.0-nightly.so: cannot open shared object file: No such file or directory
repro-deps> ', /sources/libc-0.2.150-89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c/build.rs:204:9
repro-deps> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
repro-deps> [naersk] cargo returned with exit code 101, exiting
However if you replace the naersk-lib definition with another using fromToolchainName instead:
naersk-lib = let
toolchain = fenixPkgs.fromToolchainName {
name = "nightly-2023-07-23";
sha256 = "sha256-LU4C/i+maIOqBZagUaXpFyWZyOVfQ3Ah5/JTz7v6CG4=";
};
in
pkgs.callPackage naersk {
cargo = toolchain.cargo;
rustc = toolchain.rustc;
};
then the project compiles without issue.
I've confirmed that there is indeed a libLLVM-16-rust-1.73.0-nightly.so file in the rust-nightly-2023-07-23 derivation:
/tmp/repro :: ls -l /nix/store/0w7x51qky8wf0y4qmvca5l9asd9sl415-rust-nightly-2023-07-23/lib/libLLVM-16-rust-1.73.0-nightly.so
lrwxrwxrwx 1 root root 106 Jan 1 1970 /nix/store/0w7x51qky8wf0y4qmvca5l9asd9sl415-rust-nightly-2023-07-23/lib/libLLVM-16-rust-1.73.0-nightly.so -> /nix/store/wih7jgpwmz1sxf00qdzlsg2r1dmvh44m-rustc-nightly-2023-07-23/lib/libLLVM-16-rust-1.73.0-nightly.so
Any help would be much appreciated 🙏
The text was updated successfully, but these errors were encountered:
Cargo.toml:
flake.nix:
rust-toolchain.toml:
This results in an error when building the
libc
crate:However if you replace the
naersk-lib
definition with another usingfromToolchainName
instead:then the project compiles without issue.
I've confirmed that there is indeed a
libLLVM-16-rust-1.73.0-nightly.so
file in therust-nightly-2023-07-23
derivation:Any help would be much appreciated 🙏
The text was updated successfully, but these errors were encountered: