This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Failed building Krita on macOS 10.13.6

Tags: None
(comma "," separated)
User avatar
cliang
Registered Member
Posts
2
Karma
0
OS
Dear all,

I am not sure if I should post this question here but since I cannot find any other answers or similar posts, I am just going to give a go.


I tried to build Krita on macOS 10.13.6 following this page: https://phabricator.kde.org/source/krit ... /README.md

Here after are steps I tried and failed:

Code: Select all
mkdir -p /opt/krita_dev/b
mkdir -p /opt/krita_dev/i
mkdir -p /opt/krita_dev/d
cd /opt/krita_dev
git clone git://anongit.kde.org/krita.git
export BUILDROOT=/opt/krita_dev
export PATH=$BUILDROOT/i/bin:$PATH
cd $BUILDROOT/b
cmake ../krita/3rdparty/  \
        -DCMAKE_INSTALL_PREFIX=$BUILDROOT/i \
        -DEXTERNALS_DOWNLOAD_DIR=$BUILDROOT/d  \
        -DINSTALL_ROOT=$BUILDROOT/i

cmake --build . --config RelWithDebInfo --target ext_gettext
cmake --build . --config RelWithDebInfo --target ext_qt
cmake --build . --config RelWithDebInfo --target ext_zlib
cmake --build . --config RelWithDebInfo --target ext_boost

cmake --build . --config RelWithDebInfo --target ext_eigen3
cmake --build . --config RelWithDebInfo --target ext_exiv2
cmake --build . --config RelWithDebInfo --target ext_fftw3
cmake --build . --config RelWithDebInfo --target ext_ilmbase
cmake --build . --config RelWithDebInfo --target ext_jpeg
cmake --build . --config RelWithDebInfo --target ext_lcms2
cmake --build . --config RelWithDebInfo --target ext_ocio
cmake --build . --config RelWithDebInfo --target ext_openexr

# I did run the following two lines but they don't seem to be necessary
#   install_name_tool -add_rpath $BUILDROOT/i/lib $BUILDROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./b44ExpLogTable
#    install_name_tool -add_rpath $BUILDROOT/i/lib $BUILDROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./dwaLookups

cmake --build . --config RelWithDebInfo --target ext_png
cmake --build . --config RelWithDebInfo --target ext_tiff
cmake --build . --config RelWithDebInfo --target ext_gsl
cmake --build . --config RelWithDebInfo --target ext_vc
cmake --build . --config RelWithDebInfo --target ext_libraw
cmake --build . --config RelWithDebInfo --target ext_giflib

cmake --build . --config RelWithDebInfo --target ext_kwindowsystem

brew install libheif


# Before I start doing cmake, it seems I need to remove the original CMakeCache.txt otherwise it will fail.
# And finally went to this step.


MacOS-bash-3.2 b$ cmake ../krita -DCMAKE_INSTALL_PREFIX=$BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DBUNDLE_INSTALL_DIR=$BUILDROOT/i/bin -DCMAKE_BUILD_TYPE=RelWithDebInfo
-- Using CMake version: 3.11.0
CMake Deprecation Warning at CMakeLists.txt:12 (cmake_policy):
The OLD behavior for policy CMP0002 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.


CMake Deprecation Warning at CMakeLists.txt:20 (cmake_policy):
The OLD behavior for policy CMP0022 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.


CMake Deprecation Warning at CMakeLists.txt:24 (cmake_policy):
The OLD behavior for policy CMP0026 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.


