Giter Site home page Giter Site logo

aseprite / skia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/skia

165.0 5.0 41.0 1.1 GB

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

Home Page: https://skia.org

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.05% Python 1.91% C++ 80.44% C 1.65% Shell 0.23% Objective-C 0.31% Objective-C++ 1.16% HTML 1.16% JavaScript 2.28% Go 0.86% Java 0.39% Lex 0.01% GLSL 4.27% Dockerfile 0.03% CMake 0.01% PowerShell 0.01% CSS 0.01% Starlark 4.45% TypeScript 0.10% Metal 0.69%

skia's Introduction

Skia for Aseprite and laf

Pre-built binaries of Skia in the releases page.

Skia is a 2D graphic library developed by Google Inc., you can find the official website in skia.org.

This fork is used to compile Skia automatically for laf and Aseprite using GitHub Actions.

Building Skia

In the following sections you will find straightforward steps to compile Skia. You can always check the official Skia instructions and select the OS you are building for. Aseprite and laf use the aseprite-m102 branch. So remember to checkout that specific branch.

These are the platform-specific steps to compile Skia:

After this you should have all Skia libraries compiled. After that, when you compile laf or Aseprite remember to add -DSKIA_DIR=$HOME/deps/skia parameter to your cmake call and all other parameters.

Skia on Windows

Download Google depot tools and uncompress it in some place like C:\deps\depot_tools.

It's recommended to compile Skia with Clang to get better performance. So you will need to download Clang, and install it on a folder like C:\deps\llvm (a folder without whitespaces).

Open a command prompt window (cmd.exe) and call:

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=x64

The command above is required while attempting to compile the 64-bit version of skia. When compiling the 32-bit version, it is possible to open a developer command prompt instead.

Then:

set PATH=C:\deps\depot_tools;%PATH%
cd C:\deps\depot_tools
gclient sync

(The gclient command might print an error like Error: client not configured; see 'gclient config'. Just ignore it.)

cd C:\deps
git clone -b aseprite-m102 https://github.com/aseprite/skia.git
cd skia
set GIT_EXECUTABLE=git.bat
python tools/git-sync-deps

(The tools/git-sync-deps will take some minutes because it downloads a lot of packages, please wait and re-run the same command in case it fails.)

Finally, if you've downloaded Clang, use this command:

set PATH=C:\deps\llvm\bin;%PATH%
set PATH=C:\deps\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin;%PATH%
gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" cc=""clang"" cxx=""clang++"" clang_win=""c:\deps\llvm"" win_vc=""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"" extra_cflags=[""-MT""]"
ninja -C out/Release-x64 skia modules

If you haven't installed Clang, and want to compile Skia with MSVC (anyway it's not recommended because the performance penalty is too big), you can use the following commands instead:

gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" win_vc=""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"" extra_cflags=[""-MT""]"
ninja -C out/Release-x64 skia modules

Skia on macOS

These steps will create a deps folder in your home directory with a couple of subdirectories needed to build Skia (you can change the $HOME/deps with other directory). Some of these commands will take several minutes to finish:

mkdir $HOME/deps
cd $HOME/deps
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone -b aseprite-m102 https://github.com/aseprite/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
python tools/git-sync-deps
gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"x64\" extra_cflags=[\"-stdlib=libc++\", \"-mmacosx-version-min=10.9\"] extra_cflags_cc=[\"-frtti\"]"
ninja -C out/Release-x64 skia modules

Skia on macOS for Apple Silicon

If you want to compile Skia for Apple Silicon (e.g. M1), you have to specify the arm64 CPU architecture:

gn gen out/Release-arm64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"arm64\" extra_cflags=[\"-stdlib=libc++\", \"-mmacosx-version-min=11.0\"] extra_cflags_cc=[\"-frtti\"]"
ninja -C out/Release-arm64 skia modules

Skia on Linux

These steps will create a deps folder in your home directory with a couple of subdirectories needed to build Skia (you can change the $HOME/deps with other directory). Some of these commands will take several minutes to finish:

mkdir $HOME/deps
cd $HOME/deps
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone -b aseprite-m102 https://github.com/aseprite/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
python tools/git-sync-deps

Next step is to generate the compilation rules. You have two options, run just one:

  1. Generate rules for compiling skia using clang (recommended if you have clang compiler):

     gn gen out/Release-x64 --args='is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false cc="clang" cxx="clang++" extra_cflags_cc=["-stdlib=libc++"] extra_ldflags=["-stdlib=libc++"]'
    
  2. Generate rules for compiling skia using the default compiler (usually g++):

     gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false"
    

Final step:

ninja -C out/Release-x64 skia modules

REMEMBER: When compiling Aseprite or laf, check that you are using the same compiler (clang or g++) as the one used for compiling skia.

skia's People

Contributors

adlai-holler avatar brianosman avatar bsalomon avatar cary-clark avatar csmartdalton86 avatar dogben avatar drwulf avatar egdaniel avatar erock2112 avatar fmalita avatar halcanary avatar heathmill avatar herbderby avatar jbeta51 avatar jcgregorio avatar johnstiles-google avatar joshualitt avatar jvanverth avatar kjlubick avatar kkinnunen avatar leonscroggins avatar lhkbob avatar liyuqian avatar mattsarett avatar reed-at-google avatar rmistry avatar rphilli avatar rusino avatar senorblanco avatar tdenniston avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

