Error with compile skia (Mac os)

I try compile skia and have error. Master brunch compiled success. May be i do some wrong…

Platform: Macos 10.13.3
XCode: 9.3
clang: Apple LLVM version 9.1.0 (clang-902.0.39.1)

Error message:

https://gist.github.com/imigalkin/42927dc9053520d5fb842fcc24afd111

1 Like

Does the aseprite-m62 branch is the one failing? Or are you compiling the master branch?

If you have compiled the master branch successfully, try to compile Aseprite with that copy of Skia and see how it works (or if it’s possible to compile Aseprite with that Skia version).

1 Like

I just did as instructed INSTALL.md:

mkdir $HOME/deps
cd $HOME/deps
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone https://github.com/aseprite/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
git checkout aseprite-m62
python tools/git-sync-deps
gn gen out/Release --args="is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false"
ninja -C out/Release

When compiled fail i try compile master brunch. Compile Aseprite (ninja aseprite) with compiled Skia version failed with error

14 errors generated.
[892/1427] 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/Users/wumin/deps/skia/include/config -I/Users/wumin/deps/skia/include/core -I/Users/wumin/deps/skia/include/utils -I/Users/wumin/deps/skia/include/codec -I/Users/wumin/deps/skia/include/gpu -I/Users/wumin/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 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -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.
[893/1427] Building CXX object src/she/CMakeFiles/she.dir/osx/app.mm.o
ninja: build stopped: subcommand failed.

Mac OS 10.12 SDK is critical part of build or i can use 10.13?

I had install mac os 10.12 in Parallels Desktop and try compile Aseprite. Everything compiled and work.

Nice. I’ll give a try again on my macOS 10.13 (I think I’ve compiled Skia on 10.13, but it might be 10.12 last time I did, I’ll check next week)

Thanks for attention, and awesome tool! :grinning:

1 Like

I tried macOS 10.13.3 and Xcode 9.2 and it worked. This might be a problem related with Xcode 9.3. I’m installing the update and I’ll try to compile Skia again. I’ll post any update here.

@wertu check this post Compiling Aseprite on MacOS High Sierra 10.13.4 - #4 by dacap (the new aseprite-m65 branch should work on Xcode 9.3)