-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using fenix to suply cargo
and rust
to a makeRustPlatform
results in "error: linker cc
not found"
#95
Comments
cargo
and rust
to a makeRustPlatform
results in error: linker
cc not found
cargo
and rust
to a makeRustPlatform
results in error: linker
cc not found
cargo
and rust
to a makeRustPlatform
results in error: linker
cc not found
cargo
and rust
to a makeRustPlatform
results in "error: linker cc
not found"
It seems to have something to do with using {
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
naersk = {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, fenix, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: {
packages.default =
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system}.pkgsStatic;
target = pkgs.rust.toRustTargetSpec pkgs.stdenv.targetPlatform;
toolchain = with fenix.packages.${system}; combine [
stable.cargo
stable.rustc
targets.${target}.stable.rust-std
];
shoutTarget = builtins.replaceStrings [ "-" ] [ "_" ] (lib.toUpper target);
in
(naersk.lib.${system}.override {
cargo = toolchain;
rustc = toolchain;
}).buildPackage {
src = self;
nativeBuildInputs = [ pkgs.stdenv.cc ];
CARGO_BUILD_TARGET = target;
"CARGO_TARGET_${shoutTarget}_LINKER" = "${pkgs.stdenv.cc.targetPrefix}cc";
};
});
} |
I think cargo was just trying to run |
@figsoda The issue is, that sometimes |
proc macros does sound like a reason to use build platform cc, does using |
Yeah, with it I get further but still no complete build. Again a
I believe this again is a musl libc mixed with glibc gcc problem. |
Can I see the nix expression you are working with? |
@figsoda Sure! Here, take a look at the |
I tried both
"CARGO_TARGET_${ shoutTarget }_LINKER" ="${p.stdenv.cc.targetPrefix}cc";
andRUSTFLAGS = "-C linker=dasdsa${p.stdenv.cc.targetPrefix}cc";
in the call tobuildRustPackage
, but nonethelesscargo
tries to callcc
.Roughly speaking, this is my derivation:
The text was updated successfully, but these errors were encountered: