Compiling Aseprite on MacOS High Sierra 10.13.4


#1

I compiled Skia onto my Mac using the Skia build instructions. After that I made my way over to the INSTALL.md document and I followed the instructions. I installed CMake 3.11 and I built ninja onto my Mac. I start running into errors when I try to compile Aseprite. The compile generates successfully but when I try to ninja aseprite I get an error: ninja build stopped: subcommand failed

This is terminal after running ninja aseprite:

[5/524] Building CXX object src/she/CM...eFiles/she.dir/skia/skia_display.cpp.o
FAILED: src/she/CMakeFiles/she.dir/skia/skia_display.cpp.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ DCMARK_STATIC_DEFINE -DCURL_STATICLIB -DENABLE_DATA_RECOVERY -DENABLE_SAVE -DENABLE_UPDATER -DGR_GL_FUNCTION_TYPE=__stdcall -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSK_BUILD_FOR_MAC -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_SRGB -DSK_INTERNAL -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_SUPPORT_GPU=0 -DSK_SUPPORT_OPENCL=0 -DUSE_SKIA_BACKEND -I../third_party/zlib -Ithird_party/zlib -I../third_party/libpng -Ithird_party/libpng -I../third_party/libwebp/src -I../third_party/tinyxml -I../third_party/pixman/pixman -I. -I../third_party/freetype2/include -I../third_party/harfbuzz/src -I../third_party/giflib/lib -I../third_party/jpeg -Ithird_party/cmark -I../third_party/curl/include -I../third_party/simpleini -I../src -I../src/observable -I../src/she/SKIA_CONFIG -I../src/she/PUBLIC -I/Users/huckstudio/deps/skia/include/config -I../src/she/SKIA_CORE -I/Users/huckstudio/deps/skia/include/core -I../src/she/SKIA_PORTS -I../src/she/SKIA_UITLS -I/Users/huckstudio/deps/skia/include/utils -I../src/she/SKIA_CODEC -I/Users/huckstudio/deps/skia/include/codec -I../src/she/SKIA_GPU -I/Users/huckstudio/deps/skia/include/gpu -I/Users/huckstudio/deps/skia/src/gpu -I../laf -Ilaf -I../laf/third_party/stringencoders/src -std=c++11 -stdlib=libc++ -Wall -Wno-switch -O2 -g -DNDEBUG -arch x86_64 -mmacosx-version-min=10.7   -Wno-ignored-attributes -Wno-unused-result -fobjc-arc -MD -MT src/she/CMakeFiles/she.dir/skia/skia_display.cpp.o -MF src/she/CMakeFiles/she.dir/skia/skia_display.cpp.o.d -o src/she/CMakeFiles/she.dir/skia/skia_display.cpp.o -c ../src/she/skia/skia_display.cpp
In file included from ../src/she/skia/skia_display.cpp:15:
../src/she/skia/skia_surface.h:253:34: error: use of undeclared identifier 'SK_R16_SHIFT'
    formatData->redShift   = SK_R16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:254:34: error: use of undeclared identifier 'SK_G16_SHIFT'
    formatData->greenShift = SK_G16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:255:34: error: use of undeclared identifier 'SK_B16_SHIFT'
    formatData->blueShift  = SK_B16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:257:34: error: use of undeclared identifier 'SK_R16_MASK'
    formatData->redMask    = SK_R16_MASK;
                             ^
../src/she/skia/skia_surface.h:258:34: error: use of undeclared identifier 'SK_G16_MASK'
    formatData->greenMask  = SK_G16_MASK;
                             ^
../src/she/skia/skia_surface.h:259:34: error: use of undeclared identifier 'SK_B16_MASK'
    formatData->blueMask   = SK_B16_MASK;
                             ^
