Building Blender on macOS fails

I have been compiling Blender under macOS for some time now. A few days ago building Blender using “make update – make full” started to fail. I deleted the whole repository and reloaded it again. I also tried to compile Blender with XCode, but that fails as well.

What can I do to tackle this issue?

These are the last lines of output before I get the error message:

 [ 24%] Linking C static library ../../../../lib/libbf_editor_gizmo_library.a
[ 25%] Building C object source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/pose_lib.c.o
[ 25%] Built target bf_editor_gizmo_library
[ 25%] Building C object source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/fmodifier_ui.c.o
[ 25%] Building C object source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/pose_select.c.o
[ 25%] Building C object source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframes_draw.c.o
[ 25%] Building C object source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframes_edit.c.o
[ 25%] Building C object source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframes_general.c.o
[ 25%] Building C object source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/pose_slide.c.o
[ 25%] Building C object source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframing.c.o
[ 25%] Building C object source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyingsets.c.o
[ 25%] Building C object source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/pose_transform.c.o
[ 25%] Building C object source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/pose_utils.c.o
[ 25%] Building C object source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/time_scrub_ui.c.o
[ 25%] Linking C static library ../../../../lib/libbf_editor_armature.a
[ 25%] Built target bf_editor_armature
[ 25%] Linking C static library ../../../../lib/libbf_editor_animation.a
[ 25%] Linking C static library ../../../../lib/libbf_editor_curve.a
[ 25%] Built target bf_editor_curve
[ 25%] Built target bf_editor_animation
make[1]: *** [all] Error 2
make: *** [all] Error 2

I also looked in the generated log files, but I could not find any helpful information.

Any ideas are very appreciated!

That is a generic error message, something like File Not Found, if memory serves.
You need to look in the log and find that actual error, not the summary.

This is the CMakeError.log:

CMakeError.log.txt (692 Bytes)

Does this help?

What has changed? It has worked for a long time.

That would’ve been helpful if the error was in configuration/ generation. Now the error is in compilation.

In the build directory, run make -j 1 install and copy the full output, and paste it on https://pastebin.com or in a text file.

Master branch changes everyday :slight_smile:

:confused: make: *** No rule to make target `install’. Stop.

Is there anything I should run first?

let’s start from the beginning.
create an empty folder, (if you’re at defaults run cd ~/blender-build first)
mkdir crash_build
cd crash_build
cmake ../blender
make -j 1 install

Since CMake fails to identify the compiler, I would suspect an issue between CMake and Xcode.

If there was an Xcode update, updating to the latest CMake version may help.

Unfortunately nothing helped. I updated CMake from v3.18.2 to v3.18.4 and then ran the scripts again.

terminal_output.txt (6.0 KB)
make_update_log.txt (1000 Bytes)
make_full_log.txt (112.7 KB)

@ankitm it seems to be using the wrong zlib library (from opencollada), probably after your recent changes.

I’m not sure why ZLIB_ROOT is not working. A solution could be to move the zlib detection before CMAKE_PREFIX_PATH is set, or to just not use the find module.

It works for me TM (and buildbot too)

-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") 
-- Found BZip2: /usr/lib/libbz2.dylib (found version "1.0.6") 

How would I know if the changes I make actually work ?

@Chris Has the macOS stopped supplying Zlib at the location I mentioned ?
If so, we can update the building wiki page to get zlib and bzip2 from brew.

Indeed, I did not find the two files in the indicated locations. Searching my whole file system I found the files in the following locations:

/System/Volumes/Data/Library/PagicoHelpers/backend/zlib/lib/libz.dylib
/System/Volumes/Data/Applications/FreeCAD.app/Contents/Resources/lib/libz.dylib
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libz.dylib
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libz.dylib
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libz.dylib

/System/Volumes/Data/Applications/FreeCAD.app/Contents/Resources/lib/libbz2.dylib
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libbz2.dylib
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libbz2.dylib
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libbz2.dylib

I installed now zlib and bzip2 with brew. Homebrew installed the libraries in the following directories:

  • /usr/local/Cellar/zlib/1.2.11
  • /usr/local/Cellar/bzip2/1.0.8

You don’t know for sure until @Chris or anyone else with the issue tests it. Moving the zlib detection before setting CMAKE_PREFIX_PATH should stop it from looking in the opencollada directory though.

We should not start depending on homebrew libraries. All library dependencies should be in lib/darwin.

@Chris please run the build process again, I just pushed a commit. Also please share the logs like before, they’re helpful.

You may also uninstall the brew’s libraries, since they’re not symlinked to /usr/local (which is good!), and no program will ever be able to find them.

==> Caveats
zlib is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

Unfortunately, this did not yet solve the issue.

  • I installed zlib and bzip2 with Homebrew.
  • I then removed the local repository. I downloaded the repository again and checked, whether your fix is present.
  • I ran “make update” and “make full”.

These were the final lines of the output (of “make full”):
[ 35%] Linking CXX static library …/…/lib/libextern_ceres.a
[ 35%] Built target extern_ceres
make[1]: *** [all] Error 2
make: *** [all] Error 2

CMakeOutput.log.txt(110.2 KB)
CMakeError.log.txt (692 Bytes)

Please provide the full output of “make full”, starting from the …

Configuring Blender in “/Users/chris/Documents/GitHub/Blender/build_darwin_full” …

… line.

@ankitm, you nailed it!

I ran again “make update” and “make full”. This time it ran through again. :smiley:

This is the build information of the version I just compiled:

Blender Version
2.91.0 Alpha, branch: master, commit date: 2020-10-13 11:17, hash: rB79875e37fe28

Many thanks to all who helped to solve this problem!