aseprite / skia

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.
https://skia.org
BSD 3-Clause "New" or "Revised" License
170 stars 42 forks source link

Issue building Skia on Debian #5

Open nyDupont opened 4 years ago

nyDupont commented 4 years ago

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)

enderger commented 4 years ago

Use this command: python2 tools/git-sync-deps

mikaelivarsson commented 3 years ago

I get the same problem, also using "alias python=python2" won't solve the issue. Same thing for me that if I add missing parantheses it complains instead about: if ('clang' in subprocess.check_output('%s --version' % cc, shell=True) and TypeError: a bytes-like object is required, not 'str'

indexofmetals commented 3 years ago

I am also having this problem on Ubuntu.

XReaper95 commented 3 years ago

Add this line to the end of the .gn dotfile (after running python2 tools/git-sync-deps)

script_executable = "python2"

Or whatever command that points to python 2 on your system.

krcs commented 2 years ago

sudo ln /usr/bin/python2 /usr/bin/python

Only for compile time. This also work for aseprite compilation.