skia's Issues

ninja: FAILED: libexpat.a

I think this is linked to ISSUE27.

While executing

ninja -C out/Release-x64 skia modules

the error

FAILED: libexpat.a
python "/home/rb/deps/skia/gn/rm.py" "libexpat.a" && ar rcs libexpat.a @libexpat.a.rsp
/bin/sh: 1: python: not found
[427/1786] compile ../../third_party/externals/harfbuzz/src/hb-ot-layout.cc
ninja: build stopped: subcommand failed.

occured (at step 414/1786).

edit: Just realized, when I'm executing ninja over and over again, it fails on a different file every time, but always claims it's the error at libexpat.a.

I'm using Linux Mint, full updated.

Skia build failing (MacOS 12.3)

Followed the instructions here for building Skia for mac but the build keeps failing at theskia Abdulhamid$ ninja -C out/Release-x64 skia modules. command.

The previous commands run find, but this command returns the following errors:

(base) Abdulhamids-Mac-Pro:skia Abdulhamid$ ninja -C out/Release-x64 skia modules ninja: Entering directory out/Release-x64' [1/1759] compile ../../third_party/externals/libwebp/src/utils/random_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.random_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.random_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/random_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.random_utils.o ../../third_party/externals/libwebp/src/utils/random_utils.c:14:10: fatal error: 'string.h' file not found #include <string.h> ^~~~~~~~~~ 1 error generated. [2/1759] compile ../../third_party/externals/libwebp/src/utils/quant_levels_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.quant_levels_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.quant_levels_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/quant_levels_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.quant_levels_utils.o ../../third_party/externals/libwebp/src/utils/quant_levels_utils.c:15:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [3/1759] compile ../../third_party/externals/libwebp/src/utils/rescaler_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.rescaler_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.rescaler_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/rescaler_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.rescaler_utils.o ../../third_party/externals/libwebp/src/utils/rescaler_utils.c:14:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [4/1759] compile ../../third_party/externals/libwebp/src/utils/filters_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.filters_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.filters_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/filters_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.filters_utils.o In file included from ../../third_party/externals/libwebp/src/utils/filters_utils.c:14: In file included from /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src/utils/filters_utils.h:17: In file included from /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src/webp/types.h:20: /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found #include_next <inttypes.h> ^~~~~~~~~~~~ 1 error generated. [5/1759] compile ../../third_party/externals/libwebp/src/utils/bit_writer_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.bit_writer_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.bit_writer_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/bit_writer_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.bit_writer_utils.o ../../third_party/externals/libwebp/src/utils/bit_writer_utils.c:15:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [6/1759] compile ../../third_party/externals/libwebp/src/utils/color_cache_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.color_cache_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.color_cache_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/color_cache_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.color_cache_utils.o ../../third_party/externals/libwebp/src/utils/color_cache_utils.c:14:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [7/1759] compile ../../third_party/externals/libwebp/src/utils/huffman_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.huffman_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.huffman_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/huffman_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.huffman_utils.o ../../third_party/externals/libwebp/src/utils/huffman_utils.c:14:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [8/1759] compile ../../third_party/externals/libwebp/src/utils/thread_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.thread_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.thread_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/thread_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.thread_utils.o ../../third_party/externals/libwebp/src/utils/thread_utils.c:14:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [9/1759] compile ../../third_party/externals/libwebp/src/utils/utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.utils.o ../../third_party/externals/libwebp/src/utils/utils.c:14:10: fatal error: 'stdlib.h' file not found #include <stdlib.h> ^~~~~~~~~~ 1 error generated. [10/1759] compile ../../third_party/externals/libwebp/src/utils/bit_reader_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.bit_reader_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.bit_reader_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/bit_reader_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.bit_reader_utils.o In file included from ../../third_party/externals/libwebp/src/utils/bit_reader_utils.c:18: /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src/utils/bit_reader_inl_utils.h:23:10: fatal error: 'string.h' file not found #include <string.h> // for memcpy ^~~~~~~~~~ 1 error generated. [11/1759] compile ../../third_party/externals/libwebp/src/utils/quant_levels_dec_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.quant_levels_dec_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.quant_levels_dec_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/quant_levels_dec_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.quant_levels_dec_utils.o In file included from ../../third_party/externals/libwebp/src/utils/quant_levels_dec_utils.c:17: In file included from /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src/utils/quant_levels_dec_utils.h:17: In file included from /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src/webp/types.h:20: /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found #include_next <inttypes.h> ^~~~~~~~~~~~ 1 error generated. [12/1759] compile ../../third_party/externals/libwebp/src/mux/muxinternal.c FAILED: obj/third_party/externals/libwebp/src/mux/libwebp.muxinternal.o cc -MD -MF obj/third_party/externals/libwebp/src/mux/libwebp.muxinternal.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/mux/muxinternal.c -o obj/third_party/externals/libwebp/src/mux/libwebp.muxinternal.o ../../third_party/externals/libwebp/src/mux/muxinternal.c:15:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [13/1759] compile ../../third_party/externals/libwebp/src/utils/huffman_encode_utils.c FAILED: obj/third_party/externals/libwebp/src/utils/libwebp.huffman_encode_utils.o cc -MD -MF obj/third_party/externals/libwebp/src/utils/libwebp.huffman_encode_utils.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/utils/huffman_encode_utils.c -o obj/third_party/externals/libwebp/src/utils/libwebp.huffman_encode_utils.o ../../third_party/externals/libwebp/src/utils/huffman_encode_utils.c:14:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. [14/1759] compile ../../third_party/externals/libwebp/src/mux/anim_encode.c FAILED: obj/third_party/externals/libwebp/src/mux/libwebp.anim_encode.o cc -MD -MF obj/third_party/externals/libwebp/src/mux/libwebp.anim_encode.o.d -DNDEBUG -DWEBP_SWAP_16BIT_CSP -w -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\' -O3 -stdlib=libc++ -mmacosx-version-min=10.9 -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp/src -isystem /Users/Abdulhamid/deps/skia/third_party/externals/libwebp -c ../../third_party/externals/libwebp/src/mux/anim_encode.c -o obj/third_party/externals/libwebp/src/mux/libwebp.anim_encode.o ../../third_party/externals/libwebp/src/mux/anim_encode.c:13:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. ninja: build stopped: subcommand failed.

The super long command gives me IndesxError: list index out of range

I use windows 11, visuale studio 2022 and windows 11 sdk

The Code:

gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" cc=""clang"" cxx=""clang++"" clang_win=""c:\deps\llvm"" win_vc=""C:\Program Files\Microsoft Visual Studio\2022\Community\VC"" extra_cflags=[""-MT""]"

The Error:

Traceback (most recent call last):
  File "C:/deps/skia/gn/highest_version_dir.py", line 17, in <module>
    print(sorted(filter(regex.match, os.listdir(dirpath)))[-1])
IndexError: list index out of range
ERROR at //gn/BUILDCONFIG.gn:155:25: Script returned non-zero exit code.
    clang_win_version = exec_script("//gn/highest_version_dir.py",
                        ^----------
Current dir: C:/deps/skia/out/Release-x64/
Command: C:/deps/depot_tools/bootstrap-2@3_8_10_chromium_26_bin/python3/bin/python3.exe C:/deps/skia/gn/highest_version_dir.py "c:\deps\llvm/lib/clang" "[0-9]+\.[0-9]+\.[0-9]+"
Returned 1.

The file that encountered the error =>

image

Missing interfaces of Skia

You removed (or at least missing) quite some interfaces in your build:

  • GrDirectContext
  • core/SkAutoMalloc.h
  • dawn/webgpu_cpp.h
  • dawn_native/DawnNative.h
  • dawn/dawn_wsi.h
  • dawn/dawn_proc.h
  • ..
  • ...

I would like to use your Skia static library to build the Skia Hello World example.

Regards,
Melroy

Usr/local/include not included in build includes

harfbuzz installs by default to /usr/local/include/harfbuzz. I had to manually copy harfbuzz source to /usr/include/harfbuzz to get skia to build.

ben@benpi-desktop:~/deps/skia$ find / -name "hb.h" 2>/dev/null
/usr/local/include/harfbuzz/hb.h
/home/ben/Projects/aseprite/third_party/harfbuzz/src/hb.h
/home/ben/deps/skia/third_party/externals/harfbuzz/src/hb.h
/home/ben/deps/harfbuzz/src/hb.h

[1/422] compile ../../modules/skshaper/src/SkShaper_harfbuzz.cpp
FAILED: obj/modules/skshaper/src/libskshaper.SkShaper_harfbuzz.o 
g++ -MD -MF obj/modules/skshaper/src/libskshaper.SkShaper_harfbuzz.o.d -DSKSHAPER_IMPLEMENTATION=1 -DNDEBUG -DSK_GAMMA_APPLY_TO_A8 -DSK_SHAPER_HARFBUZZ_AVAILABLE -DSK_GL -DSK_SUPPORT_PDF -DSK_HAS_JPEG_LIBRARY -DSK_USE_LIBGIFCODEC -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_HAS_WEBP_LIBRARY -DSK_XML -DSK_R32_SHIFT=16 -DU_USING_ICU_NAMESPACE=0 -DSK_USING_THIRD_PARTY_ICU -I../../modules/skshaper/include -I../.. -I../../third_party/externals/libgifcodec -I/usr/include/harfbuzz -fstrict-aliasing -fPIC -O3 -fdata-sections -ffunction-sections -Wno-unused-parameter -I /home/ben/deps/skia/third_party/externals/icu/source/common -I /home/ben/deps/skia/third_party/externals/icu/source/i18n -I /home/ben/deps/skia/third_party/icu -std=c++17 -fno-exceptions -fno-rtti -c ../../modules/skshaper/src/SkShaper_harfbuzz.cpp -o obj/modules/skshaper/src/libskshaper.SkShaper_harfbuzz.o
../../modules/skshaper/src/SkShaper_harfbuzz.cpp:32:10: fatal error: hb.h: No such file or directory
   32 | #include <hb.h>
      |          ^~~~~~
compilation terminated.

Skia build cannot sync dependencies according to documentation.

System: Debian 11 Amd64

I have been trying to build skia from source in Debian Linux 11 in order to build aseprite. In the step where I need to sync dependencies with command python3 tools/git-sync-deps the step fails with the stack trace below:

$ python3 tools/git-sync-deps
error: 3742 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
Exception in thread Thread-11:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/aseprite/deps/skia/tools/git-sync-deps", line 134, in git_checkout_to_directory
    subprocess.check_call(
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'clone', '--quiet', '--no-checkout', 'https://github.com/aseprite/freetype2.git', '/home/aseprite/deps/skia/third_party/externals/freetype']' returned non-zero exit status 128.

Unable to build on windows 11

Getting this error after tools/git-sync-deps step on windows 11

C:\deps\skia>gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" cc=""clang"" cxx=""clang++"" clang_win=""c:\deps\llvm"" win_vc=""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"" extra_cflags=[""-MT""]"
Traceback (most recent call last):
  File "C:/deps/skia/gn/highest_version_dir.py", line 17, in <module>
    print(sorted(filter(regex.match, os.listdir(dirpath)))[-1])
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:/Program Files (x86)/Windows Kits/10/Include'
ERROR at //gn/BUILDCONFIG.gn:147:23: Script returned non-zero exit code.
    win_sdk_version = exec_script("//gn/highest_version_dir.py",
                      ^----------
Current dir: C:/deps/skia/out/Release-x64/
Command: C:/deps/depot_tools/bootstrap-2@3_8_10_chromium_26_bin/python3/bin/python3.exe C:/deps/skia/gn/highest_version_dir.py "C:/Program Files (x86)/Windows Kits/10/Include" "[0-9]{2}\.[0-9]\.[0-9]{5}\.[0-9]"
Returned 1.

Updating the Skia windows compilation instructions in ReadMe

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=x64

gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" cc=""clang"" cxx=""clang++"" clang_win=""c:\deps\llvm"" win_vc=""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"" extra_cflags=[""-MT""]"

wanted to point out how the aseprite INSTALL.MD had updated the file to support visual studio community 2022 version

changing these commands in the skia README to :
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=x64

gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" cc=""clang"" cxx=""clang++"" clang_win=""c:\deps\llvm"" win_vc=""C:\Program Files\Microsoft Visual Studio\2022\Community\VC"" extra_cflags=[""-MT""]"

for m1 MacBook build failed proble

1 error generated.
[313/1624] compile ../../third_party/externals/zlib/crc_folding.c
FAILED: obj/third_party/externals/zlib/libzlib_x86.crc_folding.o
cc -MD -MF obj/third_party/externals/zlib/libzlib_x86.crc_folding.o.d -DNDEBUG -w -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -O3 -Wno-unused-parameter -stdlib=libc++ -mmacosx-version-min=10.9 -msse4.2 -mpclmul -c ../../third_party/externals/zlib/crc_folding.c -o obj/third_party/externals/zlib/libzlib_x86.crc_folding.o
In file included from ../../third_party/externals/zlib/crc_folding.c:22:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/emmintrin.h:13:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/xmmintrin.h:13:
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:50:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:129:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:159:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:189:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:216:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:239:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:260:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:287:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:310:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:331:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:352:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:373:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:394:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:416:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:439:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:461:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:483:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddusw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:504:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:525:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_psubw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[320/1624] ACTION //third_party/icu:ma...data_assembly(//gn/toolchain:gcc_like)
Generated gen/third_party/icu/icudtl_dat.S
ninja: build stopped: subcommand failed.

need change blow "target_cpu"
gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu="x64" extra_cflags=["-stdlib=libc++", "-mmacosx-version-min=10.9"] extra_cflags_cc=["-frtti"]"

to

target_cpu="aarch64-apple-darwin"

Issue when running cmake for skia / ninja (autofit)

Iโ€™m trying to run cmake via the guides on github, but Iโ€™m encountering an issue where the following line fails:

\deps\skia>ninja -C out/Release-x64 skia modules
(Iโ€™m not running directly on my C drive as itโ€™s low on space, so is on another drive)

This gives me the following error:
ninja: error: โ€˜โ€ฆ/โ€ฆ/third_party/externals/freetype/src/autofit/autofit.cโ€™, needed by โ€˜obj/third_party/externals/freetype/src/autofit/freetype2.autofit.objโ€™, missing and no known rule to make it

I tried to just continue on, but think that this needs to be solved first. ๐Ÿ˜…
Please help! ๐Ÿค”

Trouble trying to build skia from source

I'm probably being a bad person just posting terminal logs but I've just been following the aseprite build guide and I don't know what I fucked up, sorry about this.

akira@LinuxMint-9214:~/deps$ git clone -b aseprite-m81 https://github.com/aseprite/skia.git
Cloning into 'skia'...
remote: Enumerating objects: 541853, done.
remote: Total 541853 (delta 0), reused 0 (delta 0), pack-reused 541853
Receiving objects: 100% (541853/541853), 439.78 MiB | 2.77 MiB/s, done.
Resolving deltas: 100% (449772/449772), done.
akira@LinuxMint-9214:~/deps$ export PATH="${PWD}/depot_tools:${PATH}"
akira@LinuxMint-9214:~/deps$ cd skia
akira@LinuxMint-9214:~/deps/skia$ python tools/git-sync-deps
Skipping "../src".
third_party/externals/libgifcodec    > 38d9c73f49b861bb4a9829371ac311544b120023
third_party/externals/microhttpd     > 748945ec6f1c67b7efc934ab0808e1d32f2fb98d
common                               > 9737551d7a52c3db3262db5856e6bcd62c462b92
buildtools                           > 505de88083136eefd056e5ee4ca0f01fe9b33de8
third_party/externals/opencl-lib     > 4e6d30e406d2e5a65e1d65e404fe6df5f772a32b
third_party/externals/piex           > bb217acdca1cc0c16b704669dd6f91a1b509c406
third_party/externals/zlib           > 47af7c547f8551bd25424e56354a2ae1e9062859
third_party/externals/dng_sdk        > c8d0c9b1d16bfda56f15165d39e0ffa360a11123
third_party/externals/egl-registry   > a0bca08de07c7d7651047bedc0b653cfaaa4f2ae
third_party/externals/spirv-headers  > 29c11140baaf9f7fdaa39a583672c556bf1795a1
third_party/externals/libwebp        > 0fe1a89dbf1930fc2554dbe76adad5d962054ead
third_party/externals/expat          > e5aa0a2cb0a5f759ef31c0819dc67d9b14246a4a
third_party/externals/dawn           > 604072bc2ed01018eb03bcbbf9d94042f679af63
third_party/externals/libjpeg-turbo  > 574f3a772c96dc9db2c98ef24706feb3f6dbda9a
third_party/externals/lua            > e354c6355e7f48e087678ec49e340ca0696725b1
third_party/externals/spirv-cross    > 53ab2144b90abede33be5161aec5dfc94ddc3caf
third_party/externals/libpng         > 386707c6d19b974ca2e3db7f5c61873813c6fe44
third_party/externals/spirv-tools    > 0c4feb643b89d1792b02f7cbef315e9d95633bd7
third_party/externals/harfbuzz       > 3a74ee528255cc027d84b204a87b5c25e47bff79
third_party/externals/freetype       > 0a3d2bb99b45b72e1d45185ab054efa993d97210
third_party/externals/sfntly         > b55ff303ea2f9e26702b514cf6a3196a2e3e2974
third_party/externals/wuffs          > 4080840928c0b05a80cda0d14ac2e2615f679f1a
third_party/externals/angle2         > ee07cb317579dfda40dabb5d6d9c209e0e9e0643
third_party/externals/opengl-regi... > 14b80ebeab022b2c78f84a573f01028c96075553
third_party/externals/swiftshader    > 430def835f9f85d52f4a96db9b715cd9a7403c9c
third_party/externals/imgui          > d38d7c6628bebd02692cfdd6fa76b4d992a35b75
third_party/externals/sdl            > 5d7cfcca344034aff9327f77fc181ae3754e7a90
third_party/externals/opencl-regi... > 932ed55c85f887041291cef8019e54280c033c35
third_party/externals/icu            > dbd3825b31041d782c5b504c59dcfb5ac7dda08c
akira@LinuxMint-9214:~/deps/skia$ gn gen out/Release-x64 --args="is_debug=false 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"
ERROR at //gn/BUILDCONFIG.gn:85:14: Script returned non-zero exit code.
  is_clang = exec_script("//gn/is_clang.py",
             ^----------
Current dir: /home/akira/deps/skia/out/Release-x64/
Command: python /home/akira/deps/skia/gn/is_clang.py cc c++
Returned 1.
stderr:

  File "/home/akira/deps/skia/gn/is_clang.py", line 14
    print 'true'
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('true')?

akira@LinuxMint-9214:~/deps/skia$ ninja -C out/Release-x64 skia modules
ninja: Entering directory `out/Release-x64'
ninja: error: loading 'build.ninja': No such file or directory
akira@LinuxMint-9214:~/deps/skia$ 

bin/fetch-gn returned non-zero exit status of 1

When trying to run python tools/git-sync-deps, I receive a series of errors culminating in subprocess.CalledProcessError: Command '['/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'bin/fetch-gn']' returned non-zero exit status 1.

When running python3 tools/git-sync-deps, I receive the alternate error
subprocess.CalledProcessError: Command '['/usr/local/bin/python3', 'bin/fetch-gn']' returned non-zero exit status 1.

All of the other python submodules seem to be compiling fine up to this point.
I am running this in zsh on MacOS Big Sur 11.6.5 .

Full errors:
For python tools/git-sync-deps:

Skipping "bin".
third_party/externals/brotli         @ e61745a6b7add50d380cfd7d3883dd6c62fc2c71
third_party/externals/abseil-cpp     @ c5a424a2a21005660b182516eb7a079cd8021699
buildtools                           @ b138e6ce86ae843c42a1a08f37903207bebcca75
third_party/externals/angle2         @ 8718783526307a3fbb35d4c1ad4e8101262a0d73
third_party/externals/d3d12allocator @ 169895d529dfce00390a20e69c2f516066fe7a3b
third_party/externals/expat          @ a28238bdeebc087071777001245df1876a11f5ee
third_party/externals/dng_sdk        @ c8d0c9b1d16bfda56f15165d39e0ffa360a11123
third_party/externals/emsdk          @ fc645b7626ebf86530dbd82fbece74d457e7ae07
third_party/externals/egl-registry   @ a0bca08de07c7d7651047bedc0b653cfaaa4f2ae
third_party/externals/highway        @ 424360251cdcfc314cfc528f53c872ecd63af0f0
third_party/externals/dawn           @ 088a600b03679cd20991f145173a573ed9c03480
third_party/externals/jinja2         @ ee69aa00ee8536f61db6a451f3858745cf587de6
third_party/externals/markupsafe     @ 0944e71f4b2cb9a871bcbe353f95e889b64a611a
third_party/externals/harfbuzz       @ 8d1b000a3edc90c12267b836b4ef3f81c0e53edc
third_party/externals/icu            @ a0718d4f121727e30b8d52c7a189ebf5ab52421f
third_party/externals/libjpeg-turbo  @ 22f1a22c99e9dde8cd3c72ead333f425c5a7aa77
third_party/externals/freetype       @ f122349b937d7d2b0f8b72f46f60a082ca6006db
...d_party/externals/opengl-registry @ 14b80ebeab022b2c78f84a573f01028c96075553
third_party/externals/libpng         @ 386707c6d19b974ca2e3db7f5c61873813c6fe44
third_party/externals/libwebp        @ 20ef03ee351d4ff03fc5ff3ec4804a879d1b9d5c
third_party/externals/sfntly         @ b55ff303ea2f9e26702b514cf6a3196a2e3e2974
third_party/externals/imgui          @ 55d35d8387c15bf0cfd71861df67af8cfbda7456
third_party/externals/oboe           @ b02a12d1dd821118763debec6b83d00a8a0ee419
third_party/externals/libjxl         @ a205468bc5d3a353fb15dae2398a101dff52f2d3
third_party/externals/piex           @ bb217acdca1cc0c16b704669dd6f91a1b509c406
third_party/externals/spirv-tools    @ cb96abbf7affd986016f17dd09f9f971138a922b
third_party/externals/libgifcodec    @ fd59fa92a0c86788dcdd84d091e1ce81eda06a77
third_party/externals/wuffs          @ 600cd96cf47788ee3a74b40a6028b035c9fd6a61
third_party/externals/vulkan-tools   @ fa288188b574d9eee31cd52c5432780b6a46a412
third_party/externals/vulkan-headers @ 76f00ef6cbb1886eb1162d1fa39bee8b51e22ee8
third_party/externals/microhttpd     @ 748945ec6f1c67b7efc934ab0808e1d32f2fb98d
third_party/externals/spirv-headers  @ 82becc8a8a92e509d3d8d635889da0a3c17d0606
third_party/externals/spirv-cross    @ 6a67891418a3f08be63f92726e049dc788e46f5b
third_party/externals/swiftshader    @ 1d450ae99a0f4ade28dd55dac962f8b28d990376
third_party/externals/vulkan-deps    @ 565408992c44e7d969af8c417a0f72730a85c880
third_party/externals/zlib           @ c876c8f87101c5a75f6014b0f832499afeb65b73
Traceback (most recent call last):
  File "bin/fetch-gn", line 31, in <module>
    f.write(urlopen(url).read())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1241, in https_open
    context=self._context)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 54] Connection reset by peer>
Traceback (most recent call last):
  File "tools/git-sync-deps", line 272, in <module>
    exit(main(sys.argv[1:]))
  File "tools/git-sync-deps", line 264, in main
    os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'bin/fetch-gn']' returned non-zero exit status 1 ```


For `python3 tools/git-sync-deps`:


``` Skipping "../src".
Skipping "bin".
third_party/externals/abseil-cpp     @ c5a424a2a21005660b182516eb7a079cd8021699
buildtools                           @ b138e6ce86ae843c42a1a08f37903207bebcca75
third_party/externals/angle2         @ 8718783526307a3fbb35d4c1ad4e8101262a0d73
third_party/externals/d3d12allocator @ 169895d529dfce00390a20e69c2f516066fe7a3b
third_party/externals/dng_sdk        @ c8d0c9b1d16bfda56f15165d39e0ffa360a11123
third_party/externals/brotli         @ e61745a6b7add50d380cfd7d3883dd6c62fc2c71
third_party/externals/egl-registry   @ a0bca08de07c7d7651047bedc0b653cfaaa4f2ae
third_party/externals/expat          @ a28238bdeebc087071777001245df1876a11f5ee
third_party/externals/emsdk          @ fc645b7626ebf86530dbd82fbece74d457e7ae07
third_party/externals/harfbuzz       @ 8d1b000a3edc90c12267b836b4ef3f81c0e53edc
third_party/externals/freetype       @ f122349b937d7d2b0f8b72f46f60a082ca6006db
third_party/externals/imgui          @ 55d35d8387c15bf0cfd71861df67af8cfbda7456
third_party/externals/highway        @ 424360251cdcfc314cfc528f53c872ecd63af0f0
third_party/externals/spirv-headers  @ 82becc8a8a92e509d3d8d635889da0a3c17d0606
third_party/externals/libpng         @ 386707c6d19b974ca2e3db7f5c61873813c6fe44
third_party/externals/dawn           @ 088a600b03679cd20991f145173a573ed9c03480
third_party/externals/jinja2         @ ee69aa00ee8536f61db6a451f3858745cf587de6
third_party/externals/libgifcodec    @ fd59fa92a0c86788dcdd84d091e1ce81eda06a77
third_party/externals/libjxl         @ a205468bc5d3a353fb15dae2398a101dff52f2d3
third_party/externals/microhttpd     @ 748945ec6f1c67b7efc934ab0808e1d32f2fb98d
third_party/externals/piex           @ bb217acdca1cc0c16b704669dd6f91a1b509c406
third_party/externals/icu            @ a0718d4f121727e30b8d52c7a189ebf5ab52421f
third_party/externals/libwebp        @ 20ef03ee351d4ff03fc5ff3ec4804a879d1b9d5c
...d_party/externals/opengl-registry @ 14b80ebeab022b2c78f84a573f01028c96075553
third_party/externals/wuffs          @ 600cd96cf47788ee3a74b40a6028b035c9fd6a61
third_party/externals/oboe           @ b02a12d1dd821118763debec6b83d00a8a0ee419
third_party/externals/zlib           @ c876c8f87101c5a75f6014b0f832499afeb65b73
third_party/externals/vulkan-deps    @ 565408992c44e7d969af8c417a0f72730a85c880
third_party/externals/sfntly         @ b55ff303ea2f9e26702b514cf6a3196a2e3e2974
third_party/externals/spirv-cross    @ 6a67891418a3f08be63f92726e049dc788e46f5b
third_party/externals/libjpeg-turbo  @ 22f1a22c99e9dde8cd3c72ead333f425c5a7aa77
third_party/externals/markupsafe     @ 0944e71f4b2cb9a871bcbe353f95e889b64a611a
third_party/externals/swiftshader    @ 1d450ae99a0f4ade28dd55dac962f8b28d990376
third_party/externals/vulkan-headers @ 76f00ef6cbb1886eb1162d1fa39bee8b51e22ee8
third_party/externals/spirv-tools    @ cb96abbf7affd986016f17dd09f9f971138a922b
third_party/externals/vulkan-tools   @ fa288188b574d9eee31cd52c5432780b6a46a412
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect
    server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 853, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1117, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/fetch-gn", line 31, in <module>
    f.write(urlopen(url).read())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 54] Connection reset by peer>
Traceback (most recent call last):
  File "tools/git-sync-deps", line 272, in <module>
    exit(main(sys.argv[1:]))
  File "tools/git-sync-deps", line 264, in main
    os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')])
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/python3', 'bin/fetch-gn']' returned non-zero exit status 1.

command not found: gn

I've been trying to compile ### skia on my Mac running Catalina 10.15.7.

I've gotten to the step:
$ gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"x64\" extra_cflags=[\"-stdlib=libc++\", \"-mmacosx-version-min=10.9\"] extra_cflags_cc=[\"-frtti\"]"

But I've been getting the following error:
$ command not found: gn

Any ideas??

python3 tools/git-sync-deps not working

when running python3 tools/git-sync-deps
i get ".../skia/third_party/externals/imgui @ 55d35d8387c15bf0cfd71861df67af8cfbda7456
...skia/third_party/externals/angle2 @ 8718783526307a3fbb35d4c1ad4e8101262a0d73
fatal: unable to access 'https://github.com/aseprite/freetype2.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
fatal: unable to access 'https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Exception in thread Exception in thread Thread-27 (git_checkout_to_directory):
Thread-11 (git_checkout_to_directory):
Traceback (most recent call last):
Traceback (most recent call last):
" this was after i ran the second time and i got the same error

Multiple errors in build.

Attempting to create build files with command:

PS.C:\..\..\bin\gn gen out/Shared --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" cc=""clang"" cxx=""clang++"" clang_win=""C:\Users\USERNAME\source\repos\LLVM\bin"" win_vc=""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"" extra_cflags=[""-MT""]"

Results in the following error message:

File "../source/repos/skia/gn/highest_version_dir.py", line 15 print sorted(filter(regex.match, os.listdir(dirpath)))[-1] ^ SyntaxError: invalid syntax ERROR at //gn/BUILDCONFIG.gn:133:29: Script returned non-zero exit code. win_toolchain_version = exec_script("//gn/highest_version_dir.py", ^---------- Current dir: C:/Users/USERNAME/source/repos/skia/out/Shared/ Command: "C:/Program Files/Python38/python.exe" C:/Users/USERNAME/source/repos/skia/gn/highest_version_dir.py "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC/Tools/MSVC" "[0-9]{2}\.[0-9]{2}\.[0-9]{5}" Returned 1.

Removing the --args parameter results in an error (despite having the build-dir on the commandline):

ERROR Need exactly one build directory to generate.

Issue building Skia on Debian

When running the following line while building Skia :
gn gen out/Release-x64 --args="is_debug=false 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"

I encounter the following Error :

ERROR at //gn/BUILDCONFIG.gn:85:14: Script returned non-zero exit code.
  is_clang = exec_script("//gn/is_clang.py",
             ^----------
Current dir: /root/deps/skia/out/Release-x64/
Command: python /root/deps/skia/gn/is_clang.py cc c++
Returned 1.
stderr:

  File "/root/deps/skia/gn/is_clang.py", line 14
    print 'true'
               ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('true')?

I guess it's related with me using python3... but I don't know how to force run the line with python2.7
I've tried to edit the missing parentheses in the is_clang.py file, but another error is then raised.

I did not encounter any error running the previous lines (at the bottom of the https://github.com/aseprite/skia page, in the Skia on linux part).

Has anyone else encountered such a problem before?

Debian 9.12 (stretch)

Failed to install emsdk when running git-sync-deps on RPi 4

I found someone has built m96 for the RPi. aseprite/aseprite#2835 (comment)
So I tried to follow the build instructions for m102 on my RPi 4, but it's not building?

System

System: Raspberry Pi 4 B
OS: Raspberry Pi OS (32-bit)

Terminal log

Skipping "../src".
Skipping "bin".
...skia/third_party/externals/brotli @ e61745a6b7add50d380cfd7d3883dd6c62fc2c71
/home/username/deps/skia/buildtools @ b138e6ce86ae843c42a1a08f37903207bebcca75
.../third_party/externals/abseil-cpp @ c5a424a2a21005660b182516eb7a079cd8021699
...rd_party/externals/d3d12allocator @ 169895d529dfce00390a20e69c2f516066fe7a3b
... # omitted because too long
...s/skia/third_party/externals/zlib @ c876c8f87101c5a75f6014b0f832499afeb65b73
...third_party/externals/swiftshader @ 1d450ae99a0f4ade28dd55dac962f8b28d990376
Resolving SDK version '3.1.3' to 'sdk-releases-upstream-2ddc66235392b37e5b33477fd86cbe01a14b8aa2-64bit'
error: tool or SDK not found: 'sdk-releases-upstream-2ddc66235392b37e5b33477fd86cbe01a14b8aa2-64bit'
Failed to install emsdk
Traceback (most recent call last):
  File "/home/username/deps/skia/tools/git-sync-deps", line 272, in <module>
    exit(main(sys.argv[1:]))
  File "/home/username/deps/skia/tools/git-sync-deps", line 265, in main
    subprocess.check_call(
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '/home/username/deps/skia/bin/activate-emsdk']' returned non-zero exit status 1.

Multiple Build Issues on Ninja

Hello!
When building using the directions with Clang installed, I get a fail because of too many errors from the code. I have run everything according to the compilation directions.
Pastebin Link: Link

ninja: error: 'hb-aat-layout.cc' needed / missing

C:\deps\skia>gn gen out/Release-x64 --args="is_debug=false 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 skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=""x64"" cc=""clang"" cxx=""clang++"" clang_win=""c:\deps\llvm"" win_vc=""C:\Program Files\Microsoft Visual Studio\2022\Community\VC"" extra_cflags=[""-MT""]"
Done. Made 98 targets from 54 files in 1183ms

C:\deps\skia>ninja -C out/Release-x64 skia modules
ninja: error: '../../third_party/externals/harfbuzz/src/hb-aat-layout.cc', needed by 'obj/third_party/externals/harfbuzz/src/harfbuzz.hb-aat-layout.obj', missing and no known rule to make it
ninja: Entering directory `out/Release-x64'

TypeError: a bytes-like object is required, not 'str'

With Python 3.8.10

Current dir: /home/<user>/dep/skia/out/Release-x64/
Command: python /home/<user>/dep/skia/gn/is_clang.py cc c++
Returned 1.
stderr:

Traceback (most recent call last):
  File "/home/<user>/dep/skia/gn/is_clang.py", line 12, in <module>
    if ('clang' in subprocess.check_output('%s --version' % cc, shell=True) and
TypeError: a bytes-like object is required, not 'str'

@skia Please indicate which python should be used to compile this

fatal: remote error: Git repository not found

When fetching skia's dependencies prior to building skia, the skia common repo fails to sync because the repository appears to have been deleted from the server:

$ python3.9 tools/git-sync-deps
fatal: remote error: Git repository not found
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/path/to/skia/tools/git-sync-deps", line 131, in git_checkout_to_directory
    subprocess.check_call(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'clone', '--quiet', '--no-checkout', 'https://skia.googlesource.com/common.git', '/path/to/skia/common']' returned non-zero exit status 128.
Skipping "../src".

This does not prevent the build from completing successfully.

python error while compiling

"ninja: Entering directory `out/Release-x64'
[1/1189] link libexpat.a
FAILED: libexpat.a
python "/home/shi6/deps/skia/gn/rm.py" "libexpat.a" && ar rcs libexpat.a @libexpat.a.rsp
/bin/sh: 1: python: not found
[6/1189] compile ../../third_party/externals/dng_sdk/source/dng_mosaic_info.cpp
ninja: build stopped: subcommand failed.
" i tried a lot of stuff but can't fix it

Ninja build stage throwing an error because python is called

When building aseprite, an error gets thrown that seems to occur when python is called.

The thing is the compiler is running the python command, instead of python3 I use ubuntu.

FAILED: libexpat.a 
python "/home/pax/deps/skia/gn/rm.py" "libexpat.a" && ar rcs libexpat.a @libexpat.a.rsp
/bin/sh: 1: python: not found
[14/799] compile ../../third_party/externals/harfbuzz/src/hb-subset-plan.cc
ninja: build stopped: subcommand failed.

Can't build skia (macOS)

I didn't have any issues with all the steps before this one, but when I ran the following line:

ninja -C out/Release-x64 skia modules

This error showed up:

ninja: Entering directory `out/Release-x64'
ninja: error: '../../third_party/externals/icu/scripts/make_data_assembly.py', needed 
by 'gen/third_party/icu/icudtl_dat.S', missing and no known rule to make it

Is there something I'm missing? I'm stuck, please help :[

Ninja error while Building aseprite on source Code

System: Linux Mint 21.3

I've been trying to build aseprite on source Code on the new stable version of Linux Mint and i've enconter this issue on the last command line

~/deps/skia$ ninja -C out/Release-x64 skia modules

After the command:

ninja: Entering directory `out/Release-x64'
ninja: error: '../../third_party/externals/freetype/src/autofit/autofit.c', needed by 'obj/third_party/externals/freetype/src/autofit/libfreetype2.autofit.o', missing and no known rule to make it

Someone on the aseprite community have encounter the same issue, but in my case, I've used Clang in the previous step.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.