Skip to content

Help with cross-compilation aarch64-darwin --> aarch64-unknown-linux-musl #829

Answered by ipetkov
DavSanchez asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!

Without a full reproduction the best I can do is speculate but this part of the config looks a bit suspect to me:

 craneLib = (inputs.crane.mkLib pkgs).overrideToolchain (
        _:
        with inputs.fenix.packages.${system};
        combine [
          stable.toolchain
          targets.${target}.stable.rust-std
        ]
      );

Normally .overrideToolchain calls the provided function with different pkg instances configured for cross compilation, and usually when using rust-overlay that results in picking the correctly configured compilers for things, but your config is ignoring that input entirely and always using whatever (likely, non-cross-compilation-enabled) derivations t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DavSanchez
Comment options

Answer selected by DavSanchez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants