docker-aseprite-linux icon indicating copy to clipboard operation
docker-aseprite-linux copied to clipboard

Fail on compiling skia:

Open wiktorkujawa opened this issue 4 months ago • 4 comments

When I try to make build, I get this error on compiling skia:

Compiling skia
python3_bin_reldir.txt not found. need to initialize depot_tools by
running gclient, update_depot_tools or ensure_bootstrap.
make: *** [Makefile:4: build] Error 1

If I'm correct, that happens on these lines:

echo "Compiling 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"
ninja -C out/Release-x64 skia modules

wiktorkujawa avatar Aug 01 '25 20:08 wiktorkujawa

It can be fixed by moving the PATH export earlier, right after cloning depot_tools and adding the gclient command. This initializes depot_tools and creates the necessary files like python3_bin_reldir.txt

#!/bin/bash

# Fail on errors
set -e

echo "Download and compile Skia & other dependencies"
cd /dependencies

if [ ! -d "/dependencies/depot_tools" ]
then
  git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi

# Initialize depot_tools
export PATH="${PWD}/depot_tools:${PATH}"
gclient

if [ ! -d "/dependencies/skia" ]
then
  git clone -b aseprite-m102 https://github.com/aseprite/skia.git
fi

cd skia
pwd
echo "Syncing skia dependencies"
python3 tools/git-sync-deps

echo "Compiling 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"
ninja -C out/Release-x64 skia modules

# ... existing code ...

wiktorkujawa avatar Aug 01 '25 23:08 wiktorkujawa

It can be fixed by moving the PATH export earlier, right after cloning depot_tools and adding the gclient command. This initializes depot_tools and creates the necessary files like python3_bin_reldir.txt

#!/bin/bash

# Fail on errors
set -e

echo "Download and compile Skia & other dependencies"
cd /dependencies

if [ ! -d "/dependencies/depot_tools" ]
then
  git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi

# Initialize depot_tools
export PATH="${PWD}/depot_tools:${PATH}"
gclient

if [ ! -d "/dependencies/skia" ]
then
  git clone -b aseprite-m102 https://github.com/aseprite/skia.git
fi

cd skia
pwd
echo "Syncing skia dependencies"
python3 tools/git-sync-deps

echo "Compiling 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"
ninja -C out/Release-x64 skia modules

# ... existing code ...

you are now in possession of my gratitude

i-walk-away avatar Aug 26 '25 09:08 i-walk-away

Feel free to make a PR :)

nilsve avatar Aug 26 '25 11:08 nilsve

Here's the PR:

https://github.com/nilsve/docker-aseprite-linux/pull/21

wiktorkujawa avatar Aug 26 '25 16:08 wiktorkujawa