CMake Deprecation Warning at CMakeLists.txt:32 (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.


CMake Deprecation Warning at CMakeLists.txt:44 (cmake_policy):
The OLD behavior for policy CMP0054 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.


-- Krita version: 4.2.0-pre-alpha
-- Found PythonInterp: /Users/chi-hsiuliang/anaconda3/bin/python3 (found suitable version "3.6.5", minimum required is "3.0")
-- Python system site-packages directory: /Users/chi-hsiuliang/anaconda3/lib/python3.6/site-packages
-- Found PythonInterp: /Users/chi-hsiuliang/anaconda3/bin/python3 (found version "3.6.5")
-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- system
-- Found GNU Scientific Library 2.3: /usr/local/include/gsl /usr/local/lib/libgsl.dylib;/usr/local/lib/libgslcblas.dylib
-- Found OPENEXR: /usr/local/Cellar/ilmbase/2.2.0/lib/libImath.dylib;/usr/local/Cellar/openexr/2.2.0/lib/libIlmImf.dylib;/usr/local/lib/libIex.dylib;/usr/local/Cellar/ilmbase/2.2.0/lib/libHalf.dylib;/usr/local/Cellar/ilmbase/2.2.0/lib/libIlmThread.dylib
-- Checking for module 'libheif'
-- Found libheif, version 1.3.2
-- Found HEIF
-- Checking for module 'libraw'
-- No package 'libraw' found
-- Checking for module 'libraw_r'
-- No package 'libraw_r' found
-- Checking for module 'fftw3>=3.2'
-- No package 'fftw3' found
-- Found FFTW3
-- FFTW Found Version:
-- Found SIP version: 4.19.8
-- Found PyQt5 version: 5.9.2
-- Found QtGui OpenGL support
-- Found lcms version 2.07, /usr/local/lib/liblcms2.dylib
-- Detected Compiler: Clang 9.1.0
-- Detected CPU: kaby-lake
-- Vc found!
CMake Warning at /opt/krita_dev/i/lib/cmake/Vc/AddCompilerFlag.cmake:55 (message):
Deprecated use of the AddCompilerFlag macro.
Call Stack (most recent call first):
CMakeLists.txt:675 (AddCompilerFlag)


CMake Warning (dev) at /opt/krita_dev/i/share/ECM/modules/ECMFindModuleHelpers.cmake:133 (message):
Your project should require at least CMake 2.8.12 to use FindPoppler.cmake
Call Stack (most recent call first):
/opt/krita_dev/i/share/ECM/find-modules/FindPoppler.cmake:78 (ecm_find_package_version_check)
CMakeLists.txt:702 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Poppler: Qt5 requires Core
-- Could NOT find Poppler_Qt5 (missing: Poppler_Qt5_LIBRARY Poppler_Qt5_INCLUDE_DIR) (found version "")
-- Could NOT find Poppler (missing: Qt5) (found version "0.39.0")
Following objects are generated from the per-arch lib
/opt/krita_dev/b/libs/pigment/KoOptimizedCompositeOpFactoryPerArch_SSE2.cpp;/opt/krita_dev/b/libs/pigment/KoOptimizedCompositeOpFactoryPerArch_SSSE3.cpp;/opt/krita_dev/b/libs/pigment/KoOptimizedCompositeOpFactoryPerArch_SSE4_1.cpp;/opt/krita_dev/b/libs/pigment/KoOptimizedCompositeOpFactoryPerArch_AVX.cpp;/opt/krita_dev/b/libs/pigment/KoOptimizedCompositeOpFactoryPerArch_AVX2+FMA+BMI2.cpp
041308 - The version of SIP found expressed as a 6 digit hex number suitable for comparison as a string.
4.19.8 - The version of SIP found as a human readable string.
/Users/chi-hsiuliang/anaconda3/bin/sip - Path and filename of the SIP command line executable.
/Users/chi-hsiuliang/anaconda3/include/python3.6m - Directory holding the SIP C++ header file.
/Users/chi-hsiuliang/anaconda3/share/sip - default SIP dir

Broken tests:
* libs-flake-TestPointMergeCommand
* libs-flake-TestSvgText
* libs-flake-TestSvgTextCloned
* libs-flake-TestSvgTextRoundTrip
* libs-image-kis_transform_mask_test
* libs-image-kis_layer_styles_test
* libs-ui-kis_shape_controller_test
* libs-ui-KisExiv2Test
* libs-ui-KisClipboardTest
* libs-ui-FreehandStrokeTest
* libs-ui-FreehandStrokeBenchmark
* libs-ui-KisPaintOnTransparencyMaskTest
* libs-ui-FilterStrokeTest
* libs-ui-KisSelectionManagerTest
* libs-ui-KisNodeManagerTest
* libs-ui-KisDummiesFacadeTest
* libs-ui-KisZoomAndPanTest
* libs-ui-KisActionManagerTest
* libs-ui-KisCategoriesMapperTest
* libs-ui-kis_animation_frame_cache_test
* plugins-dockers-lut-KisOcioDisplayFilterTest
* plugins-libpaintop-kis_embedded_pattern_manager_test
* plugins-defaultpaintops-KisBrushOpTest
-- The following features have been enabled:

* Hide Safe Asserts, Don't show message box for "safe" asserts, just ignore them automatically and dump a message to the terminal.
* Lock free hash table, Use lock free hash table instead of blocking.
* Limit long tests, Run long running unittests in a limited quick mode

-- The following OPTIONAL packages have been found:

* PythonLibrary (required version >= 3.0), Python Library, <http://www.python.org>
Required by the Krita PyQt plugin
* Qt5Multimedia (required version >= 5.6.0), Qt multimedia integration, <http://www.qt.io/>
Optionally used to provide sound support for animations
* ZLIB, Compression library, <http://www.zlib.net/>
Optionally used by the G'Mic and the PSD plugins
* OpenEXR, High dynamic-range (HDR) image file format, <http://www.openexr.com>
Required by the Krita OpenEXR filter
* TIFF, TIFF Library and Utilities, <http://www.remotesensing.org/libtiff>
Required by the Krita TIFF filter
* JPEG, Free library for JPEG image compression. Note: libjpeg8 is NOT supported., <http://www.libjpeg-turbo.org>
Required by the Krita JPEG filter
* GIF, Library for loading and saving gif files., <http://giflib.sourceforge.net/>
Required by the Krita GIF filter
* HEIF (required version >= 1.3.0), Library for loading and saving heif files., <https://github.com/strukturag/libheif>
Required by the Krita HEIF filter
* LibRaw (required version >= 0.16), Library to decode RAW images, <http://www.libraw.org>
Required to build the raw import plugin
* FFTW3, A fast, free C FFT library, <http://www.fftw.org/>
Required by the Krita for fast convolution operators and some G'Mic features
* OCIO, The OpenColorIO Library, <http://www.opencolorio.org>
Required by the Krita LUT docker
* SIP (required version >= 4.18.0), Support for generating SIP Python bindings, <https://www.riverbankcomputing.com/software/sip/download>
Required by the Krita PyQt plugin
* PyQt5 (required version >= 5.6.0), Python bindings for Qt5., <https://www.riverbankcomputing.com/software/pyqt/download5>
Required by the Krita PyQt plugin
* Vc (required version >= 1.1.0), Portable, zero-overhead SIMD library for C++, <https://github.com/VcDevel/Vc>
Required by the Krita for vectorization
* PkgConfig

-- The following RECOMMENDED packages have been found:

* GSL, <http://www.gnu.org/software/gsl>
Required by Krita's Transform tool.

-- The following REQUIRED packages have been found:

* ECM (required version >= 5.22)
* KF5Archive (required version >= 5.18.0)
* KF5Config (required version >= 5.18.0)
* KF5WidgetsAddons (required version >= 5.18.0)
* KF5Completion (required version >= 5.18.0)
* KF5CoreAddons (required version >= 5.18.0)
* KF5GuiAddons (required version >= 5.18.0)
* Gettext
* PythonInterp
* KF5I18n (required version >= 5.18.0)
* KF5ItemModels (required version >= 5.18.0)
* KF5ItemViews (required version >= 5.18.0)
* KF5WindowSystem (required version >= 5.18.0)
* KF5 (required version >= 5.18.0)
* Qt5Core
* Qt5Gui
* Qt5Widgets
* Qt5Xml
* Qt5Network
* Qt5PrintSupport
* Qt5Svg
* Qt5Test
* Qt5Concurrent
* Qt5 (required version >= 5.6.0)
* PNG
* Boost (required version >= 1.55)
* Eigen3 (required version >= 3.0), C++ template library for linear algebra, <http://eigen.tuxfamily.org>
* Exiv2 (required version >= 0.16), Image metadata library and tools, <http://www.exiv2.org>
Required by Krita
* LCMS2 (required version >= 2.4), LittleCMS Color management engine, <http://www.littlecms.com>
Will be used for color management and is necessary for Krita

-- The following features have been disabled:

* Foundation Build, A Foundation build is a binary release build that can package some extra things like color themes. Linux distributions that build and install Krita into a default system location should not define this option to true.
* Enable Broken Tests, Runs broken test when "make test" is invoked (use -DKRITA_ENABLE_BROKEN_TESTS=ON to enable).
* Build Qt Designer plugins, Builds Qt Designer plugins for Krita widgets (use -DBUILD_KRITA_QT_DESIGNER_PLUGINS=ON to enable).

-- The following OPTIONAL packages have not been found:

* Poppler, A PDF rendering library, <http://poppler.freedesktop.org>
Required by the Krita PDF filter.

-- Configuring done
-- Generating done
-- Build files have been written to: /opt/krita_dev/b


# However it still fails when I do make.


MacOS-bash-3.2 b$ make
[ 0%] Automatic MOC for target kritaversion
[ 0%] Built target kritaversion_autogen
[ 1%] Built target kritaversion
[ 1%] Automatic MOC for target kritaglobal
[ 1%] Built target kritaglobal_autogen
Scanning dependencies of target kritaglobal
[ 1%] Building CXX object libs/global/CMakeFiles/kritaglobal.dir/kis_algebra_2d.cpp.o
[ 1%] Building CXX object libs/global/CMakeFiles/kritaglobal.dir/KisHandlePainterHelper.cpp.o
[ 1%] Linking CXX shared library libkritaglobal.dylib
[ 2%] Built target kritaglobal
[ 2%] Automatic MOC for target kritaplugin
AutoMoc warning
---------------
"/opt/krita_dev/krita/libs/koplugin/KoPluginLoader.h"
Could not find dependency file "myplugin.json"

[ 2%] Built target kritaplugin_autogen
[ 2%] Built target kritaplugin
[ 2%] Automatic MOC for target kritastore
[ 2%] Built target kritastore_autogen
[ 2%] Built target kritastore
[ 2%] Automatic MOC for target kritaodf
[ 2%] Built target kritaodf_autogen
[ 4%] Built target kritaodf
[ 4%] Automatic MOC for target kritawidgetutils
[ 4%] Built target kritawidgetutils_autogen
Scanning dependencies of target kritawidgetutils
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/KisActionsSnapshot.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/KisShortcutsDialog.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/KisShortcutsDialog_p.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/KisShortcutsEditor.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kshortcutschemeseditor.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kshortcutschemeshelper.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kactioncategory.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kactioncollection.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kbugreport.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kedittoolbar.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/khelpmenu.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kkeysequencewidget.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kmainwindow.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kmenumenuhandler_p.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/ktoolbar.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/ktoolbarhandler.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kundoactions.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kxmlguiclient.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kxmlguifactory.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/xmlgui/kxmlguiwindow.cpp.o
[ 4%] Building CXX object libs/widgetutils/CMakeFiles/kritawidgetutils.dir/kritawidgetutils_autogen/mocs_compilation.cpp.o
[ 4%] Linking CXX shared library libkritawidgetutils.dylib
[ 6%] Built target kritawidgetutils
[ 6%] Automatic MOC for target kritapigment
[ 6%] Built target kritapigment_autogen
Scanning dependencies of target kritapigment
[ 6%] Building CXX object libs/pigment/CMakeFiles/kritapigment.dir/KoBasicHistogramProducers.cpp.o
/opt/krita_dev/krita/libs/pigment/KoBasicHistogramProducers.cpp:26:10: fatal error: 'half.h' file not found
#include <half.h>
^~~~~~~~
1 error generated.
make[2]: *** [libs/pigment/CMakeFiles/kritapigment.dir/KoBasicHistogramProducers.cpp.o] Error 1
make[1]: *** [libs/pigment/CMakeFiles/kritapigment.dir/all] Error 2
make: *** [all] Error 2


Can anyone point me out which step I am doing wrong?

Many thanks!!

Alvyn

Last edited by cliang on Thu Aug 30, 2018 1:28 am, edited 1 time in total.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
You're mixing self-built dependencies with dependencies that you install using brew. It's an either-or thing: you cannot mix them.
User avatar
cliang
Registered Member
Posts
2
Karma
0
OS
boudewijn wrote:You're mixing self-built dependencies with dependencies that you install using brew. It's an either-or thing: you cannot mix them.


hi boudewijn,

I have brew installed in my system. Now I see what I am doing wrong, although I don't fully understand why.
If I want to make distributable package does that mean I need to use a clean system? In the page I referenced, it says I might need homebrew for fontconfig. So I still need brew for it. Is there a way to temporarily disable some brew packages?
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
The problem is when brew has something installed that you also installed manually, like openexr. Fontconfig is horrible to build manually, but it and its deps don't clash with the other stuff that's needed for Krita. In your case, I probably would try to build every dependency with homebrew. I don't do that because I didn't know whether I could package and distribute the result, and because I need patches for various dependencies and don't know whether I could add those patches to homebrew.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]