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
181 stars 45 forks source link

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

Open copyrat90 opened 1 year ago

copyrat90 commented 1 year ago

I found someone has built m96 for the RPi. https://github.com/aseprite/aseprite/issues/2835#issuecomment-1001605300 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.
dacap commented 1 year ago

The error log is just a network problem with git-sync-deps (or at least that is what I remember). You can try running the same command until it pass.

copyrat90 commented 1 year ago

I did run python tools/git-sync-deps for 7 hours, but it's still the same error.

The error seems to be raised while running emsdk.py install 3.1.3, specifically here https://github.com/emscripten-core/emsdk/blob/fc645b7626ebf86530dbd82fbece74d457e7ae07/emsdk.py#L2727-L2731 Looks like this isn't supported on 32bit systems?

copyrat90 commented 1 year ago

Also, if I ignore this and try running gn gen .., this happens.

Traceback (most recent call last):
  File "/home/username/deps/depot_tools/gn.py", line 74, in <module>
    sys.exit(main(sys.argv))
  File "/home/username/deps/depot_tools/gn.py", line 69, in main
    return subprocess.call([gn_path] + args[1:])
  File "/usr/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/deps/skia
/buildtools/linux64/gn'

Even though there is /home/username/deps/skia /buildtools/linux64/gn executable.

scribhneoir commented 10 months ago

Hi @copyrat90! I believe the issue is that emsdk (one of skia's dependancies) does not build all of their releases for aarch64, and they don't have the required version (3.1.3) available. They did however release emsdk 3.1.33, and you can use this to build skia. I built skia-m102 and aseprite v1.3.1 this afternoon on my pi 4 and documented the process here: https://gist.github.com/scribhneoir/f26369519174f223d6e275707b106f27. I hope this will be helpful to you!