SUMMARY Krita git master c2ea92c55535f00cf72661680e1ee8fb10116d74 cannot be compiled under MacOS, as libatomic is not available. See e.g. https://github.com/mavlink/mavros/issues/849. STEPS TO REPRODUCE 1. Upgrade local copy to c2ea92c55535f00cf72661680e1ee8fb10116d74. 2. Issue `cmake .` on the build folder. 3. Open Xcode and try building Krita. OBSERVED RESULT Build target kritaimage of project krita with configuration RelWithDebInfo Ld /Users/amalia/Desktop/krita/build/libs/image/RelWithDebInfo/libkritaimage.18.0.0.dylib normal x86_64 cd /Users/amalia/Desktop/krita/source export MACOSX_DEPLOYMENT_TARGET=10.12 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/amalia/Desktop/krita/build/libs/image/RelWithDebInfo -F/Users/amalia/Desktop/krita/build/libs/image/RelWithDebInfo -F/usr/local/opt/qt5/lib -filelist /Users/amalia/Desktop/krita/build/libs/image/krita.build/RelWithDebInfo/kritaimage.build/Objects-normal/x86_64/kritaimage.18.0.0.LinkFileList -install_name /libkritaimage.18.0.0.dylib -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/widgets/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/psd/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/metadata/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/flake/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/command/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/pigment/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/widgetutils/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/odf/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/store/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/version/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/global/RelWithDebInfo -Xlinker -rpath -Xlinker /Users/amalia/Desktop/krita/build/libs/koplugin/RelWithDebInfo -mmacosx-version-min=10.12 -Xlinker -object_path_lto -Xlinker /Users/amalia/Desktop/krita/build/libs/image/krita.build/RelWithDebInfo/kritaimage.build/Objects-normal/x86_64/kritaimage.18.0.0_lto.o -single_module -multiply_defined suppress -dynamiclib -Wl,-headerpad_max_install_names -install_name @rpath/libkritaimage.18.dylib /Users/amalia/Desktop/krita/build/libs/widgets/RelWithDebInfo/libkritawidgets.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/psd/RelWithDebInfo/libkritapsd.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/metadata/RelWithDebInfo/libkritametadata.18.0.0.dylib /usr/local/lib/libboost_system-mt.dylib -latomic /usr/local/lib/libImath.dylib /usr/local/lib/libIlmImf.dylib /usr/local/lib/libIex.dylib /usr/local/lib/libHalf.dylib /usr/local/lib/libIlmThread.dylib /usr/local/lib/libfftw3.dylib /usr/local/Cellar/vc/1.3.3/lib/libVc.a /usr/local/lib/libgsl.dylib /usr/local/lib/libgslcblas.dylib /Users/amalia/Desktop/krita/build/libs/flake/RelWithDebInfo/libkritaflake.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/command/RelWithDebInfo/libkritacommand.18.0.0.dylib /usr/local/opt/qt5/lib/QtSvg.framework/QtSvg /usr/local/lib/libKF5Completion.5.50.0.dylib /Users/amalia/Desktop/krita/build/libs/pigment/RelWithDebInfo/libkritapigment.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/widgetutils/RelWithDebInfo/libkritawidgetutils.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/odf/RelWithDebInfo/libkritaodf.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/store/RelWithDebInfo/libkritastore.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/version/RelWithDebInfo/libkritaversion.18.0.0.dylib /Users/amalia/Desktop/krita/build/libs/global/RelWithDebInfo/libkritaglobal.18.0.0.dylib /usr/local/opt/qt5/lib/QtConcurrent.framework/QtConcurrent /usr/local/lib/libKF5Archive.5.50.0.dylib /usr/local/opt/qt5/lib/QtPrintSupport.framework/QtPrintSupport /usr/local/lib/libKF5ConfigGui.5.50.0.dylib /usr/local/lib/libKF5GuiAddons.5.50.0.dylib /usr/local/lib/libKF5WidgetsAddons.5.50.0.dylib /usr/local/opt/qt5/lib/QtXml.framework/QtXml /usr/local/lib/libKF5ItemViews.5.50.0.dylib /usr/local/opt/qt5/lib/QtWidgets.framework/QtWidgets /usr/local/opt/qt5/lib/QtGui.framework/QtGui /Users/amalia/Desktop/krita/build/libs/koplugin/RelWithDebInfo/libkritaplugin.18.0.0.dylib /usr/local/lib/libKF5CoreAddons.5.50.0.dylib /usr/local/lib/libKF5ConfigCore.5.50.0.dylib /usr/local/lib/libKF5I18n.5.50.0.dylib /usr/local/opt/qt5/lib/QtCore.framework/QtCore /usr/local/lib/libImath.dylib /usr/local/lib/libIlmImf.dylib /usr/local/lib/libIex.dylib /usr/local/lib/libHalf.dylib /usr/local/lib/libIlmThread.dylib /usr/local/Cellar/vc/1.3.3/lib/libVc.a -single_module -compatibility_version 18.0.0 -current_version 18.0.0 -Xlinker -dependency_info -Xlinker /Users/amalia/Desktop/krita/build/libs/image/krita.build/RelWithDebInfo/kritaimage.build/Objects-normal/x86_64/kritaimage.18.0.0_dependency_info.dat -o /Users/amalia/Desktop/krita/build/libs/image/RelWithDebInfo/libkritaimage.18.0.0.dylib ld: library not found for -latomic clang: error: linker command failed with exit code 1 (use -v to see invocation) Build target krita_shape_text_autogen of project krita with configuration RelWithDebInfo Build target krita_shape_text of project krita with configuration RelWithDebInfo Build failed 18/10/18 00:47 EXPECTED RESULT Krita compiled successfully. SOFTWARE VERSIONS (available in About System) KDE Plasma Version: N/A KDE Frameworks Version: 5.50.0 Qt Version: 5.11.2 ADDITIONAL INFORMATION
Please note that, according to CMake, the proper flag in x64 for detecting atomic support is HAVE_CXX_ATOMICS64_WITHOUT_LIB .
I've asked the author of that patch to take a look, and I'll revert the patch for now: https://phabricator.kde.org/D16184
Git commit dbe8be703a18aa858b4739d0b0537f60cac1c629 by Boudewijn Rempt. Committed on 20/10/2018 at 09:35. Pushed by rempt into branch 'master'. Do not link to libatomic on macOS M +4 -2 libs/image/CMakeLists.txt https://commits.kde.org/krita/dbe8be703a18aa858b4739d0b0537f60cac1c629
I've reverted the patch completely, since it didn't work on freebsd either. Let's see whether the original author can come up with a better patch :-)