# Error: unknown target CPU armv8.3-a+

**URL:** https://discourse.nixos.org/t/error-unknown-target-cpu-armv8-3-a/16833
**Category:** Help
**Created:** [December 28, 2021, 1:25pm UTC](https://discourse.nixos.org/t/error-unknown-target-cpu-armv8-3-a/16833 "2021-12-28T13:25:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![joedevivo](https://discourse.nixos.org/user_avatar/discourse.nixos.org/joedevivo/32/3955_2.png) [@joedevivo](https://discourse.nixos.org/u/joedevivo)
#### Post date: [December 28, 2021, 1:25pm UTC](https://discourse.nixos.org/t/error-unknown-target-cpu-armv8-3-a/16833/1 "2021-12-28T13:25:59Z")

</div>

```auto
error: unknown target CPU 'armv8.3-a+crypto+sha2+aes+crc+fp16+lse+simd+ras+rdm+rcpc'

```

I’ve encountered this error a couple of times, and I’m pretty sure the issue is with trying to build something on an M1 mac that has `x86_64` hard coded somewhere in the code being compiled.

I’m posting this here so that when searching for this error, people might find information that isn’t specific to a single package, although at this point all I have is a workaround once you’ve identified the problem which the package you’re building.

For example, check out [this native binding](https://github.com/websockets/bufferutil/blob/3b68ef9bceaa3c56687016aaf52482bf4aa744c3/binding.gyp#L9-L10) for nodejs. The important bit is this:

```auto
'OTHER_CFLAGS': ['-arch x86_64', '-arch arm64'],
'OTHER_LDFLAGS': ['-arch x86_64', '-arch arm64']

```

They’re trying to do a nice thing and prebuild binaries for multiple architectures, but it’s not going to fly under nix. (it still works via macOS’s clang, but that’s not why I’m here). Using the following substitution I was able to get nix to stop trying to compile the x86\_64 bindings and my build worked as expected.

```auto
substituteInPlace node_modules/bufferutil/binding.gyp --replace "x86_64" "arm64"

```

A more robust solution would be to get nix’s cross compiling working in this scenario, but I have no idea how to do such a thing. I hope that someone who does will come across this, but at the very least, I hope that you got an answer as to why your particular build failed, and what you should look for to work around it.

---

<div class="post-metadata">

### Author: ![CMCDragonkai](https://discourse.nixos.org/user_avatar/discourse.nixos.org/cmcdragonkai/32/1934_2.png) [@CMCDragonkai](https://discourse.nixos.org/u/CMCDragonkai)
#### Post date: [July 14, 2022, 4:20am UTC](https://discourse.nixos.org/t/error-unknown-target-cpu-armv8-3-a/16833/2 "2022-07-14T04:20:32Z")

</div>

I encountered this too. Seems like nix brings in tooling that expects only the arm64 architecture. But can’t seem to handle universal binary building on nodejs. Was attempting it here: [ci: merge staging to master by MatrixAI-Bot · Pull Request #38 · MatrixAI/js-db · GitHub](https://github.com/MatrixAI/js-db/pull/38#issuecomment-1183968459)

---

<div class="post-metadata">

### Author: ![cefeboru](https://discourse.nixos.org/user_avatar/discourse.nixos.org/cefeboru/32/29282_2.png) [@cefeboru](https://discourse.nixos.org/u/cefeboru)
#### Post date: [November 8, 2024, 12:12am UTC](https://discourse.nixos.org/t/error-unknown-target-cpu-armv8-3-a/16833/3 "2024-11-08T00:12:03Z")

</div>

Hey, same thing here while trying to install the `@contrast/fn-inspect` package. Anyone has an idea on how to solve this?
