Blender 2.8 build fail on macOS Mojave

I’m trying to build 2.8 on my MacBook (Mojave v10.14.5) literally following the instruction wrote here:
https://wiki.blender.org/wiki/Building_Blender/Mac
However, the link failed with this message:

“_kVTProfileLevel_H264_Main_4_1”, referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
“_kVTProfileLevel_H264_Main_5_0”, referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
“_x264_bit_depth”, referenced from:
_X264_init_static in libavcodec.a(libx264.o)
_X264_frame in libavcodec.a(libx264.o)
“_x264_encoder_open_152”, referenced from:
_X264_init in libavcodec.a(libx264.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [bin/Blender.app/Contents/MacOS/Blender] Error 1
make[2]: *** [source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Just wonder what have I missed or should I play with the cmake list file to make it just build ?

Seems like the problem is the the libavcodec.a library, so you could try turning off “WITH_FFMPEG” in the cmake options, since according to
build_files/cmake/platform/platform_apple.cmake, that’s the option that requires
the avcodec library.
For what its worth, I just built on Mojave 10.14.6 with XCode 10.3 and CMake 10.13.0 rc1
and it worked ok for me, with ffmpeg enabled. So I don’t know why you are getting that build error.

1 Like

Thanks, I deleted the ffmpeg lib and fetched it again using “make update”, this fixed the error and it builds!
However, no luck with Cmake for Xcode, with this error:

Blockquote

Ld /Users/techwz/Github/build/Blender/bin/Debug/makesdna normal x86_64 (in target: makesdna)
cd /Users/techwz/Github/Blender/blender
export MACOSX_DEPLOYMENT_TARGET=10.14
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/techwz/Github/build/Blender/bin/Debug -F/Users/techwz/Github/build/Blender/bin/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks -filelist /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna.LinkFileList -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna_lto.o -Xlinker -no_deduplicate -L/Users/techwz/Github/Blender/blender/…/lib/darwin/openmp/lib -lomp -fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore -framework ForceFeedback -liconv -lLLVM-3.4 -Xlinker -unexported_symbols_list -Xlinker /Users/techwz/Github/Blender/blender/source/creator/osx_locals.map -stdlib=libc++ -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Xlinker -dependency_info -Xlinker /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna_dependency_info.dat -o /Users/techwz/Github/build/Blender/bin/Debug/makesdna

error: Build input file cannot be found: ‘/Users/techwz/Github/Blender/blender/-Xlinker’

Blockquote

I remember getting an error like that after I updated to a new XCode or new version of MacOS (forget which). It seems to be treating a flag (-Xlinker) as if it were a file.
I updated some stuff (probably CMake, maybe XCode), emptied out my build directory completely and started over with CMake (pointing it at the source directory), and the problem went away.

I tried to delete the build directory, and started over. No luck. As said with this post: Optional Xcode project Build failure: -Xlinker fail , a space in the path might cause a similar problem, but not the case for my case, 'cause no space in my Xcode path…

Sorry, we’ve exhausted my meagre knowledge. Someone who knows more than me will have to help.

@akitula, do you have any idea what the fix here could be?

Having whole cmake invocation and log could help a little.

Cmake gui log:
Detected OS X 10.14 and Xcode 10.3 at /Applications/Xcode.app

OSX_SYSROOT_PREFIX: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform

Using /Users/techwz/Github/Blender/blender/…/lib/darwin/openmp for OpenMP

opencollada: Build without animation clip support

ERROR: File Not Found. (-43) on file: /Users/techwz/Github/build/Blender/bin/Blender.app

Disabling render tests because tests folder does not exist at /Users/techwz/Github/Blender/blender/…/lib/tests

Configuring done

Generating done

Xcode log:

CompileC /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna.o /Users/techwz/Github/Blender/blender/source/blender/makesdna/intern/makesdna.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target: makesdna)
cd /Users/techwz/Github/Blender/blender
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DCMAKE_INTDIR=“Debug” -DDEBUG -D_DEBUG -D__SSE__ -D__MMX__ -D__SSE2__ -D__LITTLE_ENDIAN__ -DWITH_OPENGL -DWITH_ASSERT_ABORT -DWITH_FREESTYLE -DWITH_DNA_GHASH -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.14 -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -index-store-path /Users/techwz/Library/Developer/Xcode/DerivedData/Blender-eivlzsbqklfdhufjppulapgwcnqf/Index/DataStore -I/Users/techwz/Github/build/Blender/bin/Debug/include -I/Users/techwz/Github/Blender/blender/intern/atomic -I/Users/techwz/Github/Blender/blender/intern/guardedalloc -I/Users/techwz/Github/Blender/blender/source/blender/blenlib -I/Users/techwz/Github/Blender/blender/source/blender/makesdna -I/Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/DerivedSources-normal/x86_64 -I/Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/DerivedSources/x86_64 -I/Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/techwz/Github/build/Blender/bin/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks -Wall -Werror=implicit-function-declaration -Werror=return-type -Wno-tautological-compare -Wno-unknown-pragmas -Wno-char-subscripts -Wstrict-prototypes -Wmissing-prototypes -Wunused-parameter -Xclang -fopenmp -I/Users/techwz/Github/Blender/blender/…/lib/darwin/openmp/include -std=gnu11 -msse -pipe -funsigned-char -msse2 -fno-strict-aliasing -MMD -MT dependencies -MF /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna.d --serialize-diagnostics /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna.dia -c /Users/techwz/Github/Blender/blender/source/blender/makesdna/intern/makesdna.c -o /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna.o

Ld /Users/techwz/Github/build/Blender/bin/Debug/makesdna normal x86_64 (in target: makesdna)
cd /Users/techwz/Github/Blender/blender
export MACOSX_DEPLOYMENT_TARGET=10.14
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/techwz/Github/build/Blender/bin/Debug -F/Users/techwz/Github/build/Blender/bin/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks -filelist /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna.LinkFileList -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna_lto.o -Xlinker -no_deduplicate -L/Users/techwz/Github/Blender/blender/…/lib/darwin/openmp/lib -lomp -fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore -framework ForceFeedback -liconv -lLLVM-3.4 -Xlinker -unexported_symbols_list -Xlinker /Users/techwz/Github/Blender/blender/source/creator/osx_locals.map -stdlib=libc++ -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Xlinker -dependency_info -Xlinker /Users/techwz/Github/build/Blender/source/blender/makesdna/intern/Blender.build/Debug/makesdna.build/Objects-normal/x86_64/makesdna_dependency_info.dat -o /Users/techwz/Github/build/Blender/bin/Debug/makesdna

error: Build input file cannot be found: ‘/Users/techwz/Github/Blender/blender/-Xlinker’

Activity Log Complete 2019/7/27, 5:54 PM 0.7 seconds

The C compiler identification is AppleClang 10.0.1.10010046
The CXX compiler identification is AppleClang 10.0.1.10010046
Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang – works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ – works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Detected OS X 10.14 and Xcode 10.3 at /Applications/Xcode.app
OSX_SYSROOT_PREFIX: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
Performing Test SUPPORT_SSE_BUILD
Performing Test SUPPORT_SSE_BUILD - Success
SSE Support: detected.
Performing Test SUPPORT_SSE2_BUILD
Performing Test SUPPORT_SSE2_BUILD - Success
SSE2 Support: detected.
Found Git: /usr/bin/git (found version “2.20.1 (Apple Git-117)”)
Found OpenAL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenAL.framework
Using /Users/techwz/Github/Blender/blender/…/lib/darwin/openmp for OpenMP
Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework
Performing Test C_WARN_ALL
Performing Test C_WARN_ALL - Success
Performing Test C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION
Performing Test C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION - Success
Performing Test C_WARN_ERROR_RETURN_TYPE
Performing Test C_WARN_ERROR_RETURN_TYPE - Success
Performing Test C_WARN_NO_AUTOLOGICAL_COMPARE
Performing Test C_WARN_NO_AUTOLOGICAL_COMPARE - Success
Performing Test C_WARN_NO_UNKNOWN_PRAGMAS
Performing Test C_WARN_NO_UNKNOWN_PRAGMAS - Success
Performing Test C_WARN_NO_CHAR_SUBSCRIPTS
Performing Test C_WARN_NO_CHAR_SUBSCRIPTS - Success
Performing Test C_WARN_STRICT_PROTOTYPES
Performing Test C_WARN_STRICT_PROTOTYPES - Success
Performing Test C_WARN_MISSING_PROTOTYPES
Performing Test C_WARN_MISSING_PROTOTYPES - Success
Performing Test C_WARN_UNUSED_PARAMETER
Performing Test C_WARN_UNUSED_PARAMETER - Success
Performing Test CXX_WARN_ALL
Performing Test CXX_WARN_ALL - Success
Performing Test CXX_WARN_NO_AUTOLOGICAL_COMPARE
Performing Test CXX_WARN_NO_AUTOLOGICAL_COMPARE - Success
Performing Test CXX_WARN_NO_UNKNOWN_PRAGMAS
Performing Test CXX_WARN_NO_UNKNOWN_PRAGMAS - Success
Performing Test CXX_WARN_NO_CHAR_SUBSCRIPTS
Performing Test CXX_WARN_NO_CHAR_SUBSCRIPTS - Success
Performing Test CXX_WARN_NO_OVERLOADED_VIRTUAL
Performing Test CXX_WARN_NO_OVERLOADED_VIRTUAL - Success
Performing Test CXX_WARN_NO_SIGN_COMPARE
Performing Test CXX_WARN_NO_SIGN_COMPARE - Success
Performing Test CXX_WARN_NO_INVALID_OFFSETOF
Performing Test CXX_WARN_NO_INVALID_OFFSETOF - Success
Performing Test C_WARN_NO_UNUSED_PARAMETER
Performing Test C_WARN_NO_UNUSED_PARAMETER - Success
Performing Test C_WARN_NO_UNUSED_MACROS
Performing Test C_WARN_NO_UNUSED_MACROS - Success
Performing Test C_WARN_NO_MISSING_VARIABLE_DECLARATIONS
Performing Test C_WARN_NO_MISSING_VARIABLE_DECLARATIONS - Success
Performing Test C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL
Performing Test C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL - Success
Performing Test C_WARN_NO_UNUSED_FUNCTION
Performing Test C_WARN_NO_UNUSED_FUNCTION - Success
Performing Test C_WARN_NO_INT_TO_VOID_POINTER_CAST
Performing Test C_WARN_NO_INT_TO_VOID_POINTER_CAST - Success
Performing Test C_WARN_NO_MISSING_PROTOTYPES
Performing Test C_WARN_NO_MISSING_PROTOTYPES - Success
Performing Test C_WARN_NO_DUPLICATE_ENUM
Performing Test C_WARN_NO_DUPLICATE_ENUM - Success
Performing Test C_WARN_NO_UNDEF
Performing Test C_WARN_NO_UNDEF - Success
Performing Test C_WARN_NO_MISSING_NORETURN
Performing Test C_WARN_NO_MISSING_NORETURN - Success
Performing Test CXX_WARN_NO_UNUSED_PRIVATE_FIELD
Performing Test CXX_WARN_NO_UNUSED_PRIVATE_FIELD - Success
Performing Test CXX_WARN_NO_CXX11_NARROWING
Performing Test CXX_WARN_NO_CXX11_NARROWING - Success
Performing Test CXX_WARN_NO_NON_VIRTUAL_DTOR
Performing Test CXX_WARN_NO_NON_VIRTUAL_DTOR - Success
Performing Test CXX_WARN_NO_UNUSED_MACROS
Performing Test CXX_WARN_NO_UNUSED_MACROS - Success
Performing Test CXX_WARN_NO_REORDER
Performing Test CXX_WARN_NO_REORDER - Success
Performing Test CXX_WARN_NO_COMMENT
Performing Test CXX_WARN_NO_COMMENT - Success
Performing Test CXX_WARN_NO_UNUSED_TYPEDEFS
Performing Test CXX_WARN_NO_UNUSED_TYPEDEFS - Success
Performing Test CXX_HAS_SSE
Performing Test CXX_HAS_SSE - Success
Performing Test CXX_HAS_AVX
Performing Test CXX_HAS_AVX - Success
Performing Test CXX_HAS_AVX2
Performing Test CXX_HAS_AVX2 - Success
opencollada: Build without animation clip support
ERROR: File Not Found. (-43) on file: /Users/techwz/Github/build/Blender/bin/Blender.app

Disabling render tests because tests folder does not exist at /Users/techwz/Github/Blender/blender/…/lib/tests
C Compiler: “AppleClang”
C++ Compiler: “AppleClang”

Blender Configuration

Build Options:

  • WITH_BULLET ON
  • WITH_IK_SOLVER ON
  • WITH_IK_ITASC ON
  • WITH_OPENCOLLADA ON
  • WITH_FFTW3 ON
  • WITH_INTERNATIONAL ON
  • WITH_INPUT_NDOF ON
  • WITH_CYCLES ON
  • WITH_FREESTYLE ON
  • WITH_OPENCOLORIO ON
  • WITH_OPENVDB OFF
  • WITH_ALEMBIC OFF

Compiler Options:

  • WITH_BUILDINFO ON
  • WITH_OPENMP ON
  • WITH_RAYOPTIMIZATION ON

System Options:

  • WITH_INSTALL_PORTABLE
  • WITH_X11_ALPHA
  • WITH_X11_XF86VMODE
  • WITH_X11_XFIXES
  • WITH_X11_XINPUT
  • WITH_MEM_JEMALLOC ON
  • WITH_MEM_VALGRIND OFF
  • WITH_SYSTEM_GLEW OFF

Image Formats:

  • WITH_OPENIMAGEIO ON
  • WITH_IMAGE_CINEON ON
  • WITH_IMAGE_DDS ON
  • WITH_IMAGE_HDR ON
  • WITH_IMAGE_OPENEXR ON
  • WITH_IMAGE_OPENJPEG ON
  • WITH_IMAGE_TIFF ON

Audio:

  • WITH_OPENAL ON
  • WITH_SDL ON
  • WITH_SDL_DYNLOAD
  • WITH_JACK OFF
  • WITH_JACK_DYNLOAD
  • WITH_CODEC_AVI ON
  • WITH_CODEC_FFMPEG ON
  • WITH_CODEC_SNDFILE OFF

Compression:

  • WITH_LZMA ON
  • WITH_LZO ON

Python:

  • WITH_PYTHON_INSTALL ON
  • WITH_PYTHON_INSTALL_NUMPY ON
  • WITH_PYTHON_MODULE OFF
  • WITH_PYTHON_SAFETY OFF
  • WITH_PYTHON_FRAMEWORK OFF

Modifiers:

  • WITH_MOD_REMESH ON
  • WITH_MOD_FLUID ON
  • WITH_MOD_OCEANSIM OFF

OpenGL:

  • WITH_GLEW_ES OFF
  • WITH_GL_EGL OFF
  • WITH_GL_PROFILE_ES20 OFF

Configuring done

First of all, I would recommend to use build_files/cmake/cache/blender_release.cmake as cache to get all release things into build. But it doesn’t tell why there is problem. Investigating…