../src/she/skia/skia_surface.h:273:34: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redShift   = SK_RGBA_R32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:274:34: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenShift = SK_RGBA_G32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:275:34: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueShift  = SK_RGBA_B32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:276:34: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaShift = SK_RGBA_A32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:277:42: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redMask    = (255 << SK_RGBA_R32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:278:42: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenMask  = (255 << SK_RGBA_G32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:279:42: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueMask   = (255 << SK_RGBA_B32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:280:42: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaMask  = (255 << SK_RGBA_A32_SHIFT);
                                     ^
14 errors generated.
[6/524] Building CXX object src/she/CM...eFiles/she.dir/skia/skia_surface.cpp.o
FAILED: src/she/CMakeFiles/she.dir/skia/skia_surface.cpp.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DCMARK_STATIC_DEFINE -DCURL_STATICLIB -DENABLE_DATA_RECOVERY -DENABLE_SAVE -DENABLE_UPDATER -DGR_GL_FUNCTION_TYPE=__stdcall -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSK_BUILD_FOR_MAC -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_SRGB -DSK_INTERNAL -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_SUPPORT_GPU=0 -DSK_SUPPORT_OPENCL=0 -DUSE_SKIA_BACKEND -I../third_party/zlib -Ithird_party/zlib -I../third_party/libpng -Ithird_party/libpng -I../third_party/libwebp/src -I../third_party/tinyxml -I../third_party/pixman/pixman -I. -I../third_party/freetype2/include -I../third_party/harfbuzz/src -I../third_party/giflib/lib -I../third_party/jpeg -Ithird_party/cmark -I../third_party/curl/include -I../third_party/simpleini -I../src -I../src/observable -I../src/she/SKIA_CONFIG -I../src/she/PUBLIC -I/Users/huckstudio/deps/skia/include/config -I../src/she/SKIA_CORE -I/Users/huckstudio/deps/skia/include/core -I../src/she/SKIA_PORTS -I../src/she/SKIA_UITLS -I/Users/huckstudio/deps/skia/include/utils -I../src/she/SKIA_CODEC -I/Users/huckstudio/deps/skia/include/codec -I../src/she/SKIA_GPU -I/Users/huckstudio/deps/skia/include/gpu -I/Users/huckstudio/deps/skia/src/gpu -I../laf -Ilaf -I../laf/third_party/stringencoders/src -std=c++11 -stdlib=libc++ -Wall -Wno-switch -O2 -g -DNDEBUG -arch x86_64 -mmacosx-version-min=10.7   -Wno-ignored-attributes -Wno-unused-result -fobjc-arc -MD -MT src/she/CMakeFiles/she.dir/skia/skia_surface.cpp.o -MF src/she/CMakeFiles/she.dir/skia/skia_surface.cpp.o.d -o src/she/CMakeFiles/she.dir/skia/skia_surface.cpp.o -c ../src/she/skia/skia_surface.cpp
In file included from ../src/she/skia/skia_surface.cpp:11:
../src/she/skia/skia_surface.h:253:34: error: use of undeclared identifier 'SK_R16_SHIFT'
    formatData->redShift   = SK_R16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:254:34: error: use of undeclared identifier 'SK_G16_SHIFT'
    formatData->greenShift = SK_G16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:255:34: error: use of undeclared identifier 'SK_B16_SHIFT'
    formatData->blueShift  = SK_B16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:257:34: error: use of undeclared identifier 'SK_R16_MASK'
    formatData->redMask    = SK_R16_MASK;
                             ^
../src/she/skia/skia_surface.h:258:34: error: use of undeclared identifier 'SK_G16_MASK'
    formatData->greenMask  = SK_G16_MASK;
                             ^
../src/she/skia/skia_surface.h:259:34: error: use of undeclared identifier 'SK_B16_MASK'
    formatData->blueMask   = SK_B16_MASK;
                             ^
../src/she/skia/skia_surface.h:273:34: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redShift   = SK_RGBA_R32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:274:34: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenShift = SK_RGBA_G32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:275:34: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueShift  = SK_RGBA_B32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:276:34: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaShift = SK_RGBA_A32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:277:42: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redMask    = (255 << SK_RGBA_R32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:278:42: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenMask  = (255 << SK_RGBA_G32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:279:42: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueMask   = (255 << SK_RGBA_B32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:280:42: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaMask  = (255 << SK_RGBA_A32_SHIFT);
                                     ^
14 errors generated.
[10/524] Building CXX object src/she/CMakeFiles/she.dir/skia/she.cpp.o
FAILED: src/she/CMakeFiles/she.dir/skia/she.cpp.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DCMARK_STATIC_DEFINE -DCURL_STATICLIB -DENABLE_DATA_RECOVERY -DENABLE_SAVE -DENABLE_UPDATER -DGR_GL_FUNCTION_TYPE=__stdcall -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSK_BUILD_FOR_MAC -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_SRGB -DSK_INTERNAL -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_SUPPORT_GPU=0 -DSK_SUPPORT_OPENCL=0 -DUSE_SKIA_BACKEND -I../third_party/zlib -Ithird_party/zlib -I../third_party/libpng -Ithird_party/libpng -I../third_party/libwebp/src -I../third_party/tinyxml -I../third_party/pixman/pixman -I. -I../third_party/freetype2/include -I../third_party/harfbuzz/src -I../third_party/giflib/lib -I../third_party/jpeg -Ithird_party/cmark -I../third_party/curl/include -I../third_party/simpleini -I../src -I../src/observable -I../src/she/SKIA_CONFIG -I../src/she/PUBLIC -I/Users/huckstudio/deps/skia/include/config -I../src/she/SKIA_CORE -I/Users/huckstudio/deps/skia/include/core -I../src/she/SKIA_PORTS -I../src/she/SKIA_UITLS -I/Users/huckstudio/deps/skia/include/utils -I../src/she/SKIA_CODEC -I/Users/huckstudio/deps/skia/include/codec -I../src/she/SKIA_GPU -I/Users/huckstudio/deps/skia/include/gpu -I/Users/huckstudio/deps/skia/src/gpu -I../laf -Ilaf -I../laf/third_party/stringencoders/src -std=c++11 -stdlib=libc++ -Wall -Wno-switch -O2 -g -DNDEBUG -arch x86_64 -mmacosx-version-min=10.7   -Wno-ignored-attributes -Wno-unused-result -fobjc-arc -MD -MT src/she/CMakeFiles/she.dir/skia/she.cpp.o -MF src/she/CMakeFiles/she.dir/skia/she.cpp.o.d -o src/she/CMakeFiles/she.dir/skia/she.cpp.o -c ../src/she/skia/she.cpp
In file included from ../src/she/skia/she.cpp:16:
In file included from ../src/she/skia/skia_system.h:15:
../src/she/skia/skia_surface.h:253:34: error: use of undeclared identifier 'SK_R16_SHIFT'
    formatData->redShift   = SK_R16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:254:34: error: use of undeclared identifier 'SK_G16_SHIFT'
    formatData->greenShift = SK_G16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:255:34: error: use of undeclared identifier 'SK_B16_SHIFT'
    formatData->blueShift  = SK_B16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:257:34: error: use of undeclared identifier 'SK_R16_MASK'
    formatData->redMask    = SK_R16_MASK;
                             ^
../src/she/skia/skia_surface.h:258:34: error: use of undeclared identifier 'SK_G16_MASK'
    formatData->greenMask  = SK_G16_MASK;
                             ^
../src/she/skia/skia_surface.h:259:34: error: use of undeclared identifier 'SK_B16_MASK'
    formatData->blueMask   = SK_B16_MASK;
                             ^
../src/she/skia/skia_surface.h:273:34: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redShift   = SK_RGBA_R32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:274:34: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenShift = SK_RGBA_G32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:275:34: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueShift  = SK_RGBA_B32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:276:34: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaShift = SK_RGBA_A32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:277:42: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redMask    = (255 << SK_RGBA_R32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:278:42: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenMask  = (255 << SK_RGBA_G32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:279:42: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueMask   = (255 << SK_RGBA_B32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:280:42: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaMask  = (255 << SK_RGBA_A32_SHIFT);
                                     ^
14 errors generated.
[14/524] Building CXX object src/she/C...iles/she.dir/skia/skia_window_osx.mm.o
FAILED: src/she/CMakeFiles/she.dir/skia/skia_window_osx.mm.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DCMARK_STATIC_DEFINE -DCURL_STATICLIB -DENABLE_DATA_RECOVERY -DENABLE_SAVE -DENABLE_UPDATER -DGR_GL_FUNCTION_TYPE=__stdcall -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSK_BUILD_FOR_MAC -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_SRGB -DSK_INTERNAL -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_SUPPORT_GPU=0 -DSK_SUPPORT_OPENCL=0 -DUSE_SKIA_BACKEND -I../third_party/zlib -Ithird_party/zlib -I../third_party/libpng -Ithird_party/libpng -I../third_party/libwebp/src -I../third_party/tinyxml -I../third_party/pixman/pixman -I. -I../third_party/freetype2/include -I../third_party/harfbuzz/src -I../third_party/giflib/lib -I../third_party/jpeg -Ithird_party/cmark -I../third_party/curl/include -I../third_party/simpleini -I../src -I../src/observable -I../src/she/SKIA_CONFIG -I../src/she/PUBLIC -I/Users/huckstudio/deps/skia/include/config -I../src/she/SKIA_CORE -I/Users/huckstudio/deps/skia/include/core -I../src/she/SKIA_PORTS -I../src/she/SKIA_UITLS -I/Users/huckstudio/deps/skia/include/utils -I../src/she/SKIA_CODEC -I/Users/huckstudio/deps/skia/include/codec -I../src/she/SKIA_GPU -I/Users/huckstudio/deps/skia/include/gpu -I/Users/huckstudio/deps/skia/src/gpu -I../laf -Ilaf -I../laf/third_party/stringencoders/src -std=c++11 -stdlib=libc++ -Wall -Wno-switch -O2 -g -DNDEBUG -arch x86_64 -mmacosx-version-min=10.7   -Wno-ignored-attributes -Wno-unused-result -fobjc-arc -MD -MT src/she/CMakeFiles/she.dir/skia/skia_window_osx.mm.o -MF src/she/CMakeFiles/she.dir/skia/skia_window_osx.mm.o.d -o src/she/CMakeFiles/she.dir/skia/skia_window_osx.mm.o -c ../src/she/skia/skia_window_osx.mm
In file included from ../src/she/skia/skia_window_osx.mm:23:
../src/she/skia/skia_surface.h:253:34: error: use of undeclared identifier 'SK_R16_SHIFT'
    formatData->redShift   = SK_R16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:254:34: error: use of undeclared identifier 'SK_G16_SHIFT'
    formatData->greenShift = SK_G16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:255:34: error: use of undeclared identifier 'SK_B16_SHIFT'
    formatData->blueShift  = SK_B16_SHIFT;
                             ^
../src/she/skia/skia_surface.h:257:34: error: use of undeclared identifier 'SK_R16_MASK'
    formatData->redMask    = SK_R16_MASK;
                             ^
../src/she/skia/skia_surface.h:258:34: error: use of undeclared identifier 'SK_G16_MASK'
    formatData->greenMask  = SK_G16_MASK;
                             ^
../src/she/skia/skia_surface.h:259:34: error: use of undeclared identifier 'SK_B16_MASK'
    formatData->blueMask   = SK_B16_MASK;
                             ^
../src/she/skia/skia_surface.h:273:34: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redShift   = SK_RGBA_R32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:274:34: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenShift = SK_RGBA_G32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:275:34: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueShift  = SK_RGBA_B32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:276:34: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaShift = SK_RGBA_A32_SHIFT;
                             ^
../src/she/skia/skia_surface.h:277:42: error: use of undeclared identifier 'SK_RGBA_R32_SHIFT'
    formatData->redMask    = (255 << SK_RGBA_R32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:278:42: error: use of undeclared identifier 'SK_RGBA_G32_SHIFT'
    formatData->greenMask  = (255 << SK_RGBA_G32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:279:42: error: use of undeclared identifier 'SK_RGBA_B32_SHIFT'
    formatData->blueMask   = (255 << SK_RGBA_B32_SHIFT);
                                     ^
../src/she/skia/skia_surface.h:280:42: error: use of undeclared identifier 'SK_RGBA_A32_SHIFT'
    formatData->alphaMask  = (255 << SK_RGBA_A32_SHIFT);
                                     ^
14 errors generated.
ninja: build stopped: subcommand failed. 

I don’t exactly know what I did wrong, and I am a total noob at this. Is it possible to compile aseprite on High Sierra? Cause it seems like the instructions are really outdated. Could someone tell me exactly what I did wrong in “simpleton” terms so I can fix it?


#2

Pretty sure the same issue than in Error with compile skia (Mac os), I’ve to update the Skia branch for the latest Xcode version.


#3

I’m on High Sierra 10.13.4 with Xcode 9.3. Looking at the other post you linked, the errors do seem very similar. However, you ended by saying that it might be a problem with Xcode 9.3. I just followed the instructions exactly like INSTALL.md document said to do. I suspect it might be a 9.3 issue. Apple did fix quite a lot of things in that update and there is definitely the possibility that they may have changed something.


#4

Instead of git checkout aseprite-m62 give a try to the git checkout aseprite-m65 (I’ve pushed the branch just now, so you will have to do a git fetch --all in the skia directory first).


Error with compile skia (Mac os)
#5

Ok, I will have to try it out.


#6

Yes! Thank you for your help in this. I have been working to get this compiled since Monday. I cannot express the gratitude I have right now. I almost gave in and purchased Aseprite from you but I wanted challenge myself to see if I could do it myself. Without your help I could have been wasting even more time trying to get it to work. Now I can get back to work on my game with a professional sprite tool. I might write up some changes for others in the future. I would suggest changing the INSTALL.md document to get it up-to-date as it is quite old.