# Building for macOS-arm64 but attempting to link with file built for macOS-x86\_64

**URL:** https://discourse.cmake.org/t/building-for-macos-arm64-but-attempting-to-link-with-file-built-for-macos-x86-64/7779
**Category:** Usage
**Tags:** os:macos
**Created:** [March 27, 2023, 8:29pm UTC](https://discourse.cmake.org/t/building-for-macos-arm64-but-attempting-to-link-with-file-built-for-macos-x86-64/7779 "2023-03-27T20:29:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Keon6](https://discourse.cmake.org/user_avatar/discourse.cmake.org/keon6/32/3291_2.png) [@Keon6](https://discourse.cmake.org/u/Keon6)
#### Post date: [March 27, 2023, 8:29pm UTC](https://discourse.cmake.org/t/building-for-macos-arm64-but-attempting-to-link-with-file-built-for-macos-x86-64/7779/1 "2023-03-27T20:29:18Z")

</div>

Trying to build the following but I keep running into issues ([maxe/QuickStart.adoc at master · maxe-team/maxe · GitHub](https://github.com/maxe-team/maxe/blob/master/doc/QuickStart.adoc)).

Basically, the code was written before M1 chips came out and I’m not sure what the optimal way to handle this is - 1) Build cmake from scratch (ie. [How do I build cmake from source as universal(arm64 and x86\_64) binary on Mac?](https://discourse.cmake.org/t/how-do-i-build-cmake-from-source-as-universal-arm64-and-x86-64-binary-on-mac/5862)), or 2) Find a work around solution?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 3, 2023, 11:26am UTC](https://discourse.cmake.org/t/building-for-macos-arm64-but-attempting-to-link-with-file-built-for-macos-x86-64/7779/2 "2023-04-03T11:26:03Z")

</div>

The code in question will need to be recompiled to target arm64. Or you can target x86\_64 with your code. macOS supports running x86\_64 on arm64, but the granularity is at the process level. A single process must be all arm64 or all x86\_64.
