error: linker `aarch64-unknown-linux-gnu-gcc` not found - M1 Mac

2.3k Views Asked by At

Trying to cross compile Rust for the Raspberry Pi and running into a lot of issues - I believe I've reduced it down to this 'linker not found' error. Only trouble is, I'm not sure how to go about installing this.

I've started going down the rabbit hole of installing crosstool-ng (per this answer), but this is creating it's own slew of errors relating to not being able to find objcopy or gobjcopy. I've tried installing these using brew install binutils to no avail.

Is this route making my life unneccesarily difficult and I'm missing some easy way to get this running? I figure this would be as simple as

rustup target add aarch64-unknown-linux-gnu

and adding

[build]
target = "aarch64-unknown-linux-gnu"

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-unknown-linux-gnu-gcc"

to my /.cargo/config but alas this has proven to be quite cumbersome.

0

There are 0 best solutions below