Building Blender on Apple M1 Max, macOS 13.5.2 fails with CMake Error

Hi –

I pulled down Blender today on an M1 Max MacBook Pro running macOS 13.5.2. I have Xcode 15 installed (although make seems to be finding 14 and 15).

The steps in the developer documentation for building on macOS seem straightforward ( Building Blender/Mac - Blender Developer Wiki ).

Here’s what I did; maybe I missed a step and I’ve looked past it several times?

  git clone https://projects.blender.org/blender/blender.git
  cd blender/
  make update
  make

I get:

Configuring Blender in "/Users/john/blender-git/build_darwin" ...
-- The C compiler identification is AppleClang 15.0.0.15000040
-- The CXX compiler identification is AppleClang 15.0.0.15000040
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for malloc_stats
-- Looking for malloc_stats - not found
-- Looking for include file execinfo.h
-- Looking for include file execinfo.h - found
-- Detected native architecture x86_64.
-- Detected OS X 14.0 and Xcode 15.0 at /Applications/Xcode.app/Contents/Developer
-- SDKs Directory: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
-- Detected OSX_SYSROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk
-- Found Git: /usr/local/bin/git (found version "2.42.0")
-- Performing Test SUPPORT_NEON_BUILD
-- Performing Test SUPPORT_NEON_BUILD - Failed
-- Performing Test SUPPORT_SSE_BUILD
-- Performing Test SUPPORT_SSE_BUILD - Success
-- Performing Test SUPPORT_SSE2_BUILD
-- Performing Test SUPPORT_SSE2_BUILD - Success
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Found BZip2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libbz2.tbd (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found OpenAL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/OpenAL.framework
CMake Error at build_files/cmake/platform/platform_apple.cmake:62 (message):
  Mac OSX requires pre-compiled libs at:
  '/Users/john/blender-git/blender/../lib/darwin'
Call Stack (most recent call first):
  CMakeLists.txt:1311 (include)

Indeed when I ls ../lib/ I don’t see darwin, but I do see darwin_arm64:

~/.../blender> ls ../lib/
assets		darwin_arm64

Let me know if there is any other information, log(s), etc. that would help resolve this. Although the instructions seem so straightforward I feel like this could be “user error”… :frowning:

You are likely running CMake compiled for x86_64, or running inside an x86_64 environment, while having an arm64 Python that checked out the libraries. This is the output I would expect:

$ arch
arm64
$ file `which cmake`
/opt/homebrew/bin/cmake: Mach-O 64-bit executable arm64

It’s possible to end up with some x86_64 executables when migrating an old Homebrew installation to a new computer.

1 Like

Thanks @brecht ! Looks like that is exactly what is happening:

~/.../blender> file `which cmake`
/usr/local/bin/cmake: Mach-O 64-bit executable x86_64

Going to clean up of cmake (and any dependencies) and svn (might as well make sure everything that building Blender needs is “fresh”), pull down a fresh copy of Blender’s source, and try again.