Skip to content
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

rustPlatform.buildRustPackage: infinite recursion on aarch64-darwin with sysroot #330036

Open
n8henrie opened this issue Jul 25, 2024 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@n8henrie
Copy link
Contributor

Describe the bug

On aarch64-darwin, I get an infinite recursion error when trying to use sysroot (by setting a custom rustc target).

I do not get this infinite recursion error on x86_64-linux.

Not sure if related to #180771, but this has popped up a few times for me in the context of nix + rust + darwin => infinite recursion.

Discovered trying to work on #327136.

Steps To Reproduce

Example flake / repo: https://github.com/n8henrie/nix-rust-debug-info/tree/d4d3ee33b380d1f91ec7754201cbb63cf052fa6f

In short,

  1. rustc +nightly -Z unstable-options --print target-spec-json > target.json
  2. Remove "is-builtin": true, from target.json.
  3. Build a rust project with
let
  pkgs = import nixpkgs {
    system = "aarch64-darwin";
    crossSystem = {
      system = "aarch64-darwin";
      rust.rustcTargetSpec = ./target.json;
    };
  };
in
pkgs.callPackage ./. { };

Notify maintainers

I'm unclear if I can just mention a team like this or not:

@NixOS/rust

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: `"aarch64-darwin"`
 - host os: `Darwin 23.5.0, macOS 14.5`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(n8henrie): `""`
 - channels(root): `""`
 - nixpkgs: `/nix/store/h5m0sr1l5cwqga83zfdm7qbbrnm1iill-source`

Add a 👍 reaction to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant