# Macos m1 compile cmake error

**URL:** <https://community.aseprite.org/t/macos-m1-compile-cmake-error/19579>\
**Category:** Development\
**Created:** [July 26, 2023, 2:56pm UTC](https://community.aseprite.org/t/macos-m1-compile-cmake-error/19579 "2023-07-26T14:56:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidjrkim](https://community.aseprite.org/user_avatar/community.aseprite.org/davidjrkim/32/16187_2.png) [@davidjrkim](https://community.aseprite.org/u/davidjrkim)\
**Post date:** [July 26, 2023, 2:56pm UTC](https://community.aseprite.org/t/macos-m1-compile-cmake-error/19579/1 "2023-07-26T14:56:09Z")

</div>

im using macos 14.0 beta i dont know if thats the issue but… this is there im stuck. plz help

```auto
cd aseprite
mkdir build
cd build
cmake \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_OSX_ARCHITECTURES=arm64 \
  -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
  -DCMAKE_OSX_SYSROOT=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
  -DLAF_BACKEND=skia \
  -DSKIA_DIR=$HOME/Desktop/skia \
  -DSKIA_LIBRARY_DIR=$HOME/Desktop/skia/out/Release-arm64 \
  -DSKIA_LIBRARY=$HOME/Desktop/skia/out/Release-arm64/libskia.a \
  -DPNG_ARM_NEON:STRING=on \
  -G Ninja \
  ..
ninja aseprite

```

```auto
CMake Deprecation Warning at CMakeLists.txt:17 (cmake_policy):
  The OLD behavior for policy CMP0046 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances. Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /opt/homebrew/Cellar/cmake/3.27.0/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/Users/davidkim/aseprite/CMakeFiles/CMakeScratch/TryCompile-kXENis'

    Run Build Command(s): /opt/homebrew/bin/ninja -v cmTC_5ef35
    [1/2] /usr/bin/cc -arch arm64 -o CMakeFiles/cmTC_5ef35.dir/testCCompiler.c.o -c /Users/davidkim/aseprite/CMakeFiles/CMakeScratch/TryCompile-kXENis/testCCompiler.c
    FAILED: CMakeFiles/cmTC_5ef35.dir/testCCompiler.c.o
    /usr/bin/cc -arch arm64 -o CMakeFiles/cmTC_5ef35.dir/testCCompiler.c.o -c /Users/davidkim/aseprite/CMakeFiles/CMakeScratch/TryCompile-kXENis/testCCompiler.c
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:32 (project)

-- Configuring incomplete, errors occurred!
ninja: error: loading 'build.ninja': No such file or directory

```

---

<div class="post-metadata">

**Author:** ![qzhsjz](https://community.aseprite.org/user_avatar/community.aseprite.org/qzhsjz/32/16714_2.png) [@qzhsjz](https://community.aseprite.org/u/qzhsjz)\
**Post date:** [September 28, 2023, 2:34am UTC](https://community.aseprite.org/t/macos-m1-compile-cmake-error/19579/2 "2023-09-28T02:34:31Z")

</div>

It looks like you have a broken XCode install, try to reinstall XCode or use xcode-select to reindicate the fine XCode you use.
